刘小明
2024-06-24 03ec5826348fe924243eb797559aef91afa98086
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
package com.dy.pmsStation.assemblyStep;
 
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
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;
 
/**
 *记录组装各步骤
 */
@Slf4j
@RestController
@RequestMapping(path = "assemblyStep")
public class AssemblyStepCtrl {
    private AssemblyStepSv sv;
    @Autowired
    public void setSv(AssemblyStepSv sv) {
        this.sv = sv;
    }
 
    @PostMapping(path = "save")
    public BaseResponse save(@RequestBody @Valid QueryVo vo) {
        log.info("AssemblyStepCtrl.test()");
        int count = sv.save(vo);
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
}