|  | @@ -1,14 +1,15 @@
 | 
	
		
			
				|  |  |  package cn.newfeifan.mall.module.distri.controller.admin.ptprofitlog;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.*;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  import javax.annotation.Resource;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  import org.springframework.validation.annotation.Validated;
 | 
	
		
			
				|  |  |  import org.springframework.security.access.prepost.PreAuthorize;
 | 
	
		
			
				|  |  |  import io.swagger.v3.oas.annotations.tags.Tag;
 | 
	
		
			
				|  |  |  import io.swagger.v3.oas.annotations.Parameter;
 | 
	
		
			
				|  |  |  import io.swagger.v3.oas.annotations.Operation;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -import javax.validation.constraints.*;
 | 
	
		
			
				|  |  |  import javax.validation.*;
 | 
	
		
			
				|  |  |  import javax.servlet.http.*;
 | 
	
		
			
				|  |  |  import java.util.*;
 | 
	
	
		
			
				|  | @@ -18,11 +19,13 @@ import cn.newfeifan.mall.framework.common.pojo.PageParam;
 | 
	
		
			
				|  |  |  import cn.newfeifan.mall.framework.common.pojo.PageResult;
 | 
	
		
			
				|  |  |  import cn.newfeifan.mall.framework.common.pojo.CommonResult;
 | 
	
		
			
				|  |  |  import cn.newfeifan.mall.framework.common.util.object.BeanUtils;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  import static cn.newfeifan.mall.framework.common.pojo.CommonResult.success;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import cn.newfeifan.mall.framework.excel.core.util.ExcelUtils;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import cn.newfeifan.mall.framework.operatelog.core.annotations.OperateLog;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  import static cn.newfeifan.mall.framework.operatelog.core.enums.OperateTypeEnum.*;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import cn.newfeifan.mall.module.distri.controller.admin.ptprofitlog.vo.*;
 | 
	
	
		
			
				|  | @@ -75,8 +78,9 @@ public class PtProfitLogController {
 | 
	
		
			
				|  |  |      @Operation(summary = "获得平台利润记录分页")
 | 
	
		
			
				|  |  |      @PreAuthorize("@ss.hasPermission('distri:pt-profit-log:query')")
 | 
	
		
			
				|  |  |      public CommonResult<PageResult<PtProfitLogRespVO>> getPtProfitLogPage(@Valid PtProfitLogPageReqVO pageReqVO) {
 | 
	
		
			
				|  |  | -        PageResult<PtProfitLogDO> pageResult = ptProfitLogService.getPtProfitLogPage(pageReqVO);
 | 
	
		
			
				|  |  | -        return success(BeanUtils.toBean(pageResult, PtProfitLogRespVO.class));
 | 
	
		
			
				|  |  | +        PageResult<PtProfitLogRespVO> pageResult = ptProfitLogService.getPtProfitLogPage(pageReqVO);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        return success(pageResult);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @GetMapping("/export-excel")
 | 
	
	
		
			
				|  | @@ -84,12 +88,11 @@ public class PtProfitLogController {
 | 
	
		
			
				|  |  |      @PreAuthorize("@ss.hasPermission('distri:pt-profit-log:export')")
 | 
	
		
			
				|  |  |      @OperateLog(type = EXPORT)
 | 
	
		
			
				|  |  |      public void exportPtProfitLogExcel(@Valid PtProfitLogPageReqVO pageReqVO,
 | 
	
		
			
				|  |  | -              HttpServletResponse response) throws IOException {
 | 
	
		
			
				|  |  | +                                       HttpServletResponse response) throws IOException {
 | 
	
		
			
				|  |  |          pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
 | 
	
		
			
				|  |  | -        List<PtProfitLogDO> list = ptProfitLogService.getPtProfitLogPage(pageReqVO).getList();
 | 
	
		
			
				|  |  | +        List<PtProfitLogRespVO> list = ptProfitLogService.getPtProfitLogPage(pageReqVO).getList();
 | 
	
		
			
				|  |  |          // 导出 Excel
 | 
	
		
			
				|  |  | -        ExcelUtils.write(response, "平台利润记录.xls", "数据", PtProfitLogRespVO.class,
 | 
	
		
			
				|  |  | -                        BeanUtils.toBean(list, PtProfitLogRespVO.class));
 | 
	
		
			
				|  |  | +        ExcelUtils.write(response, "平台利润记录.xls", "数据", PtProfitLogRespVO.class,list);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  }
 |