袁野 1 year ago
parent a8994fa4bc
commit 752f084954
  1. 33
      hai-cweb/src/main/java/com/cweb/controller/HighCouponController.java
  2. 25
      hai-cweb/src/main/java/com/cweb/controller/HighDiscountPackageController.java
  3. 11
      hai-service/src/main/java/com/hai/model/UserModel.java

@ -77,7 +77,7 @@ public class HighCouponController {
@RequestMapping(value = "/getCouponList", method = RequestMethod.GET) @RequestMapping(value = "/getCouponList", method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "卡卷列表") @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 = "merchantId", required = false) Long merchantId,
@RequestParam(name = "couponName", required = false) String couponName, @RequestParam(name = "couponName", required = false) String couponName,
@RequestParam(name = "couponType", required = false) Integer couponType, @RequestParam(name = "couponType", required = false) Integer couponType,
@ -88,25 +88,18 @@ public class HighCouponController {
@RequestParam(name = "pageSize", required = true) Integer pageSize) { @RequestParam(name = "pageSize", required = true) Integer pageSize) {
try { try {
SecRegion region = commonService.getParentByRegion(Long.parseLong(regionId)); Map<String, Object> map = new HashMap<>();
if (region != null) { map.put("companyId", companyId);
BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getRegionId().toString()); map.put("merchantId", merchantId);
if (bsCompany != null) { map.put("couponName", couponName);
Map<String, Object> map = new HashMap<>(); map.put("couponType", couponType);
map.put("companyId", bsCompany.getId()); map.put("brandId", brandId);
map.put("merchantId", merchantId); map.put("goodsTypeId", goodsTypeId);
map.put("couponName", couponName); map.put("displayArea", displayArea);
map.put("couponType", couponType); map.put("notCouponSource", 2);
map.put("brandId", brandId); map.put("status", 2);
map.put("goodsTypeId", goodsTypeId); PageHelper.startPage(pageNum, pageSize);
map.put("displayArea", displayArea); return ResponseMsgUtil.success(new PageInfo<>(highCouponService.getCouponList(map)));
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<>());
} catch (Exception e) { } catch (Exception e) {
log.error("HighCouponController -> getCouponList() error!", e); log.error("HighCouponController -> getCouponList() error!", e);

@ -57,28 +57,21 @@ public class HighDiscountPackageController {
@RequestMapping(value = "/getDiscountPackageList", method = RequestMethod.GET) @RequestMapping(value = "/getDiscountPackageList", method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "获取优惠券包列表") @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 = "usingAttribution", required = false) Integer usingAttribution,
@RequestParam(name = "title", required = false) String title, @RequestParam(name = "title", required = false) String title,
@RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize) { @RequestParam(name = "pageSize", required = true) Integer pageSize) {
try { try {
SecRegion region = commonService.getParentByRegion(Long.parseLong(regionId)); Map<String, Object> map = new HashMap<>();
if (region != null) { map.put("companyId", companyId);
BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getRegionId().toString()); map.put("usingAttribution", usingAttribution);
if (bsCompany != null) { map.put("title" , title);
Map<String, Object> map = new HashMap<>(); map.put("salesType" , 1);
map.put("companyId", bsCompany.getId()); map.put("status" , 1);
map.put("usingAttribution", usingAttribution); PageHelper.startPage(pageNum, pageSize);
map.put("title" , title); return ResponseMsgUtil.success(new PageInfo<>(highDiscountPackageService.getDiscountPackageList(map)));
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<>());
} catch (Exception e) { } catch (Exception e) {
log.error("HighDiscountPackageController --> getDiscountPackageList() error!", e); log.error("HighDiscountPackageController --> getDiscountPackageList() error!", e);

@ -17,6 +17,9 @@ public class UserModel {
// 未使用优惠券数量 // 未使用优惠券数量
private Integer unusedDiscount; private Integer unusedDiscount;
// 停车券余额
private Integer blxCouponBalance;
// 待支付数量 // 待支付数量
private Long unpaid; private Long unpaid;
@ -44,6 +47,14 @@ public class UserModel {
// 油卡信息 // 油卡信息
private Map<String, Object> oilCard; private Map<String, Object> oilCard;
public Integer getBlxCouponBalance() {
return blxCouponBalance;
}
public void setBlxCouponBalance(Integer blxCouponBalance) {
this.blxCouponBalance = blxCouponBalance;
}
public Boolean getIsSetOilCard() { public Boolean getIsSetOilCard() {
return isSetOilCard; return isSetOilCard;
} }

Loading…
Cancel
Save