|
@@ -1,7 +1,9 @@
|
|
|
package com.zhongzheng.modules.course.service.impl;
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
+import cn.hutool.core.lang.Validator;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import com.zhongzheng.common.exception.CustomException;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
import com.zhongzheng.modules.course.bo.CoursePhotoLogAddBo;
|
|
|
import com.zhongzheng.modules.course.bo.CoursePhotoLogEditBo;
|
|
@@ -70,6 +72,9 @@ public class CoursePhotoLogServiceImpl extends ServiceImpl<CoursePhotoLogMapper,
|
|
|
|
|
|
@Override
|
|
|
public Boolean insertByAddBo(CoursePhotoLogAddBo bo) {
|
|
|
+ if(Validator.isEmpty(bo.getOrderGoodsId())){
|
|
|
+ throw new CustomException("缺OrderGoodsId");
|
|
|
+ }
|
|
|
CoursePhotoLog add = BeanUtil.toBean(bo, CoursePhotoLog.class);
|
|
|
validEntityBeforeSave(add);
|
|
|
add.setCreateTime(DateUtils.getNowTime());
|