From b5e51fc48bc65fc27ed4d6c4f3e82414646113bd Mon Sep 17 00:00:00 2001 From: liujie <liujie> Date: 星期三, 18 十月 2023 11:26:36 +0800 Subject: [PATCH] 修改bug --- cloud-server-account/src/main/java/com/dsh/account/model/vo/userBenefitDetail/ExchangeDetailsResponse.java | 7 +++ cloud-server-other/src/main/resources/mapper/TGameConfigMapper.xml | 2 cloud-server-other/src/main/java/com/dsh/other/service/impl/StoreServiceImpl.java | 22 ++++++++--- cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java | 18 ++++++++ cloud-server-other/src/main/java/com/dsh/other/entity/SiteBooking.java | 3 + cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java | 8 +++- cloud-server-activity/src/main/java/com/dsh/activity/feignclient/model/ExchangeDetailsResponse.java | 6 ++ cloud-server-other/src/main/java/com/dsh/other/controller/StoreController.java | 16 +++++++- cloud-server-other/src/main/java/com/dsh/other/controller/GameController.java | 15 +++++++ cloud-server-other/src/main/java/com/dsh/other/entity/TGameConfig.java | 4 +- cloud-server-account/src/main/java/com/dsh/account/feignclient/other/SiteClient.java | 2 cloud-server-account/src/main/java/com/dsh/account/service/impl/TStudentServiceImpl.java | 2 cloud-server-activity/src/main/java/com/dsh/activity/feignclient/other/StoreClient.java | 5 ++ cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java | 2 + cloud-server-other/src/main/java/com/dsh/other/service/StoreService.java | 2 cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TGoodsController.java | 2 16 files changed, 95 insertions(+), 21 deletions(-) diff --git a/cloud-server-account/src/main/java/com/dsh/account/feignclient/other/SiteClient.java b/cloud-server-account/src/main/java/com/dsh/account/feignclient/other/SiteClient.java index 002a5a5..8fa17ce 100644 --- a/cloud-server-account/src/main/java/com/dsh/account/feignclient/other/SiteClient.java +++ b/cloud-server-account/src/main/java/com/dsh/account/feignclient/other/SiteClient.java @@ -25,7 +25,7 @@ @PostMapping("/base/site/getNewAddSiteList") - List<SiteVo> getAppUserSiteList(); + List<SiteVo> getAppUserSiteList(Integer storeId); @PostMapping("/base/site/queryByCode") Integer queryByCode(@RequestBody String code); @PostMapping("/base/site/queryOperator") diff --git a/cloud-server-account/src/main/java/com/dsh/account/model/vo/userBenefitDetail/ExchangeDetailsResponse.java b/cloud-server-account/src/main/java/com/dsh/account/model/vo/userBenefitDetail/ExchangeDetailsResponse.java index fe122d8..3c05509 100644 --- a/cloud-server-account/src/main/java/com/dsh/account/model/vo/userBenefitDetail/ExchangeDetailsResponse.java +++ b/cloud-server-account/src/main/java/com/dsh/account/model/vo/userBenefitDetail/ExchangeDetailsResponse.java @@ -5,6 +5,7 @@ import lombok.Data; import java.math.BigDecimal; +import java.util.List; @Data public class ExchangeDetailsResponse { @@ -36,4 +37,10 @@ @ApiModelProperty(value = "商品类型 1实物 2课包 3门票 4优惠券") private Integer goodType; + private Integer userId; + + private List<Integer> sid; + @ApiModelProperty(value = "1日卡 2月卡 3季卡 4年卡") + private Integer cardType; + } diff --git a/cloud-server-account/src/main/java/com/dsh/account/service/impl/TStudentServiceImpl.java b/cloud-server-account/src/main/java/com/dsh/account/service/impl/TStudentServiceImpl.java index 0e0d9d9..4933f96 100644 --- a/cloud-server-account/src/main/java/com/dsh/account/service/impl/TStudentServiceImpl.java +++ b/cloud-server-account/src/main/java/com/dsh/account/service/impl/TStudentServiceImpl.java @@ -787,7 +787,7 @@ detailsVo.setLon(store.getLon()); detailsVo.setLat(store.getLat()); detailsVo.setPhone(store.getPhone()); - detailsVo.setVenueList(steClient.getAppUserSiteList()); + detailsVo.setVenueList(steClient.getAppUserSiteList(storeId)); List<StoreOfCourseVo> storeOfCourseList = culisClient.getStoreOfCourseList(storeId); System.out.println(storeOfCourseList); detailsVo.setCourseVoList(storeOfCourseList); 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 c959663..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 @@ -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); + } } diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/feignclient/model/ExchangeDetailsResponse.java b/cloud-server-activity/src/main/java/com/dsh/activity/feignclient/model/ExchangeDetailsResponse.java index a2ac377..3500554 100644 --- a/cloud-server-activity/src/main/java/com/dsh/activity/feignclient/model/ExchangeDetailsResponse.java +++ b/cloud-server-activity/src/main/java/com/dsh/activity/feignclient/model/ExchangeDetailsResponse.java @@ -5,6 +5,7 @@ import lombok.Data; import java.math.BigDecimal; +import java.util.List; @Data public class ExchangeDetailsResponse { @@ -39,6 +40,9 @@ private Integer userId; - private Integer sid; + private List<Integer> sid; + + @ApiModelProperty(value = "1日卡 2月卡 3季卡 4年卡") + private Integer cardType; } diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/feignclient/other/StoreClient.java b/cloud-server-activity/src/main/java/com/dsh/activity/feignclient/other/StoreClient.java index 79850da..4ccbaa1 100644 --- a/cloud-server-activity/src/main/java/com/dsh/activity/feignclient/other/StoreClient.java +++ b/cloud-server-activity/src/main/java/com/dsh/activity/feignclient/other/StoreClient.java @@ -19,4 +19,9 @@ @PostMapping("/store/queryStoreByIds") List<Store> queryStoreByIds(@RequestBody List<Integer> ids); + + @PostMapping("/store/queryStoreIdByCityCode") + List<Integer> queryStoreIdByCityCode(@RequestBody List<String> collect); + + } diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TGoodsController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TGoodsController.java index e5d375b..876fb08 100644 --- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TGoodsController.java +++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TGoodsController.java @@ -158,7 +158,7 @@ List<StoreVos> provinces = pointMercharsClient.getProvinces(id); model.addAttribute("city",provinces); } - if (infoOneVo.getUseScope() == 2){ + if (infoOneVo.getUseScope() == 3){ List<StoreVos> storeVos = pointMercharsClient.getStoreList(id); model.addAttribute("store",storeVos); } diff --git a/cloud-server-other/src/main/java/com/dsh/other/controller/GameController.java b/cloud-server-other/src/main/java/com/dsh/other/controller/GameController.java index 147ab20..2e1e376 100644 --- a/cloud-server-other/src/main/java/com/dsh/other/controller/GameController.java +++ b/cloud-server-other/src/main/java/com/dsh/other/controller/GameController.java @@ -86,7 +86,7 @@ @ApiImplicitParam(value = "游戏配置id", name = "configId", dataType = "int", required = true), @ApiImplicitParam(value = "sutuId", name = "sutuId", dataType = "int", required = true), @ApiImplicitParam(value = "spaceId", name = "spaceId", dataType = "int", required = true), - @ApiImplicitParam(value = "1微信 2支付宝 3玩湃币", name = "type", dataType = "int", required = true), + @ApiImplicitParam(value = "1微信 2支付宝 3玩湃币 5积分", name = "type", dataType = "int", required = true), @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), }) public ResultUtil payGame(Integer gameId, Integer configId,Integer type,Integer sutuId,Integer spaceId){ @@ -228,6 +228,19 @@ startGame(uid,gameId,spaceId,sutuId); return ResultUtil.success(); + }else if(type==5){ + AppUser appUser = appUserClient.queryAppUser(uid); + Integer playPaiCoins = appUser.getIntegral(); + BigDecimal playCoin = config.getIntegral(); + int i = playCoin.intValue(); + if(playPaiCoins<i){ + return ResultUtil.error("积分不足"); + } + int i1 = playPaiCoins - i; + appUser.setIntegral(i1); + appUserClient.updateAppUser(appUser); + startGame(uid,gameId,spaceId,sutuId); + return ResultUtil.success(); }else { return ResultUtil.error("支付方式错误"); } diff --git a/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java b/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java index ff3ea1f..068ed97 100644 --- a/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java +++ b/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java @@ -352,7 +352,11 @@ try { HashMap<String, Object> map = new HashMap<>(); SiteBooking byId = siteBookingService.getById(id); + Integer storeId = byId.getStoreId(); + Store byId1 = service.getById(storeId); + List<Integer> ids = getIds(byId.getSiteId()); + byId.setStorePhone(byId1.getPhone()); map.put("data",byId); map.put("ids",ids); return ResultUtil.success(map); @@ -544,10 +548,10 @@ @ResponseBody @PostMapping("/base/site/getNewAddSiteList") - public List<SiteVo> getAppUserSiteList(){ + public List<SiteVo> getAppUserSiteList(@RequestBody Integer storeId){ List<SiteVo> siteVos = new ArrayList<>(); - List<Site> list = siteService.list(new QueryWrapper<Site>() + List<Site> list = siteService.list(new QueryWrapper<Site>().eq("state",1).eq("storeId",storeId) .orderByDesc("insertTime")); if (list.size() > 0 ){ for (Site site : list) { diff --git a/cloud-server-other/src/main/java/com/dsh/other/controller/StoreController.java b/cloud-server-other/src/main/java/com/dsh/other/controller/StoreController.java index 1ed5022..6732193 100644 --- a/cloud-server-other/src/main/java/com/dsh/other/controller/StoreController.java +++ b/cloud-server-other/src/main/java/com/dsh/other/controller/StoreController.java @@ -227,6 +227,17 @@ } } + @ResponseBody + @PostMapping("/store/queryStoreIdByCityCode") + List<Integer> queryStoreIdByCityCode(@RequestBody List<String> collect){ + try { + return storeService.list(new LambdaQueryWrapper<Store>() + .in(Store::getCityCode,collect)).stream().map(Store::getId).collect(Collectors.toList()); + }catch (Exception e){ + e.printStackTrace(); + return new ArrayList<>(); + } + } @@ -236,10 +247,11 @@ @ApiImplicitParams({ @ApiImplicitParam(value = "经纬", name = "lon", dataType = "string", required = false), @ApiImplicitParam(value = "纬度", name = "lat", dataType = "string", required = false), + @ApiImplicitParam(value = "cityCode", name = "cityCode", dataType = "string", required = false), }) - public ResultUtil<List<BaseVo>> queryStoreLists(String lon, String lat){ + public ResultUtil<List<BaseVo>> queryStoreLists(String lon, String lat,String cityCode){ try { - List<BaseVo> baseVos = storeService.queryStoreLists(lon, lat); + List<BaseVo> baseVos = storeService.queryStoreLists(lon, lat,cityCode); return ResultUtil.success(baseVos); }catch (Exception e){ e.printStackTrace(); diff --git a/cloud-server-other/src/main/java/com/dsh/other/entity/SiteBooking.java b/cloud-server-other/src/main/java/com/dsh/other/entity/SiteBooking.java index cbdb629..1890dd3 100644 --- a/cloud-server-other/src/main/java/com/dsh/other/entity/SiteBooking.java +++ b/cloud-server-other/src/main/java/com/dsh/other/entity/SiteBooking.java @@ -177,6 +177,7 @@ @TableField("goType") private Integer goType; @TableField("money") - private String money; + @TableField(exist = false) + private String storePhone; } diff --git a/cloud-server-other/src/main/java/com/dsh/other/entity/TGameConfig.java b/cloud-server-other/src/main/java/com/dsh/other/entity/TGameConfig.java index 4dcebcc..b91fc01 100644 --- a/cloud-server-other/src/main/java/com/dsh/other/entity/TGameConfig.java +++ b/cloud-server-other/src/main/java/com/dsh/other/entity/TGameConfig.java @@ -64,9 +64,9 @@ @TableField("otherId") private Integer otherId; @TableField(exist = false) - private String jieshao; + private String intro; @TableField(exist = false) - private String vedio; + private String video; @Override diff --git a/cloud-server-other/src/main/java/com/dsh/other/service/StoreService.java b/cloud-server-other/src/main/java/com/dsh/other/service/StoreService.java index 92a2931..e0da73e 100644 --- a/cloud-server-other/src/main/java/com/dsh/other/service/StoreService.java +++ b/cloud-server-other/src/main/java/com/dsh/other/service/StoreService.java @@ -36,7 +36,7 @@ * @return * @throws Exception */ - List<BaseVo> queryStoreLists(String lon, String lat) throws Exception; + List<BaseVo> queryStoreLists(String lon, String lat,String cityCode) throws Exception; /** diff --git a/cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java b/cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java index 5065796..a410b0b 100644 --- a/cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java +++ b/cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java @@ -264,6 +264,8 @@ // } if (strings.contains(timeRange)){ orderDto.setSelectable(0); + }else { + orderDto.setSelectable(1); } diff --git a/cloud-server-other/src/main/java/com/dsh/other/service/impl/StoreServiceImpl.java b/cloud-server-other/src/main/java/com/dsh/other/service/impl/StoreServiceImpl.java index d19338e..8c98490 100644 --- a/cloud-server-other/src/main/java/com/dsh/other/service/impl/StoreServiceImpl.java +++ b/cloud-server-other/src/main/java/com/dsh/other/service/impl/StoreServiceImpl.java @@ -84,21 +84,31 @@ * @throws Exception */ @Override - public List<BaseVo> queryStoreLists(String lon, String lat) throws Exception { + public List<BaseVo> queryStoreLists(String lon, String lat,String cityCode) throws Exception { List<BaseVo> list = new ArrayList<>(); if(ToolUtil.isEmpty(lon) || ToolUtil.isEmpty(lat)){ return list; } - Map<String, String> geocode = gdMapGeocodingUtil.geocode(lon, lat); - if(null != geocode){ - String provinceCode = geocode.get("provinceCode"); - String cityCode = geocode.get("cityCode"); - List<Store> stores = this.queryStorsList(provinceCode, cityCode); + if(ToolUtil.isNotEmpty(cityCode)){ + List<Store> stores = this.queryStorsList(null, cityCode); for (Store store : stores) { BaseVo baseVo = new BaseVo(); BeanUtils.copyProperties(store, baseVo); list.add(baseVo); } + }else { + Map<String, String> geocode = gdMapGeocodingUtil.geocode(lon, lat); + if(null != geocode){ + String provinceCode = geocode.get("provinceCode"); + String cityCode1 = geocode.get("cityCode"); + + List<Store> stores = this.queryStorsList(provinceCode, cityCode1); + for (Store store : stores) { + BaseVo baseVo = new BaseVo(); + BeanUtils.copyProperties(store, baseVo); + list.add(baseVo); + } + } } return list; } diff --git a/cloud-server-other/src/main/resources/mapper/TGameConfigMapper.xml b/cloud-server-other/src/main/resources/mapper/TGameConfigMapper.xml index 30241cb..618f833 100644 --- a/cloud-server-other/src/main/resources/mapper/TGameConfigMapper.xml +++ b/cloud-server-other/src/main/resources/mapper/TGameConfigMapper.xml @@ -4,7 +4,7 @@ <select id="listJs" resultType="com.dsh.other.entity.TGameConfig"> - select gc.* ,js.jieshao,js.vedio + select gc.* ,js.jieshao intro,js.vedio video from t_game_config gc left join t_js js on gc.gameId = js.id where gc.otherId = #{id} and gc.img !="" -- Gitblit v1.7.1