From f447e624f2b784568c06b031ffb07a29eadfddc4 Mon Sep 17 00:00:00 2001 From: yuanye <418471657@qq.com> Date: Sun, 28 Mar 2021 10:11:24 +0800 Subject: [PATCH] 1 --- .../executionHistory/executionHistory.lock | Bin 0 -> 17 bytes .gradle/6.7/fileChanges/last-build.bin | Bin 0 -> 1 bytes .gradle/6.7/fileHashes/fileHashes.lock | Bin 0 -> 17 bytes .gradle/6.7/gc.properties | 0 .../buildOutputCleanup.lock | Bin 0 -> 17 bytes .gradle/buildOutputCleanup/cache.properties | 2 ++ .gradle/checksums/checksums.lock | Bin 0 -> 17 bytes .gradle/configuration-cache/gc.properties | 0 .gradle/vcs-1/gc.properties | 0 .../bweb/controller/HighOrderController.java | 31 ++++++++++-------- .../impl/HighCouponCodeServiceImpl.java | 2 +- 11 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 .gradle/6.7/executionHistory/executionHistory.lock create mode 100644 .gradle/6.7/fileChanges/last-build.bin create mode 100644 .gradle/6.7/fileHashes/fileHashes.lock create mode 100644 .gradle/6.7/gc.properties create mode 100644 .gradle/buildOutputCleanup/buildOutputCleanup.lock create mode 100644 .gradle/buildOutputCleanup/cache.properties create mode 100644 .gradle/checksums/checksums.lock create mode 100644 .gradle/configuration-cache/gc.properties create mode 100644 .gradle/vcs-1/gc.properties diff --git a/.gradle/6.7/executionHistory/executionHistory.lock b/.gradle/6.7/executionHistory/executionHistory.lock new file mode 100644 index 0000000000000000000000000000000000000000..8be8d3ca999fb9c595fe55e482714bea4eeaafd8 GIT binary patch literal 17 TcmZRcFm3u7W7Tt$8K3|FHQoe9 literal 0 HcmV?d00001 diff --git a/.gradle/6.7/fileChanges/last-build.bin b/.gradle/6.7/fileChanges/last-build.bin new file mode 100644 index 0000000000000000000000000000000000000000..f76dd238ade08917e6712764a16a22005a50573d GIT binary patch literal 1 IcmZPo000310RR91 literal 0 HcmV?d00001 diff --git a/.gradle/6.7/fileHashes/fileHashes.lock b/.gradle/6.7/fileHashes/fileHashes.lock new file mode 100644 index 0000000000000000000000000000000000000000..64eff9fa08736464c16cc2e796f95092c2139476 GIT binary patch literal 17 TcmZRsHvIpFRX$`Z0~7!NFZTn; literal 0 HcmV?d00001 diff --git a/.gradle/6.7/gc.properties b/.gradle/6.7/gc.properties new file mode 100644 index 00000000..e69de29b diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000000000000000000000000000000000000..c700021ecbd915bf96a191a64d69050194b8dd4a GIT binary patch literal 17 UcmZR6v5dF*%D>a;3=qHw06;?pCjbBd literal 0 HcmV?d00001 diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 00000000..fb88ba16 --- /dev/null +++ b/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Tue Mar 09 11:14:27 CST 2021 +gradle.version=6.7 diff --git a/.gradle/checksums/checksums.lock b/.gradle/checksums/checksums.lock new file mode 100644 index 0000000000000000000000000000000000000000..d464ca36a870bdce521875420fe992389432eb00 GIT binary patch literal 17 ScmZQB6ifMBrKk3r0SW*tZUd_T literal 0 HcmV?d00001 diff --git a/.gradle/configuration-cache/gc.properties b/.gradle/configuration-cache/gc.properties new file mode 100644 index 00000000..e69de29b diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties new file mode 100644 index 00000000..e69de29b diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java b/hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java index 43a08209..0525c322 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java @@ -7,14 +7,9 @@ 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.model.UserInfoModel; import com.hai.service.HighCouponCodeService; import com.hai.service.HighCouponService; import com.hai.service.HighOrderService; @@ -28,8 +23,6 @@ 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; @@ -74,20 +67,32 @@ public class HighOrderController { } - @RequestMapping(value = "/getOrderList", method = RequestMethod.GET) + @RequestMapping(value = "/getOrderCouponList", method = RequestMethod.GET) @ResponseBody - @ApiOperation(value = "获取用户订单") + @ApiOperation(value = "获取卡券订单列表") public ResponseData getUserOrderList(@RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageSize", required = true) Integer pageSize, + @RequestParam(name = "status", required = false) Integer status, + @RequestParam(name = "couponId", required = false) Integer couponId, + @RequestParam(name = "salesCode", required = false) Integer salesCode, HttpServletRequest request) { try { - - Map map = new HashMap<>(); + SessionObject sessionObject = userCenter.getSessionObject(request); + UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject(); + if (userInfoModel.getBsCompany() == null) { + log.error("HighCouponController -> getCouponList() error!","权限不足"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, ""); + } +// map.put("companyId", userInfoModel.getBsCompany().getId()); + map.put("couponId", couponId); + map.put("salesCode", salesCode); + map.put("status", status); + PageHelper.startPage(pageNum,pageSize); - return ResponseMsgUtil.success(new PageInfo<>(highCouponService.getCouponList(map))); + return ResponseMsgUtil.success(new PageInfo<>(highCouponCodeService.getCouponCodeList(map))); } catch (Exception e) { log.error("HighOrderController --> getUserOrderList() error!", e); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java index 9002bb4b..2cdeb6d9 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java @@ -110,7 +110,7 @@ public class HighCouponCodeServiceImpl implements HighCouponCodeService { @Override public Integer getStockCountByCoupon(Long couponId) { HighCouponCodeExample example = new HighCouponCodeExample(); - example.createCriteria().andCouponIdEqualTo(couponId).andStatusEqualTo(1).andSalesEndTimeLessThan(new Date()); + example.createCriteria().andCouponIdEqualTo(couponId).andStatusEqualTo(1).andSalesEndTimeGreaterThan(new Date()); return highCouponCodeMapper.selectByExample(example).size(); }