| | |
| | | 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; |
| | | |
| | |
| | | @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); |
| | | } |
| | | } |
| | | } |