liujie
2023-10-20 1e790795f4e2c365f604ecc0fc1b290e3ff3c35f
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;
    }
@@ -869,7 +897,14 @@
                for (Store store : stores) {
                    StoreVos storeVos1 = new StoreVos();
                    storeVos1.setNum1(store.getProvince() +"省"+ store.getCity() +"市");
                    storeVos1.setNum2(store.getName());
                    if(store.getOperatorId()==0){
                        storeVos1.setNum2("平台");
                    }else {
                        storeVos1.setNum2(store.getOName());
                    }
                    storeVos1.setNum3(store.getName());
                    storeVos1.setNum4(store.getIds());
                    storeVos.add(storeVos1);
                }
            }