From b5e51fc48bc65fc27ed4d6c4f3e82414646113bd Mon Sep 17 00:00:00 2001 From: liujie <liujie> Date: 星期三, 18 十月 2023 11:26:36 +0800 Subject: [PATCH] 修改bug --- cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 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 20ff43d..455f330 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 @@ -447,6 +447,32 @@ detailsResponse.setEndTime(simpleDateFormat.format(merchandise.getEndTime())); detailsResponse.setUseStatus(pointsMerchandise.getStatus() == 1 ? 2 : 1); detailsResponse.setGoodType(merchandise.getType()); + if(merchandise.getType()==3){ + detailsResponse.setCardType(merchandise.getCardType()); + List<Integer> sids = new ArrayList<>(); + detailsResponse.setUserId(appUserId); + if(merchandise.getUseScope()==1){ + sids.add(0); + detailsResponse.setSid(sids); + }else if(merchandise.getUseScope()==2){ + // 指定城市 + List<PointsMerchandiseCity> list = pmdsCityService.list(new LambdaQueryWrapper<PointsMerchandiseCity>().eq(PointsMerchandiseCity::getPointsMerchandiseId, merchandise.getId())); + List<String> collect = list.stream().map(PointsMerchandiseCity::getCityCode).collect(Collectors.toList()); + if(collect.size()==0){ + collect.add("-1"); + } + List<Integer> storeIds = stoClient.queryStoreIdByCityCode(collect); + detailsResponse.setSid(storeIds); + + }else if(merchandise.getUseScope()==3){ + // 指定门店 + List<PointsMerchandiseStore> list = pmdstoService.list(new LambdaQueryWrapper<PointsMerchandiseStore>().eq(PointsMerchandiseStore::getPointsMerchandiseId, merchandise.getId())); + List<Integer> collect = list.stream().map(PointsMerchandiseStore::getStoreId).collect(Collectors.toList()); + detailsResponse.setSid(collect); + + + } + } responses.add(detailsResponse); } detailsVo.setDetailsResponses(responses); @@ -712,6 +738,8 @@ vo.setSort(byId.getSort()); vo.setContent(byId.getRedemptionInstructions()); } + int count = userPointsMerchandiseService.count(new LambdaQueryWrapper<UserPointsMerchandise>().eq(UserPointsMerchandise::getPointsMerchandiseId, pointMercharsId)); + vo.setNum(count); return vo; } -- Gitblit v1.7.1