feat:增加patch姿势

This commit is contained in:
wangyu 2021-10-21 23:27:22 +08:00
parent f5475190b5
commit 90c9726ec4

View File

@ -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) {