diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighCouponController.java b/hai-cweb/src/main/java/com/cweb/controller/HighCouponController.java index eeb02db6..6239eb89 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighCouponController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighCouponController.java @@ -77,7 +77,7 @@ public class HighCouponController { @RequestMapping(value = "/getCouponList", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "卡卷列表") - public ResponseData getCouponList(@RequestParam(name = "regionId", required = true) String regionId, + public ResponseData getCouponList(@RequestParam(name = "companyId", required = true) String companyId, @RequestParam(name = "merchantId", required = false) Long merchantId, @RequestParam(name = "couponName", required = false) String couponName, @RequestParam(name = "couponType", required = false) Integer couponType, @@ -88,25 +88,18 @@ public class HighCouponController { @RequestParam(name = "pageSize", required = true) Integer pageSize) { try { - SecRegion region = commonService.getParentByRegion(Long.parseLong(regionId)); - if (region != null) { - BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getRegionId().toString()); - if (bsCompany != null) { - Map map = new HashMap<>(); - map.put("companyId", bsCompany.getId()); - map.put("merchantId", merchantId); - map.put("couponName", couponName); - map.put("couponType", couponType); - map.put("brandId", brandId); - map.put("goodsTypeId", goodsTypeId); - map.put("displayArea", displayArea); - map.put("notCouponSource", 2); - map.put("status", 2); - PageHelper.startPage(pageNum, pageSize); - return ResponseMsgUtil.success(new PageInfo<>(highCouponService.getCouponList(map))); - } - } - return ResponseMsgUtil.success(new PageInfo<>()); + Map map = new HashMap<>(); + map.put("companyId", companyId); + map.put("merchantId", merchantId); + map.put("couponName", couponName); + map.put("couponType", couponType); + map.put("brandId", brandId); + map.put("goodsTypeId", goodsTypeId); + map.put("displayArea", displayArea); + map.put("notCouponSource", 2); + map.put("status", 2); + PageHelper.startPage(pageNum, pageSize); + return ResponseMsgUtil.success(new PageInfo<>(highCouponService.getCouponList(map))); } catch (Exception e) { log.error("HighCouponController -> getCouponList() error!", e); diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighDiscountPackageController.java b/hai-cweb/src/main/java/com/cweb/controller/HighDiscountPackageController.java index f80cc680..0036994d 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighDiscountPackageController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighDiscountPackageController.java @@ -57,28 +57,21 @@ public class HighDiscountPackageController { @RequestMapping(value = "/getDiscountPackageList", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "获取优惠券包列表") - public ResponseData getDiscountPackageList(@RequestParam(name = "regionId", required = true) String regionId, + public ResponseData getDiscountPackageList(@RequestParam(name = "companyId", required = true) String companyId, @RequestParam(name = "usingAttribution", required = false) Integer usingAttribution, @RequestParam(name = "title", required = false) String title, @RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageSize", required = true) Integer pageSize) { try { - SecRegion region = commonService.getParentByRegion(Long.parseLong(regionId)); - if (region != null) { - BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getRegionId().toString()); - if (bsCompany != null) { - Map map = new HashMap<>(); - map.put("companyId", bsCompany.getId()); - map.put("usingAttribution", usingAttribution); - map.put("title" , title); - map.put("salesType" , 1); - map.put("status" , 1); - PageHelper.startPage(pageNum, pageSize); - return ResponseMsgUtil.success(new PageInfo<>(highDiscountPackageService.getDiscountPackageList(map))); - } - } - return ResponseMsgUtil.success(new PageInfo<>()); + Map map = new HashMap<>(); + map.put("companyId", companyId); + map.put("usingAttribution", usingAttribution); + map.put("title" , title); + map.put("salesType" , 1); + map.put("status" , 1); + PageHelper.startPage(pageNum, pageSize); + return ResponseMsgUtil.success(new PageInfo<>(highDiscountPackageService.getDiscountPackageList(map))); } catch (Exception e) { log.error("HighDiscountPackageController --> getDiscountPackageList() error!", e); diff --git a/hai-service/src/main/java/com/hai/model/UserModel.java b/hai-service/src/main/java/com/hai/model/UserModel.java index 962f334f..ee418dff 100644 --- a/hai-service/src/main/java/com/hai/model/UserModel.java +++ b/hai-service/src/main/java/com/hai/model/UserModel.java @@ -17,6 +17,9 @@ public class UserModel { // 未使用优惠券数量 private Integer unusedDiscount; + // 停车券余额 + private Integer blxCouponBalance; + // 待支付数量 private Long unpaid; @@ -44,6 +47,14 @@ public class UserModel { // 油卡信息 private Map oilCard; + public Integer getBlxCouponBalance() { + return blxCouponBalance; + } + + public void setBlxCouponBalance(Integer blxCouponBalance) { + this.blxCouponBalance = blxCouponBalance; + } + public Boolean getIsSetOilCard() { return isSetOilCard; }