| | |
| | | |
| | | |
| | | @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") |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class ExchangeDetailsResponse { |
| | |
| | | @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; |
| | | |
| | | } |
| | |
| | | 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); |
| | |
| | | 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); |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class ExchangeDetailsResponse { |
| | |
| | | |
| | | private Integer userId; |
| | | |
| | | private Integer sid; |
| | | private List<Integer> sid; |
| | | |
| | | @ApiModelProperty(value = "1日卡 2月卡 3季卡 4年卡") |
| | | private Integer cardType; |
| | | |
| | | } |
| | |
| | | |
| | | @PostMapping("/store/queryStoreByIds") |
| | | List<Store> queryStoreByIds(@RequestBody List<Integer> ids); |
| | | |
| | | @PostMapping("/store/queryStoreIdByCityCode") |
| | | List<Integer> queryStoreIdByCityCode(@RequestBody List<String> collect); |
| | | |
| | | |
| | | } |
| | |
| | | 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); |
| | | } |
| | |
| | | @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){ |
| | |
| | | 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("支付方式错误"); |
| | | } |
| | |
| | | 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); |
| | |
| | | |
| | | @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) { |
| | |
| | | } |
| | | } |
| | | |
| | | @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<>(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | @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(); |
| | |
| | | @TableField("goType") |
| | | private Integer goType; |
| | | @TableField("money") |
| | | |
| | | private String money; |
| | | @TableField(exist = false) |
| | | private String storePhone; |
| | | } |
| | |
| | | @TableField("otherId") |
| | | private Integer otherId; |
| | | @TableField(exist = false) |
| | | private String jieshao; |
| | | private String intro; |
| | | @TableField(exist = false) |
| | | private String vedio; |
| | | private String video; |
| | | |
| | | |
| | | @Override |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | List<BaseVo> queryStoreLists(String lon, String lat) throws Exception; |
| | | List<BaseVo> queryStoreLists(String lon, String lat,String cityCode) throws Exception; |
| | | |
| | | |
| | | /** |
| | |
| | | // } |
| | | if (strings.contains(timeRange)){ |
| | | orderDto.setSelectable(0); |
| | | }else { |
| | | orderDto.setSelectable(1); |
| | | } |
| | | |
| | | |
| | |
| | | * @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; |
| | | } |
| | |
| | | |
| | | |
| | | <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 !="" |