diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighCouponController.java b/hai-bweb/src/main/java/com/bweb/controller/HighCouponController.java index 801d78f7..d19ab28e 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighCouponController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighCouponController.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); diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java b/hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java new file mode 100644 index 00000000..43a08209 --- /dev/null +++ b/hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java @@ -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 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); + } + } +} diff --git a/hai-bweb/src/main/java/com/bweb/excelListener/ImportCouponListener.java b/hai-bweb/src/main/java/com/bweb/excelListener/ImportCouponListener.java index 467f2d50..d926e569 100644 --- a/hai-bweb/src/main/java/com/bweb/excelListener/ImportCouponListener.java +++ b/hai-bweb/src/main/java/com/bweb/excelListener/ImportCouponListener.java @@ -49,7 +49,7 @@ public class ImportCouponListener extends AnalysisEventListener 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; diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighCouponController.java b/hai-cweb/src/main/java/com/cweb/controller/HighCouponController.java index 2c6c5784..a8a21463 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighCouponController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighCouponController.java @@ -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))); diff --git a/hai-service/src/main/java/com/hai/service/HighAgentService.java b/hai-service/src/main/java/com/hai/service/HighAgentService.java new file mode 100644 index 00000000..f37d3f1e --- /dev/null +++ b/hai-service/src/main/java/com/hai/service/HighAgentService.java @@ -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 { +} diff --git a/hai-service/src/main/java/com/hai/service/impl/HighCouponServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighCouponServiceImpl.java index 495364de..2cbe4f05 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighCouponServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighCouponServiceImpl.java @@ -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")); }