'修复已知问题'

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

@ -105,7 +105,7 @@ public class HighDiscountAgentRelController {
// 生成二维码 // 生成二维码
String qrCodeImg = DateUtil.date2String(new Date(),agent.getId() + discount.getId() + "yyyyMMddHHmmss") + IDGenerator.nextId(2) +".png"; String qrCodeImg = DateUtil.date2String(new Date(),agent.getId() + discount.getId() + "yyyyMMddHHmmss") + IDGenerator.nextId(2) +".png";
String qrCodeUrl = SysConst.getSysConfig().getAgentQrCode() + "/ " + qrCodeImg; String qrCodeUrl = SysConst.getSysConfig().getAgentQrCode() + "/" + qrCodeImg;
//参数 //参数
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();

@ -88,6 +88,8 @@ public class HighDiscountController {
highDiscount.setCompanyId(userInfoModel.getBsCompany().getId()); highDiscount.setCompanyId(userInfoModel.getBsCompany().getId());
highDiscount.setOperatorId(userInfoModel.getSecUser().getId()); highDiscount.setOperatorId(userInfoModel.getSecUser().getId());
highDiscount.setOperatorName(userInfoModel.getSecUser().getUserName()); highDiscount.setOperatorName(userInfoModel.getSecUser().getUserName());
highDiscount.setCreateTime(new Date());
highDiscount.setUpdateTime(new Date());
highDiscount.setStatus(1); highDiscount.setStatus(1);
highDiscountService.insertDiscount(highDiscount); highDiscountService.insertDiscount(highDiscount);
@ -136,7 +138,7 @@ public class HighDiscountController {
discount.setDiscountImg(highDiscount.getDiscountImg()); discount.setDiscountImg(highDiscount.getDiscountImg());
discount.setDiscountCarouselImg(highDiscount.getDiscountCarouselImg()); discount.setDiscountCarouselImg(highDiscount.getDiscountCarouselImg());
discount.setEffectiveDay(highDiscount.getEffectiveDay()); discount.setEffectiveDay(highDiscount.getEffectiveDay());
discount.setUpdateTime(new Date());
highDiscountService.updateDiscount(highDiscount); highDiscountService.updateDiscount(highDiscount);
return ResponseMsgUtil.success("操作成功"); return ResponseMsgUtil.success("操作成功");
@ -192,10 +194,16 @@ public class HighDiscountController {
@RequestParam(name = "discountName", required = false) String discountName, @RequestParam(name = "discountName", required = false) String discountName,
@RequestParam(name = "discountType", required = false) Integer discountType, @RequestParam(name = "discountType", required = false) Integer discountType,
@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, HttpServletRequest request) {
try { 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<String, Object> map = new HashMap<>();
map.put("companyId", userInfoModel.getBsCompany().getId());
map.put("discountKey", discountKey); map.put("discountKey", discountKey);
map.put("discountName", discountName); map.put("discountName", discountName);
map.put("discountType", discountType); map.put("discountType", discountType);

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

@ -355,8 +355,10 @@ public class HighCouponServiceImpl implements HighCouponService {
if (MapUtils.getInteger(map, "couponSource") != null) { if (MapUtils.getInteger(map, "couponSource") != null) {
criteria.andCouponSourceEqualTo(MapUtils.getInteger(map, "status")); 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"); example.setOrderByClause("create_time desc");

Loading…
Cancel
Save