feat:增加patch姿势
This commit is contained in:
parent
f5475190b5
commit
90c9726ec4
@ -68,6 +68,13 @@ public abstract class BaseController<T extends Domain, Q extends Qo<T>> implemen
|
||||
return Result.accept(service.updateSelectiveById(entity));
|
||||
}
|
||||
|
||||
@PatchMapping("{id}")
|
||||
@Operation.Update
|
||||
public Result<T> patch(T entity, @CurrentUser User user) {
|
||||
userContext.setUser(user);
|
||||
return Result.accept(service.updateSelectiveById(entity));
|
||||
}
|
||||
|
||||
@PutMapping("")
|
||||
@Operation.UpdateAll
|
||||
public Result<List<T>> updateList(@RequestBody List<T> list, @CurrentUser User user) {
|
||||
|
Loading…
Reference in New Issue
Block a user