|
@@ -33,6 +33,7 @@ import com.zhongzheng.modules.base.vo.UserProfileExportVo;
|
|
|
import com.zhongzheng.modules.course.domain.CourseBusiness;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
|
import com.zhongzheng.modules.goods.vo.GoodsVo;
|
|
|
+import com.zhongzheng.modules.grade.domain.ClassGradeUser;
|
|
|
import com.zhongzheng.modules.inform.bo.InformUserAddBo;
|
|
|
import com.zhongzheng.modules.inform.service.IInformRemindService;
|
|
|
import com.zhongzheng.modules.inform.service.IInformUserService;
|
|
@@ -172,10 +173,17 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
|
throw new CustomException("图片地址错误");
|
|
|
}
|
|
|
}
|
|
|
- if(Validator.isEmpty(bo.getOrderGoodsId())||bo.getOrderGoodsId()==0L){
|
|
|
+ if(Validator.isEmpty(bo.getTypeStatus())||Validator.isEmpty(bo.getOrderGoodsId())||bo.getOrderGoodsId()==0L){
|
|
|
throw new CustomException("参数错误");
|
|
|
}
|
|
|
-
|
|
|
+ UserProfile old = getOne(new LambdaQueryWrapper<UserProfile>().eq(UserProfile::getOrderGoodsId, bo.getOrderGoodsId())
|
|
|
+ .eq(UserProfile::getCurrentStatus, 1L)
|
|
|
+ .eq(UserProfile::getChangeStatus, 1L)
|
|
|
+ .eq(UserProfile::getTypeStatus, bo.getTypeStatus())
|
|
|
+ .last("limit 1"));
|
|
|
+ if(Validator.isNotEmpty(old)){
|
|
|
+ throw new CustomException("存在未处理的数据,无法操作");
|
|
|
+ }
|
|
|
UserProfile add = BeanUtil.toBean(bo, UserProfile.class);
|
|
|
validEntityBeforeSave(add);
|
|
|
add.setCreateTime(DateUtils.getNowTime());
|