8ed94dd8 sonin

维保任务删除接口

1 个父辈 c8a177b0
...@@ -8,13 +8,7 @@ import java.util.Map; ...@@ -8,13 +8,7 @@ import java.util.Map;
8 8
9 import org.apache.commons.lang.StringUtils; 9 import org.apache.commons.lang.StringUtils;
10 import org.springframework.beans.factory.annotation.Autowired; 10 import org.springframework.beans.factory.annotation.Autowired;
11 import org.springframework.web.bind.annotation.GetMapping; 11 import org.springframework.web.bind.annotation.*;
12 import org.springframework.web.bind.annotation.PostMapping;
13 import org.springframework.web.bind.annotation.PutMapping;
14 import org.springframework.web.bind.annotation.RequestBody;
15 import org.springframework.web.bind.annotation.RequestMapping;
16 import org.springframework.web.bind.annotation.RequestParam;
17 import org.springframework.web.bind.annotation.RestController;
18 12
19 import com.baomidou.mybatisplus.core.metadata.IPage; 13 import com.baomidou.mybatisplus.core.metadata.IPage;
20 import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 14 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...@@ -125,4 +119,26 @@ public class EquipmentMaintainTaskController { ...@@ -125,4 +119,26 @@ public class EquipmentMaintainTaskController {
125 return result; 119 return result;
126 } 120 }
127 121
122 /**
123 * <pre>
124 * 通过id删除
125 * </pre>
126 * @param id
127 * @return
128 * @author 开发者姓名, 开发时间
129 * @Description: TODO(这里描述这个方法的需求变更情况)
130 */
131 @AutoLog(value = "维保任务-通过id删除")
132 @ApiOperation(value="维保任务-通过id删除", notes="维保任务-通过id删除")
133 @DeleteMapping(value = "/delete")
134 public Result<?> delete(@RequestParam(name="id",required=true) String id) {
135 try {
136 iEquipmentMaintainTaskService.removeById(id);
137 } catch (Exception e) {
138 log.error("删除失败",e.getMessage());
139 return Result.error("删除失败!");
140 }
141 return Result.ok("删除成功!");
142 }
143
128 } 144 }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!