public interface UpdateController<E,PK,M>
| 限定符和类型 | 方法和说明 |
|---|---|
<S extends UpdateService<E,PK> & CreateEntityService<E>> |
getService() |
E |
modelToEntity(M model,
E entity)
将model转为entity
|
default ResponseMessage<PK> |
saveOrUpdate(M data) |
default ResponseMessage<Integer> |
updateByPrimaryKey(PK id,
M data) |
<S extends UpdateService<E,PK> & CreateEntityService<E>> S getService()
@Authorize(action="update") @PutMapping(path="/{id}") default ResponseMessage<Integer> updateByPrimaryKey(@PathVariable PK id, @RequestBody M data)
@Authorize(action={"update","add"}, logical=AND) @PatchMapping default ResponseMessage<PK> saveOrUpdate(@RequestBody M data)
Copyright © 2016–2020. All rights reserved.