袁野 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)
@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<String, Object> 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<String, Object> 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);

@ -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<String, Object> 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<String, Object> 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);

@ -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<String, Object> oilCard;
public Integer getBlxCouponBalance() {
return blxCouponBalance;
}
public void setBlxCouponBalance(Integer blxCouponBalance) {
this.blxCouponBalance = blxCouponBalance;
}
public Boolean getIsSetOilCard() {
return isSetOilCard;
}

Loading…
Cancel
Save