liujie
2023-10-20 1e790795f4e2c365f604ecc0fc1b290e3ff3c35f
cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java
@@ -448,12 +448,28 @@
                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){
                        detailsResponse.setSid(0);
                        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);
                    }
                }
@@ -881,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);
                }
            }