'修复已知问题'

dev-discount
199901012 4 years ago
parent a9b29dff68
commit 4940188ce8
  1. 14
      hai-bweb/src/main/java/com/bweb/controller/HighDiscountController.java
  2. 1
      hai-cweb/src/main/java/com/cweb/controller/HighCouponController.java
  3. 6
      hai-service/src/main/java/com/hai/service/impl/HighCouponServiceImpl.java

@ -88,6 +88,8 @@ public class HighDiscountController {
highDiscount.setCompanyId(userInfoModel.getBsCompany().getId());
highDiscount.setOperatorId(userInfoModel.getSecUser().getId());
highDiscount.setOperatorName(userInfoModel.getSecUser().getUserName());
highDiscount.setCreateTime(new Date());
highDiscount.setUpdateTime(new Date());
highDiscount.setStatus(1);
highDiscountService.insertDiscount(highDiscount);
@ -136,7 +138,7 @@ public class HighDiscountController {
discount.setDiscountImg(highDiscount.getDiscountImg());
discount.setDiscountCarouselImg(highDiscount.getDiscountCarouselImg());
discount.setEffectiveDay(highDiscount.getEffectiveDay());
discount.setUpdateTime(new Date());
highDiscountService.updateDiscount(highDiscount);
return ResponseMsgUtil.success("操作成功");
@ -192,10 +194,16 @@ public class HighDiscountController {
@RequestParam(name = "discountName", required = false) String discountName,
@RequestParam(name = "discountType", required = false) Integer discountType,
@RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize) {
@RequestParam(name = "pageSize", required = true) Integer pageSize, HttpServletRequest request) {
try {
SessionObject sessionObject = userCenter.getSessionObject(request);
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject();
if (userInfoModel.getBsCompany() == null) {
log.error("HighDiscountController -> updateDiscount() error!","该主角色没有权限");
throw ErrorHelp.genException(SysCode.System, ErrorCode.MENU_TREE_HAS_NOT_ERROR, "");
}
Map<String, Object> map = new HashMap<>();
map.put("companyId", userInfoModel.getBsCompany().getId());
map.put("discountKey", discountKey);
map.put("discountName", discountName);
map.put("discountType", discountType);

@ -81,6 +81,7 @@ public class HighCouponController {
map.put("couponName", couponName);
map.put("couponType", couponType);
map.put("displayArea", displayArea);
map.put("notCouponSource", 2);
map.put("status", 2);
PageHelper.startPage(pageNum, pageSize);
return ResponseMsgUtil.success(new PageInfo<>(highCouponService.getCouponList(map)));

@ -355,8 +355,10 @@ public class HighCouponServiceImpl implements HighCouponService {
if (MapUtils.getInteger(map, "couponSource") != null) {
criteria.andCouponSourceEqualTo(MapUtils.getInteger(map, "status"));
} else {
criteria.andCouponSourceNotEqualTo(2);
}
if (MapUtils.getInteger(map, "notCouponSource") != null) {
criteria.andCouponSourceNotEqualTo(MapUtils.getInteger(map, "notCouponSource"));
}
example.setOrderByClause("create_time desc");

Loading…
Cancel
Save