1
0
Эх сурвалжийг харах

fixed 订单导出功能优惠

fushengqian 10 сар өмнө
parent
commit
af3c503055

+ 1 - 0
fuint-application/src/main/java/com/fuint/common/config/WebConfig.java

@@ -67,6 +67,7 @@ public class WebConfig extends WebMvcConfigurationSupport {
                 .excludePathPatterns("/clientApi/captcha/**")
                 .excludePathPatterns("/backendApi/captcha/**")
                 .excludePathPatterns("/backendApi/userCoupon/exportList")
+                .excludePathPatterns("/backendApi/order/export")
                 .excludePathPatterns("/backendApi/login/**");
 
         // 客户端拦截

+ 17 - 3
fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendOrderController.java

@@ -525,15 +525,18 @@ public class BackendOrderController extends BaseController {
      * @return
      */
     @ApiOperation(value = "导出订单")
-    @RequestMapping(value = "/exportList", method = RequestMethod.GET)
+    @RequestMapping(value = "/export", method = RequestMethod.GET)
     @CrossOrigin
     @PreAuthorize("@pms.hasPermission('order:index')")
-    public void exportList(HttpServletRequest request, HttpServletResponse response) throws Exception {
+    public void export(HttpServletRequest request, HttpServletResponse response) throws Exception {
         String token = request.getParameter("token");
         String storeId = request.getParameter("storeId") == null ? "" : request.getParameter("storeId");
         String userId = request.getParameter("userId") == null ? "" : request.getParameter("userId");
         String mobile = request.getParameter("mobile") == null ? "" : request.getParameter("mobile");
         String status = request.getParameter("status") == null ? "" : request.getParameter("status");
+        String payStatus = request.getParameter("payStatus") == null ? "" : request.getParameter("payStatus");
+        String startTime = request.getParameter("startTime") == null ? "" : request.getParameter("startTime");
+        String endTime = request.getParameter("endTime") == null ? "" : request.getParameter("endTime");
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
@@ -544,7 +547,9 @@ public class BackendOrderController extends BaseController {
         OrderListParam params = new OrderListParam();
         params.setPage(1);
         params.setPageSize(Constants.ALL_ROWS);
-
+        if (accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) {
+            params.setMerchantId(accountInfo.getMerchantId());
+        }
         if (StringUtil.isNotEmpty(storeId)) {
             params.setStoreId(Integer.parseInt(storeId));
         }
@@ -557,6 +562,15 @@ public class BackendOrderController extends BaseController {
         if (StringUtil.isNotEmpty(status)) {
             params.setStatus(status);
         }
+        if (StringUtil.isNotEmpty(payStatus)) {
+            params.setPayStatus(payStatus);
+        }
+        if (StringUtil.isNotEmpty(startTime)) {
+            params.setStartTime(startTime);
+        }
+        if (StringUtil.isNotEmpty(endTime)) {
+            params.setEndTime(endTime);
+        }
 
         PaginationResponse<UserOrderDto> result = orderService.getUserOrderList(params);