|  | @@ -1,10 +1,18 @@
 | 
	
		
			
				|  |  |  package cn.newfeifan.mall.module.trade.controller.admin.order;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import cn.hutool.core.collection.CollUtil;
 | 
	
		
			
				|  |  | +import cn.hutool.core.collection.CollectionUtil;
 | 
	
		
			
				|  |  |  import cn.newfeifan.mall.framework.common.pojo.CommonResult;
 | 
	
		
			
				|  |  |  import cn.newfeifan.mall.framework.common.pojo.PageResult;
 | 
	
		
			
				|  |  |  import cn.newfeifan.mall.module.member.api.user.MemberUserApi;
 | 
	
		
			
				|  |  |  import cn.newfeifan.mall.module.member.api.user.dto.MemberUserRespDTO;
 | 
	
		
			
				|  |  | +import cn.newfeifan.mall.module.pay.controller.admin.order.vo.PayOrderPageItemRespVO;
 | 
	
		
			
				|  |  | +import cn.newfeifan.mall.module.pay.controller.admin.order.vo.PayOrderPageReqVO;
 | 
	
		
			
				|  |  | +import cn.newfeifan.mall.module.pay.convert.order.PayOrderConvert;
 | 
	
		
			
				|  |  | +import cn.newfeifan.mall.module.pay.dal.dataobject.app.PayAppDO;
 | 
	
		
			
				|  |  | +import cn.newfeifan.mall.module.pay.dal.dataobject.order.PayOrderDO;
 | 
	
		
			
				|  |  | +import cn.newfeifan.mall.module.pay.service.app.PayAppService;
 | 
	
		
			
				|  |  | +import cn.newfeifan.mall.module.pay.service.order.PayOrderService;
 | 
	
		
			
				|  |  |  import cn.newfeifan.mall.module.trade.controller.admin.order.vo.*;
 | 
	
		
			
				|  |  |  import cn.newfeifan.mall.module.trade.convert.order.TradeOrderConvert;
 | 
	
		
			
				|  |  |  import cn.newfeifan.mall.module.trade.dal.dataobject.delivery.DeliveryExpressDO;
 | 
	
	
		
			
				|  | @@ -30,6 +38,7 @@ import org.springframework.validation.annotation.Validated;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.*;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import javax.annotation.Resource;
 | 
	
		
			
				|  |  | +import javax.validation.Valid;
 | 
	
		
			
				|  |  |  import java.util.*;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import static cn.newfeifan.mall.framework.common.pojo.CommonResult.success;
 | 
	
	
		
			
				|  | @@ -60,6 +69,12 @@ public class TradeOrderController {
 | 
	
		
			
				|  |  |      @Resource
 | 
	
		
			
				|  |  |      private AfterSaleService afterSaleService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    @Resource
 | 
	
		
			
				|  |  | +    private PayOrderService orderService;
 | 
	
		
			
				|  |  | +    @Resource
 | 
	
		
			
				|  |  | +    private PayAppService appService;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      @GetMapping("/page")
 | 
	
		
			
				|  |  |      @Operation(summary = "获得交易订单分页")
 | 
	
		
			
				|  |  |      @PreAuthorize("@ss.hasPermission('trade:order:query')")
 | 
	
	
		
			
				|  | @@ -203,4 +218,23 @@ public class TradeOrderController {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    @GetMapping("/pay/page")
 | 
	
		
			
				|  |  | +    @Operation(summary = "获得支付订单分页")
 | 
	
		
			
				|  |  | +    @PreAuthorize("@ss.hasPermission('pay:order:query')")
 | 
	
		
			
				|  |  | +    public CommonResult<PageResult<PayOrderPageItemRespVO>> getOrderPage(@Valid PayOrderPageReqVO pageVO) {
 | 
	
		
			
				|  |  | +        PageResult<PayOrderDO> pageResult = orderService.getOrderPage(pageVO);
 | 
	
		
			
				|  |  | +        if (CollectionUtil.isEmpty(pageResult.getList())) {
 | 
	
		
			
				|  |  | +            return success(new PageResult<>(pageResult.getTotal()));
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        // 拼接返回
 | 
	
		
			
				|  |  | +        Map<Long, PayAppDO> appMap = appService.getAppMap(convertList(pageResult.getList(), PayOrderDO::getAppId));
 | 
	
		
			
				|  |  | +        PageResult<PayOrderPageItemRespVO> data = PayOrderConvert.INSTANCE.convertPage(pageResult, appMap);
 | 
	
		
			
				|  |  | +        List<PayOrderPageItemRespVO> list = tradeOrderQueryService.getOrderNoAndPicUrl(data.getList());
 | 
	
		
			
				|  |  | +        data.setList(list);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        return success(data);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  }
 |