Commit c210bc14 authored by 张森's avatar 张森

删除API添加判断、sql添加注解

parent aebbbcde
...@@ -30,6 +30,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -30,6 +30,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Controller @Controller
...@@ -181,7 +182,9 @@ public class EmergencyTaskController extends BaseController{ ...@@ -181,7 +182,9 @@ public class EmergencyTaskController extends BaseController{
@ApiOperation(value = "根据ID删除数据", notes = "根据ID删除数据") @ApiOperation(value = "根据ID删除数据", notes = "根据ID删除数据")
@DeleteMapping(value = "/deleteById", produces = "application/json;charset=UTF-8") @DeleteMapping(value = "/deleteById", produces = "application/json;charset=UTF-8")
public ResponseModel deleteById(@RequestParam(value = "id") Long id) { public ResponseModel deleteById(@RequestParam(value = "id") Long id) {
emergencyTaskMapper.deleteTask(id); if (!Objects.isNull(id)) {
emergencyTaskMapper.deleteTask(id);
}
return CommonResponseUtil2.success(); return CommonResponseUtil2.success();
} }
......
...@@ -17,7 +17,7 @@ public interface EmergencyTaskMapper extends BaseMapper { ...@@ -17,7 +17,7 @@ public interface EmergencyTaskMapper extends BaseMapper {
void deleteTreeNode(Long obligationId , Long personId); void deleteTreeNode(Long obligationId , Long personId);
void deleteTask(Long id); void deleteTask(@Param("id") Long id);
void save(EmergencyRelation emergencyRelation); void save(EmergencyRelation emergencyRelation);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment