通讯录查询修改

master
Xusan 2024-05-16 17:47:39 +08:00
parent 1a2f5489c0
commit 16962b6dc9
1 changed files with 19 additions and 5 deletions

View File

@ -9,10 +9,9 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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;
import org.springframework.web.bind.annotation.*;
import java.util.Objects;
/**
* @author xusan
@ -45,5 +44,20 @@ public class VersionsController {
}
@ApiOperation(value = "删除")
@GetMapping(value = "del/{id}")
public ResultJson delete(@PathVariable("id") Integer id) {
if (Objects.isNull(service.getById(id))) {
return ResultJson.error("当前数据不存在");
}
return ResultJson.ok(service.removeById(id));
}
}