skyouc
1 天以前 4e0470a90f640f57d8f8af6708eb05f77bf561dd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package com.vincent.rsf.server.api.controller.erp;
 
import com.vincent.rsf.framework.common.R;
import com.vincent.rsf.framework.exception.CoolException;
import com.vincent.rsf.server.api.controller.erp.params.ReportParams;
import com.vincent.rsf.server.api.service.ReportMsgService;
import com.vincent.rsf.server.system.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
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.Objects;
 
/**
 * @author Ryan
 * @version 1.0
 * @title ReportMsgController
 * @description
 * @create 2025/3/12 17:00
 */
@RestController
@RequestMapping("/report")
@Api(tags = "上报信息接口管理器")
public class ReportMsgController extends BaseController {
 
    @Autowired
    private ReportMsgService reportMsgService;
 
    @ApiOperation("完成订单上报")
    @PostMapping("/complete/orders")
    public R reportOrder(@RequestBody ReportParams params) {
        if (Objects.isNull(params)) {
            return R.error("参数不能为空!");
        }
        if (Objects.isNull(params.getOrderType())) {
            return R.error("订单类型不能为空!!");
        }
        if (Objects.isNull(params.getAction()) || params.getAction().isEmpty()) {
            return R.error("上报明细不能为空!!");
        }
 
        return reportMsgService.reportOrders(params);
 
    }
 
}