浏览代码

中台待办处理逻辑修改

zhangchen 3 月之前
父节点
当前提交
802e2e6671

+ 8 - 1
alien-store/src/main/java/shop/alien/store/service/impl/PlatformStoreCouponServiceImpl.java

@@ -2,6 +2,7 @@ package shop.alien.store.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
@@ -46,6 +47,8 @@ public class PlatformStoreCouponServiceImpl implements PlatformStoreCouponServic
 
     private final AliOSSUtil aliOSSUtil;
 
+    private final WebAuditMapper webAuditMapper;
+
     List<LifeCouponVo> toExcel = new ArrayList<>();
 
     @Value("${spring.web.resources.excel-path}")
@@ -234,13 +237,17 @@ public class PlatformStoreCouponServiceImpl implements PlatformStoreCouponServic
             if (status == 2 && coupon.getStartDate().before(now) && coupon.getEndDate().after(now)) {
                 status = 5;
             }
-
             coupon.setStatus(status);
             coupon.setApprovalComments(comment);
             // 审核后开始
             if ("0".equals(coupon.getSaleTimeStrType())) {
                 coupon.setStartDate(new Date());
             }
+            // 将待办列表状态设置为已审核
+            LambdaUpdateWrapper<WebAudit> wrapper = new LambdaUpdateWrapper<>();
+            wrapper.eq(WebAudit::getCouponId, id);
+            wrapper.set(WebAudit::getStatus, "1");
+            webAuditMapper.update(null, wrapper);
             return platformStoreCouponMapper.updateById(coupon);
         } else {
             LifeGroupBuyMain lifeGroupBuyMain = platformStoreLifeGroupBuyMainMapper.selectById(id);