public class BaseController<M extends com.baomidou.mybatisplus.extension.service.IService<T>,T extends SerializableVO<T>,S extends SerializableVO<S>,U extends SerializableVO<U>,R extends SerializableVO<R>> extends Object
| 限定符 | 构造器和说明 |
|---|---|
protected |
BaseController() |
| 限定符和类型 | 方法和说明 |
|---|---|
ResultVO<String> |
batchSaveOrUpdate(List<U> list)
description: 批量保存或更新
|
ResultVO<String> |
delete(Long id)
description: 根据id删除
|
ResultVO<R> |
getById(Long id)
description: 根据id查询
|
ResultVO<R> |
getById(Object uuid)
description: 根据uuid查询
|
ResultVO<List<R>> |
getList(S s)
description: 查询全部
|
ResultVO<ResourcePage<List<R>>> |
queryPage(S s) |
ResultVO<R> |
saveOrUpdate(U u)
description: 单个保存或更新
|
@PostMapping(value="saveOrUpdate") public ResultVO<R> saveOrUpdate(@RequestBody U u)
@PostMapping(value="/batchSaveOrUpdate") public ResultVO<String> batchSaveOrUpdate(@RequestBody List<U> list)
@DeleteMapping(value="delete") public ResultVO<String> delete(@RequestParam(value="id") Long id)
@GetMapping(value="/getById") public ResultVO<R> getById(@RequestParam(value="id") Long id)
@GetMapping(value="/uuid") public ResultVO<R> getById(@RequestParam(value="uuid") Object uuid)
@PostMapping(value="/list") public ResultVO<List<R>> getList(@RequestBody S s)
@PostMapping(value="/queryPage") public ResultVO<ResourcePage<List<R>>> queryPage(@RequestBody S s)
Copyright © 2022 tan. All rights reserved.