Browse Source

中台待办处理逻辑修改

zhangchen 3 months ago
parent
commit
65af5714e4

+ 1 - 1
alien-store/src/main/java/shop/alien/store/controller/WebAuditController.java

@@ -38,7 +38,7 @@ public class WebAuditController {
     @GetMapping("/getAuditList")
     public R<IPage<WebAudit>> getAuditList(@RequestParam(value = "page", defaultValue = "1") int page,
                                            @RequestParam(value = "size", defaultValue = "10") int size,
-                                           @RequestParam("status") String status,
+                                           @RequestParam(value = "status", defaultValue = "0") String status,
                                            @RequestParam("type") String type) {
         log.info("LifeStoreOrderController.getOrderListByStatus?page={},size={},storeId={},status={}", page, size, status, type);
         return R.data(webAuditService.getOrderList(page, size, status, type));

+ 9 - 0
alien-store/src/main/java/shop/alien/store/service/impl/LifeGroupBuyServiceImpl.java

@@ -44,6 +44,8 @@ public class LifeGroupBuyServiceImpl extends ServiceImpl<LifeGroupBuyMainMapper,
 
     private final LifeCollectMapper lifeCollectMapper;
 
+    private final WebAuditMapper webAuditMapper;
+
     @Override
     public boolean saveThali(LifeGroupBuyDto lifeGroupBuyDto) {
         JSONObject currentUserInfo = JwtUtil.getCurrentUserInfo();
@@ -187,6 +189,13 @@ 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));
+        //处理中台审核记录
+        if(StringUtils.isNotEmpty(id) && StringUtils.isNotEmpty(status) && status.equals("2")){
+            LambdaUpdateWrapper<WebAudit> wrapper = new LambdaUpdateWrapper<>();
+            wrapper.eq(WebAudit::getLifeGroupPackageId, id);
+            wrapper.set(WebAudit::getStatus, "1");
+            webAuditMapper.update(null, wrapper);
+        }
         return true;
     }
 

+ 5 - 0
alien-store/src/main/java/shop/alien/store/service/impl/PlatformStoreCouponServiceImpl.java

@@ -258,6 +258,11 @@ public class PlatformStoreCouponServiceImpl implements PlatformStoreCouponServic
             if (lifeGroupBuyMain.getStartTimeType() == 0 && lifeGroupBuyMain.getStatus() == 5) {
                 lifeGroupBuyMain.setStartTimeValue(new Date());
             }
+            // 将待办列表状态设置为已审核
+            LambdaUpdateWrapper<WebAudit> wrapper = new LambdaUpdateWrapper<>();
+            wrapper.eq(WebAudit::getLifeGroupPackageId, id);
+            wrapper.set(WebAudit::getStatus, "1");
+            webAuditMapper.update(null, wrapper);
             return platformStoreLifeGroupBuyMainMapper.updateById(lifeGroupBuyMain);
         }
     }