提交修改

dev-discount
袁野 4 years ago
parent 8c4ce3d92c
commit 7596dd8281
  1. 6
      hai-bweb/src/main/java/com/bweb/controller/HighCouponController.java
  2. 97
      hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java
  3. 2
      hai-bweb/src/main/java/com/bweb/excelListener/ImportCouponListener.java
  4. 2
      hai-cweb/src/main/java/com/cweb/controller/HighCouponController.java
  5. 11
      hai-service/src/main/java/com/hai/service/HighAgentService.java
  6. 4
      hai-service/src/main/java/com/hai/service/impl/HighCouponServiceImpl.java

@ -81,6 +81,8 @@ public class HighCouponController {
|| StringUtils.isBlank(highCoupon.getCouponDesc())
|| highCoupon.getCouponPrice() == null
|| highCoupon.getCouponType() == null
|| highCoupon.getPayType() == null
|| highCoupon.getDisplayArea() == null
|| highCoupon.getSalesEndTime() == null
|| highCoupon.getRecycleDay() == null
|| highCoupon.getLimitNumber()== null
@ -155,6 +157,8 @@ public class HighCouponController {
|| StringUtils.isBlank(highCoupon.getCouponDesc())
|| highCoupon.getCouponPrice() == null
|| highCoupon.getCouponType() == null
|| highCoupon.getPayType() == null
|| highCoupon.getDisplayArea() == null
|| highCoupon.getSalesEndTime() == null
|| highCoupon.getRecycleDay() == null
|| highCoupon.getLimitNumber()== null
@ -326,6 +330,7 @@ public class HighCouponController {
@RequestParam(name = "merchantId", required = false) Long merchantId,
@RequestParam(name = "couponName", required = false) String couponName,
@RequestParam(name = "couponType", required = false) Integer couponType,
@RequestParam(name = "displayArea", required = false) Integer displayArea,
@RequestParam(name = "status", required = false) Integer status,
@RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize, HttpServletRequest request) {
@ -343,6 +348,7 @@ public class HighCouponController {
map.put("merchantId", merchantId);
map.put("couponName", couponName);
map.put("couponType", couponType);
map.put("displayArea", displayArea);
map.put("status", status);
PageHelper.startPage(pageNum, pageSize);

@ -0,0 +1,97 @@
package com.bweb.controller;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.security.SessionObject;
import com.hai.common.security.UserCenter;
import com.hai.common.utils.DateUtil;
import com.hai.common.utils.IDGenerator;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.entity.HighChildOrder;
import com.hai.entity.HighOrder;
import com.hai.model.HighCouponModel;
import com.hai.model.HighUserModel;
import com.hai.model.ResponseData;
import com.hai.service.HighCouponCodeService;
import com.hai.service.HighCouponService;
import com.hai.service.HighOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
* @Auther: 袁野
* @Description:
* @Date: 2021/3/26 23:08
*/
@Controller
@RequestMapping(value = "/highOrder")
@Api(value = "订单接口")
public class HighOrderController {
private static Logger log = LoggerFactory.getLogger(HighMerchantStoreController.class);
@Autowired
private UserCenter userCenter;
@Resource
private HighOrderService highOrderService;
@Resource
private HighCouponService highCouponService;
@Resource
private HighCouponCodeService highCouponCodeService;
@RequestMapping(value = "/getOrderById", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "根据id查询订单详情")
public ResponseData getOrderById(@RequestParam(name = "orderId", required = true) Long orderId) {
try {
return ResponseMsgUtil.success(highOrderService.getOrderById(orderId));
} catch (Exception e) {
log.error("HighOrderController --> getOrderById() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/getOrderList", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "获取用户订单")
public ResponseData getUserOrderList(@RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize,
HttpServletRequest request) {
try {
Map<String,Object> map = new HashMap<>();
PageHelper.startPage(pageNum,pageSize);
return ResponseMsgUtil.success(new PageInfo<>(highCouponService.getCouponList(map)));
} catch (Exception e) {
log.error("HighOrderController --> getUserOrderList() error!", e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -49,7 +49,7 @@ public class ImportCouponListener extends AnalysisEventListener<ImportCouponMode
}
List<HighCouponCode> collect = allCouponCode.stream().filter(o -> o.getSalesCode().equals(importCouponModel.getSalesCode())).collect(Collectors.toList());
if (collect != null && collect.size() > 0) {
if (collect.size() > 0) {
importCouponModel.setErrorMessage("销售码已存在");
errorData.add(importCouponModel);
return;

@ -64,6 +64,7 @@ public class HighCouponController {
@RequestParam(name = "merchantId", required = false) Long merchantId,
@RequestParam(name = "couponName", required = false) String couponName,
@RequestParam(name = "couponType", required = false) Integer couponType,
@RequestParam(name = "displayArea", required = false) Integer displayArea,
@RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize) {
try {
@ -75,6 +76,7 @@ public class HighCouponController {
map.put("merchantId", merchantId);
map.put("couponName", couponName);
map.put("couponType", couponType);
map.put("displayArea", displayArea);
map.put("status", 2);
PageHelper.startPage(pageNum, pageSize);
return ResponseMsgUtil.success(new PageInfo<>(highCouponService.getCouponList(map)));

@ -0,0 +1,11 @@
package com.hai.service;
/**
* @ClassName: HighAgentService
* @Description: 代理商管理
* @author: 袁野
* @date: 2021/03/26 18:20
* @Copyright: 2021 www.high.com Inc. All rights reserved.
*/
public interface HighAgentService {
}

@ -338,6 +338,10 @@ public class HighCouponServiceImpl implements HighCouponService {
criteria.andCouponTypeEqualTo(MapUtils.getInteger(map, "couponType"));
}
if (MapUtils.getInteger(map, "displayArea") != null) {
criteria.andDisplayAreaEqualTo(MapUtils.getInteger(map, "displayArea"));
}
if (MapUtils.getInteger(map, "status") != null) {
criteria.andStatusEqualTo(MapUtils.getInteger(map, "status"));
}

Loading…
Cancel
Save