maven
11 小时以前 d8d04100777062a7e720c4eabac650a76e45c8ea
src/main/java/com/ruoyi/procurementrecord/controller/InboundManagementController.java
@@ -10,6 +10,7 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
@@ -36,6 +37,7 @@
    @PostMapping("/add")
    @ApiOperation("到货管理-添加")
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult add(@RequestBody InboundManagement inboundManagement) {
        inboundManagement.setArrivalTime(new Date());
        boolean result = inboundManagementService.save(inboundManagement);
@@ -44,6 +46,7 @@
    @PostMapping("/update")
    @ApiOperation("到货管理-修改")
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult update(@RequestBody InboundManagement inboundManagement) {
        boolean result = inboundManagementService.updateById(inboundManagement);
        return result ? AjaxResult.success() : AjaxResult.error();
@@ -51,6 +54,7 @@
    @DeleteMapping("/del")
    @ApiOperation("到货管理-删除")
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult del(@RequestBody List<Long> ids) {
        if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("请选择至少一条数据");
        boolean result = inboundManagementService.removeByIds(ids);