浏览代码

bugfix:1186 团购详情 修改团购提前上架售卖时间时间

qxy 1 月之前
父节点
当前提交
7d878bc3b6
共有 1 个文件被更改,包括 11 次插入1 次删除
  1. 11 1
      alien-store/src/main/java/shop/alien/store/service/impl/LifeGroupBuyServiceImpl.java

+ 11 - 1
alien-store/src/main/java/shop/alien/store/service/impl/LifeGroupBuyServiceImpl.java

@@ -198,7 +198,17 @@ public class LifeGroupBuyServiceImpl extends ServiceImpl<LifeGroupBuyMainMapper,
 
     @Override
     public boolean updateStatus(String id, String status, String approvalComments) {
-        lifeGroupBuyMainMapper.update(null, new LambdaUpdateWrapper<LifeGroupBuyMain>().eq(LifeGroupBuyMain::getId, id).set(LifeGroupBuyMain::getStatus, status).set(LifeGroupBuyMain::getApprovalComments, approvalComments));
+        LambdaUpdateWrapper<LifeGroupBuyMain> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
+        lambdaUpdateWrapper.eq(LifeGroupBuyMain::getId, id);
+        lambdaUpdateWrapper.set(LifeGroupBuyMain::getStatus, status);
+        lambdaUpdateWrapper.set(LifeGroupBuyMain::getApprovalComments, approvalComments);
+        if(status.equals("5")){
+            LifeGroupBuyMain lifeGroupBuyMain = lifeGroupBuyMainMapper.selectById(id);
+            if(lifeGroupBuyMain !=null && lifeGroupBuyMain.getStatus()==2){
+                lambdaUpdateWrapper.set(LifeGroupBuyMain::getStartTimeValue, new Date());
+            }
+        }
+            lifeGroupBuyMainMapper.update(null,lambdaUpdateWrapper);
         //处理中台审核记录
         if(StringUtils.isNotEmpty(id) && StringUtils.isNotEmpty(status) && (status.equals("2") || status.equals("3"))){
             LambdaUpdateWrapper<WebAudit> wrapper = new LambdaUpdateWrapper<>();