Jelajahi Sumber

查询条件慢查询,修改

yuhongqi 3 minggu lalu
induk
melakukan
40b0145de2

+ 1 - 6
fs-admin/src/main/java/com/fs/live/controller/LiveOrderPaymentController.java

@@ -59,9 +59,6 @@ public class LiveOrderPaymentController extends BaseController
         }
         startPage();
         List<LiveOrderPaymentVo> list = liveOrderPaymentService.selectLiveOrderPaymentVoList(liveOrderPayment);
-        for (LiveOrderPaymentVo vo : list){
-            vo.setUserPhone(ParseUtils.parsePhone(vo.getUserPhone()));
-        }
         return getDataTable(list);
     }
 
@@ -83,9 +80,7 @@ public class LiveOrderPaymentController extends BaseController
         }
         PageHelper.startPage(1, 10000, "");
         List<LiveOrderPaymentVo> list = liveOrderPaymentService.selectLiveOrderPaymentVoList(liveOrderPayment);
-        for (LiveOrderPaymentVo vo : list){
-            vo.setUserPhone(vo.getUserPhone() == null ? "" : vo.getUserPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
-        }
+
         ExcelUtil<LiveOrderPaymentVo> util = new ExcelUtil<LiveOrderPaymentVo>(LiveOrderPaymentVo.class);
         return util.exportExcel(list, "直播订单支付记录");
     }

+ 3 - 1
fs-service-system/src/main/java/com/fs/live/service/impl/LiveOrderPaymentServiceImpl.java

@@ -3,6 +3,7 @@ package com.fs.live.service.impl;
 
 import cn.hutool.core.util.ObjectUtil;
 import com.fs.common.utils.DateUtils;
+import com.fs.common.utils.ParseUtils;
 import com.fs.huifuPay.domain.HuiFuQueryOrderResult;
 import com.fs.huifuPay.sdk.opps.core.request.V2TradePaymentScanpayQueryRequest;
 import com.fs.huifuPay.service.HuiFuService;
@@ -65,8 +66,8 @@ public class LiveOrderPaymentServiceImpl implements ILiveOrderPaymentService {
     private FsStoreProductMapper fsStoreProductMapper;
     @Override
     public List<LiveOrderPaymentVo> selectLiveOrderPaymentVoList(LiveOrderPaymentVo liveOrderPayment) {
-        Map<Long, FsStoreProduct> productMap = fsStoreProductMapper.selectAllProductName();
         List<LiveOrderPaymentVo> liveOrderPaymentVos = baseMapper.selectLiveOrderPaymentVoList(liveOrderPayment);
+        Map<Long, FsStoreProduct> productMap = fsStoreProductMapper.selectAllProductName();
 
         for (LiveOrderPaymentVo vo : liveOrderPaymentVos) {
             if(ObjectUtil.isNotNull(vo.getProductId())){
@@ -75,6 +76,7 @@ public class LiveOrderPaymentServiceImpl implements ILiveOrderPaymentService {
                     vo.setPackageTitle(fsStoreProduct.getProductName());
                 }
             }
+            vo.setUserPhone(ParseUtils.parsePhone(vo.getUserPhone()));
         }
         return liveOrderPaymentVos;
     }