|
|
@@ -1,7 +1,8 @@
|
|
|
package com.sckw.report.controller.operator;
|
|
|
|
|
|
-import com.sckw.core.exception.BusinessException;
|
|
|
+import com.sckw.core.exception.CustomPromptException;
|
|
|
import com.sckw.core.utils.CollectionUtils;
|
|
|
+import com.sckw.core.web.constant.HttpStatus;
|
|
|
import com.sckw.core.web.response.HttpResult;
|
|
|
import com.sckw.excel.utils.ExcelUtil;
|
|
|
import com.sckw.report.model.vo.OperatorTOrderContractParam;
|
|
|
@@ -14,7 +15,10 @@ import jakarta.servlet.http.HttpServletResponse;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.springframework.http.MediaType;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
@@ -67,7 +71,7 @@ public class TradeOrderManageController {
|
|
|
public void listExport(@RequestBody @Validated OperatorTOrderExportQueryVO params, HttpServletResponse response) {
|
|
|
List<TradeOrderListExport> list = tradeOrderManageService.export(params);
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
- throw new BusinessException("暂无数据,请确认");
|
|
|
+ throw new CustomPromptException(HttpStatus.SUCCESS_CODE, "暂无数据,请确认");
|
|
|
}
|
|
|
ExcelUtil.downData(response, TradeOrderListExport.class, list);
|
|
|
}
|