|
@@ -1450,17 +1450,7 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
if(Validator.isEmpty(orderGoodsId)||Validator.isEmpty(userId)){
|
|
|
throw new CustomException("参数错误");
|
|
|
}
|
|
|
- ClassGradeUser classGradeUser = iClassGradeUserService.getOne(new LambdaQueryWrapper<ClassGradeUser>()
|
|
|
- .eq(ClassGradeUser::getChangeGrade, 0)
|
|
|
- .eq(ClassGradeUser::getStatus, 1)
|
|
|
- .eq(ClassGradeUser::getOrderGoodsId, orderGoodsId)
|
|
|
- .last("limit 1"));
|
|
|
- if(Validator.isEmpty(classGradeUser)){
|
|
|
- throw new CustomException("数据错误");
|
|
|
- }
|
|
|
- if(Validator.isEmpty(classGradeUser.getOfficialStatus())||classGradeUser.getOfficialStatus()!=1){
|
|
|
- throw new CustomException("未推送成功,无法操作");
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
OrderGoods newOrderGoods = iOrderGoodsService.getOne(new LambdaQueryWrapper<OrderGoods>().eq(OrderGoods::getOrderGoodsId, orderGoodsId));
|
|
|
if(newOrderGoods.getSevenClassStatus()==1||newOrderGoods.getSevenClassStatus()==2||newOrderGoods.getSevenClassStatus()==3){
|
|
@@ -1477,6 +1467,18 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
if(Validator.isEmpty(newOrderGoods.getSevenYear())){
|
|
|
return 0;
|
|
|
}
|
|
|
+ ClassGradeUser classGradeUser = iClassGradeUserService.getOne(new LambdaQueryWrapper<ClassGradeUser>()
|
|
|
+ .eq(ClassGradeUser::getChangeGrade, 0)
|
|
|
+ .eq(ClassGradeUser::getStatus, 1)
|
|
|
+ .eq(ClassGradeUser::getOrderGoodsId, orderGoodsId)
|
|
|
+ .last("limit 1"));
|
|
|
+ if(Validator.isEmpty(classGradeUser)){
|
|
|
+ throw new CustomException("数据错误");
|
|
|
+ }
|
|
|
+ if(Validator.isEmpty(classGradeUser.getOfficialStatus())||classGradeUser.getOfficialStatus()!=1){
|
|
|
+ throw new CustomException("未推送成功,无法操作");
|
|
|
+ }
|
|
|
+
|
|
|
OrderGoods oldOrderGoods = iOrderGoodsService.getSevenLastOne(goods.getProjectId(),newOrderGoods.getSevenYear(),userId);
|
|
|
if(Validator.isEmpty(oldOrderGoods)){
|
|
|
newOrderGoods.setSevenClassVersion(newOrderGoods.getSevenClassVersion()+1);
|