| | |
| | | List<IntegralCommodity> commodity = new ArrayList<>(); |
| | | |
| | | Map<String, String> geocode = gdMapGeocodingUtil.geocode(location.getLon(), location.getLat()); |
| | | if(null == geocode){ |
| | | return new ArrayList<>(); |
| | | } |
| | | String provinceCode = geocode.get("provinceCode"); |
| | | String cityCode = geocode.get("cityCode"); |
| | | |
| | | |
| | | // if(null != geocode) { |
| | | |
| | | List<Store> stores = storeClient.queryStoreList(new QueryStoreList(provinceCode, cityCode)); |
| | | Store s = null; |
| | | Double d = 0D; |
| | |
| | | d = wgs84; |
| | | } |
| | | } |
| | | // } |
| | | |
| | | // List<PointsMerchandiseCity> cityCode1 = pmdsCityService.list(new QueryWrapper<PointsMerchandiseCity>().eq("cityCode", cityCode)); |
| | | List<Integer> cIds = new ArrayList<>(); |
| | | // for (PointsMerchandiseCity pointsMerchandiseCity : cityCode1) { |
| | | // cIds.add(pointsMerchandiseCity.getPointsMerchandiseId()); |
| | | // } |
| | | |
| | | List<PointsMerchandiseStore> storesids = pointsMerchandiseStoreService.list(new QueryWrapper<PointsMerchandiseStore>().eq("storeId", s.getId())); |
| | | for (PointsMerchandiseStore storesid : storesids) { |
| | | cIds.add(storesid.getPointsMerchandiseId()); |
| | |
| | | detailsVo.setGoodName(coursePackage.getName()); |
| | | detailsVo.setBelongsScope(merchandise.getUserPopulation()); |
| | | int coursePackageNums = upmseService.count(new QueryWrapper<UserPointsMerchandise>() |
| | | .eq("pointsMerchandiseId", merchandise.getId())); |
| | | .eq("pointsMerchandiseId", merchandise.getId()).eq("payStatus", 2).eq("state", 1)); |
| | | detailsVo.setRedeemedNum(coursePackageNums); |
| | | detailsVo.setResidueNum(Math.max(merchandise.getQuantityIssued() - coursePackageNums, 0)); |
| | | detailsVo.setPerLimit(merchandise.getPickUpQuantity()); |
| | |
| | | detailsVo.setGoodName(merchandise.getName()); |
| | | detailsVo.setBelongsScope(merchandise.getUserPopulation()); |
| | | int count = upmseService.count(new QueryWrapper<UserPointsMerchandise>() |
| | | .eq("pointsMerchandiseId", merchandise.getId())); |
| | | .eq("pointsMerchandiseId", merchandise.getId()).eq("payStatus", 2).eq("state", 1)); |
| | | detailsVo.setRedeemedNum(count); |
| | | detailsVo.setResidueNum(Math.max(merchandise.getQuantityIssued() - count, 0)); |
| | | detailsVo.setPerLimit(merchandise.getPickUpQuantity()); |
| | |
| | | detailsVo.setGoodName(coupon.getName()); |
| | | detailsVo.setBelongsScope(coupon.getUserPopulation()); |
| | | int couponNums = upmseService.count(new QueryWrapper<UserPointsMerchandise>() |
| | | .eq("pointsMerchandiseId", merchandise.getId())); |
| | | .eq("pointsMerchandiseId", merchandise.getId()).eq("payStatus", 2).eq("state", 1)); |
| | | detailsVo.setRedeemedNum(couponNums); |
| | | detailsVo.setResidueNum(Math.max(coupon.getQuantityIssued() - couponNums, 0)); |
| | | detailsVo.setPerLimit(coupon.getPickUpQuantity()); |
| | |
| | | detailsVo.setGoodName(coursePackage.getName()); |
| | | detailsVo.setBelongsScope(merchandise.getUserPopulation()); |
| | | int coursePackageNums = upmseService.count(new QueryWrapper<UserPointsMerchandise>() |
| | | .eq("pointsMerchandiseId", merchandise.getId())); |
| | | .eq("pointsMerchandiseId", merchandise.getId()).eq("payStatus", 2).eq("state", 1)); |
| | | detailsVo.setRedeemedNum(coursePackageNums); |
| | | detailsVo.setResidueNum(Math.max(merchandise.getQuantityIssued() - coursePackageNums, 0)); |
| | | detailsVo.setPerLimit(merchandise.getPickUpQuantity()); |
| | |
| | | detailsVo.setGoodName(merchandise.getName()); |
| | | detailsVo.setBelongsScope(merchandise.getUserPopulation()); |
| | | int count = upmseService.count(new QueryWrapper<UserPointsMerchandise>() |
| | | .eq("pointsMerchandiseId", merchandise.getId())); |
| | | .eq("pointsMerchandiseId", merchandise.getId()).eq("payStatus", 2).eq("state", 1)); |
| | | detailsVo.setRedeemedNum(count); |
| | | detailsVo.setResidueNum(Math.max(merchandise.getQuantityIssued() - count, 0)); |
| | | detailsVo.setPerLimit(merchandise.getPickUpQuantity()); |
| | |
| | | public int queryUserHasGoodsNums(@RequestBody AppUserGoodResp goodResp) { |
| | | int count = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>() |
| | | .eq(UserPointsMerchandise::getUserId, goodResp.getAppUserId()) |
| | | .eq(UserPointsMerchandise::getPointsMerchandiseId, goodResp.getGoodId())); |
| | | .eq(UserPointsMerchandise::getPointsMerchandiseId, goodResp.getGoodId()) |
| | | .eq(UserPointsMerchandise::getPayStatus, 2).eq(UserPointsMerchandise::getState, 1)); |
| | | System.out.println(count); |
| | | return count; |
| | | } |
| | |
| | | @PostMapping("/base/pointMerchars/queryUserHasGoodsNums1") |
| | | public int queryUserHasGoodsNums1(@RequestBody AppUserGoodResp goodResp) { |
| | | int count = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>() |
| | | .eq(UserPointsMerchandise::getPointsMerchandiseId, goodResp.getGoodId())); |
| | | .eq(UserPointsMerchandise::getPointsMerchandiseId, goodResp.getGoodId()) |
| | | .eq(UserPointsMerchandise::getPayStatus, 2).eq(UserPointsMerchandise::getState, 1)); |
| | | System.out.println(count); |
| | | return count; |
| | | } |