From 764f045c785959117db3d27d744e63d2dad6240c Mon Sep 17 00:00:00 2001 From: 44323 <443237572@qq.com> Date: 星期一, 13 十一月 2023 09:04:41 +0800 Subject: [PATCH] 后台bug修改 --- cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java b/cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java index 764abaf..3b04617 100644 --- a/cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java +++ b/cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java @@ -242,10 +242,11 @@ String endTime = (String) stringObjectMap.get("endTime"); stringObjectMap.put("timeValue",startTime + "至"+endTime); int count1 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>() - .eq(UserPointsMerchandise::getPointsMerchandiseId, o)); - int count2 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>() .eq(UserPointsMerchandise::getPointsMerchandiseId, o) .eq(UserPointsMerchandise::getStatus,2)); + int count2 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>() + .eq(UserPointsMerchandise::getPointsMerchandiseId, o) + ); stringObjectMap.put("hasExchangeQty",count1); stringObjectMap.put("hasPickQty",count2); @@ -1421,7 +1422,16 @@ @PostMapping("/base/pointMerchars/queryPointMerchaseById") public PointsMerchandise queryPointMerchaseById(@RequestBody Integer id){ - return pmdsService.getById(id); + PointsMerchandise byId = pmdsService.getById(id); + int count1 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>() + .eq(UserPointsMerchandise::getPointsMerchandiseId, byId.getId()) + .eq(UserPointsMerchandise::getStatus,2)); + int count2 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>() + .eq(UserPointsMerchandise::getPointsMerchandiseId, byId.getId()) + ); + byId.setPickUpQuantity3(count2); + byId.setPickUpQuantity4(count1); + return byId; } @PostMapping("/base/pointMerchars/getshopName") @@ -1584,7 +1594,7 @@ @PostMapping("/base/pointMerchars/add") public Integer add(@RequestBody PointsMerchandise pointsMerchandise){ Integer storeId = pointsMerchandise.getShelves(); - pointsMerchandise.setShelves(2); + pointsMerchandise.setShelves(1); boolean save = pmdsService.save(pointsMerchandise); if(save && ToolUtil.isNotEmpty(storeId) && pointsMerchandise.getType()==2){ PointsMerchandiseStore pointsMerchandiseStore = new PointsMerchandiseStore(); -- Gitblit v1.7.1