|
|
|
@@ -340,7 +340,9 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public ResultData listAdminAsPage(WxCouponOrderBVo wxCouponOrderBVo, Integer pageIndex, Integer pageSize) { |
|
|
|
long times1 = System.currentTimeMillis(); |
|
|
|
handleWxCouponOrderBVoQueryParam(wxCouponOrderBVo); |
|
|
|
logger.info(">>>>>>>>>>>>>>>>>>>init queryparam:"+(System.currentTimeMillis()-times1)); |
|
|
|
PageInfo<WxCouponOrderBVo> pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponOrderMapper.findListOfAdmin(wxCouponOrderBVo)); |
|
|
|
if (null != pageInfo && null != pageInfo.getList()){ |
|
|
|
handleQueryResult(pageInfo.getList(), wxCouponOrderBVo); |
|
|
|
@@ -494,6 +496,8 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { |
|
|
|
private void handleQueryResult(List<WxCouponOrderBVo> list,TenantEntity tenantEntity) { |
|
|
|
if (null != list ) { |
|
|
|
|
|
|
|
long times1 = System.currentTimeMillis(); |
|
|
|
|
|
|
|
WxMerchant merchantQ = new WxMerchant(); |
|
|
|
merchantQ.updateTenantInfo(tenantEntity); |
|
|
|
List<WxMerchant> merchantList = wxMerchantMapper.findIdNameList(merchantQ); |
|
|
|
@@ -504,6 +508,8 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
long times2 = System.currentTimeMillis(); |
|
|
|
logger.info(">>>>>>>>>>>>>>>>>>>>>> query merchant :"+(times2-times1)); |
|
|
|
WxCoupon couponQ = new WxCoupon(); |
|
|
|
couponQ.updateTenantInfo(tenantEntity); |
|
|
|
List<WxCoupon> couponList = wxCouponMapper.findList(couponQ); |
|
|
|
@@ -513,7 +519,10 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { |
|
|
|
couponMap.put(c.getId(), c); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
long times3 = System.currentTimeMillis(); |
|
|
|
logger.info(">>>>>>>>>>>>>>>>>>>>>> query coupon :"+(times3-times2)); |
|
|
|
|
|
|
|
|
|
|
|
List<WxMerchantProductVo> merchantProductVos = wxCouponMerchantMapper.findMerchantProduct(tenantEntity.getTenantId(), null); |
|
|
|
Map<Long,Long> merchantProductIdMap = new HashMap<Long,Long>(); |
|
|
|
@@ -527,6 +536,9 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
long times4 = System.currentTimeMillis(); |
|
|
|
logger.info(">>>>>>>>>>>>>>>>>>>>>> query merchantProductVos :"+(times4-times3)); |
|
|
|
|
|
|
|
list.parallelStream().forEach(co -> { |
|
|
|
if (co.getCouponOrderStatus().equals(EnumCouponOrderStatus.COUPON_ORDER_USE_WAIT.getCode())) { |
|
|
|
co.setUpdateDate(null); |
|
|
|
|