Parcourir la source

fix 考试次数

he2802 il y a 3 ans
Parent
commit
30829d9c1e

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserExamGoodsServiceImpl.java

@@ -212,6 +212,8 @@ public class UserExamGoodsServiceImpl extends ServiceImpl<UserExamGoodsMapper, U
                         objectLambdaUpdateWrapper.set(UserExamGoods::getExamNumber, examGoodsVo.getExamNumber().longValue()-entity.getExamNumber().longValue());
                         objectLambdaUpdateWrapper.set(UserExamGoods::getUpdateTime,DateUtils.getNowTime());
                         update(null, objectLambdaUpdateWrapper);
+                        entity.setStatus(-1);
+                        iUserExamGoodsSupplementService.updateById(entity);
                         return true;
                     }else{
                         throw new CustomException("剩余次数不满足退款");
@@ -228,6 +230,8 @@ public class UserExamGoodsServiceImpl extends ServiceImpl<UserExamGoodsMapper, U
                         objectLambdaUpdateWrapper.set(UserExamGoods::getExamNumber, examGoodsVo.getDoNumber().longValue()-entity.getDoNumber().longValue());
                         objectLambdaUpdateWrapper.set(UserExamGoods::getUpdateTime,DateUtils.getNowTime());
                         update(null, objectLambdaUpdateWrapper);
+                        entity.setStatus(-1);
+                        iUserExamGoodsSupplementService.updateById(entity);
                         return true;
                     }else{
                         throw new CustomException("剩余次数不满足退款");