维保任务删除接口
正在显示
1 个修改的文件
包含
23 行增加
和
7 行删除
... | @@ -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 | } | ... | ... |
-
请 注册 或 登录 后发表评论