public class BaseControllerModel<S,E> extends Object implements org.springframework.boot.ApplicationRunner
| 限定符和类型 | 字段和说明 |
|---|---|
BaseRepository<E,Long> |
baseRepository |
| 构造器和说明 |
|---|
BaseControllerModel() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(S entityVO) |
void |
deleteValid(String ids) |
List<S> |
findAllByConditions(S reqObj,
Map<String,String> reqReplaceMap,
String sorter,
String excludeLikeAttr) |
List<S> |
findByAttrs(String attr,
String condition) |
PageVO<S> |
findByPage(S reqObj,
Map<String,String> reqReplaceMap,
String sorter,
String excludeLikeAttr,
Integer current,
Integer pageSize) |
S |
findOneByAttr(String attr,
String condition) |
void |
run(org.springframework.boot.ApplicationArguments args) |
void |
update(S entityVO) |
public BaseRepository<E,Long> baseRepository
@RequestMapping(path="",
method=POST)
@Transactional(isolation=READ_COMMITTED,
rollbackFor=java.lang.Exception.class)
public void add(@RequestBody
S entityVO)
@RequestMapping(path="",
method=PUT)
@Transactional(isolation=READ_COMMITTED,
rollbackFor=java.lang.Exception.class)
public void update(@RequestBody
S entityVO)
@RequestMapping(path="/{ids}",
method=DELETE)
@Transactional(isolation=READ_COMMITTED,
rollbackFor=java.lang.Exception.class)
public void deleteValid(@PathVariable
String ids)
@RequestMapping(path="/{attr}/{condition}",
method=GET)
public S findOneByAttr(@PathVariable
String attr,
@PathVariable
String condition)
@RequestMapping(path="/list/{attr}/{condition}",
method=GET)
public List<S> findByAttrs(@PathVariable
String attr,
@PathVariable
String condition)
@RequestMapping(path="/findAll",
method=GET)
public List<S> findAllByConditions(@RequestBody(required=false)
S reqObj,
@RequestParam(required=false)
Map<String,String> reqReplaceMap,
@RequestParam(name="sorter",required=false)
String sorter,
@RequestParam(name="excludeLikeAttr",defaultValue="",required=false)
String excludeLikeAttr)
throws IllegalAccessException
@RequestMapping(path="/findByPage",
method=GET)
public PageVO<S> findByPage(@RequestBody(required=false)
S reqObj,
@RequestParam(required=false)
Map<String,String> reqReplaceMap,
@RequestParam(name="sorter",required=false)
String sorter,
@RequestParam(name="excludeLikeAttr",defaultValue="",required=false)
String excludeLikeAttr,
@RequestParam(name="current",required=false,defaultValue="1")
Integer current,
@RequestParam(name="pageSize",required=false,defaultValue="20")
Integer pageSize)
throws IllegalAccessException
public void run(org.springframework.boot.ApplicationArguments args)
run 在接口中 org.springframework.boot.ApplicationRunnerCopyright © 2023. All Rights Reserved.