|
1
2
3
4
|
package com.order.erp.controller;
import com.order.erp.common.constant.ServerResult;
import com.order.erp.domain.dto.order.OrderProfitAnalysisDO;
|
|
5
|
import com.order.erp.domain.vo.OrderProfitAnalysisVo;
|
|
6
|
import com.order.erp.service.order.OrderProfitAnalysisService;
|
|
7
|
import org.springframework.validation.annotation.Validated;
|
|
8
9
10
11
12
13
|
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 javax.annotation.Resource;
|
|
14
|
import javax.validation.Valid;
|
|
15
|
import java.util.List;
|
|
16
|
import java.util.Map;
|
|
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/**
* @author zhongnanhuang
* @version 1.0
* @project order-erp
* @description 订单利润表控制层
* @date 2023/10/23 11:48:36
*/
@RestController
@RequestMapping("/order/erp/profit")
public class OrderProfitController {
@Resource
OrderProfitAnalysisService orderProfitAnalysisService;
@PostMapping("/analysis")
|
|
33
34
|
public ServerResult analysis(@RequestBody @Validated OrderProfitAnalysisVo orderProfitAnalysisVo){
List<Long> orderIds = orderProfitAnalysisVo.getOrderIds();
|
|
35
36
37
38
39
40
41
42
43
44
|
OrderProfitAnalysisDO orderProfitAnalysisDO = orderProfitAnalysisService.analysisByOrderIds(orderIds);
if (orderProfitAnalysisDO==null){
return ServerResult.fail("找不到订单信息");
}
return ServerResult.success(orderProfitAnalysisDO);
}
}
|