浏览代码

学时学习记录

he2802 3 年之前
父节点
当前提交
9f3fac9121

+ 6 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsServiceImpl.java

@@ -261,6 +261,12 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
             objectLambdaUpdateWrapper.set(Goods::getBuyNote,null);
             update(null, objectLambdaUpdateWrapper);
         }
+        if(Validator.isEmpty(bo.getSectionMaxNum())){
+            LambdaUpdateWrapper<Goods> objectLambdaUpdateWrapper = Wrappers.lambdaUpdate();
+            objectLambdaUpdateWrapper.eq(Goods::getGoodsId,bo.getGoodsId());
+            objectLambdaUpdateWrapper.set(Goods::getSectionMaxNum,null);
+            update(null, objectLambdaUpdateWrapper);
+        }
         //试听列表
         if(bo.getAuditionList()!=null&&bo.getAuditionList().size()>0){
             update.setGoodsAuditionConfig(JSON.toJSONString(bo.getAuditionList()));