public abstract class BaseController<Record,Example> extends Object
| 构造器和说明 |
|---|
BaseController() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
exportData(com.alibaba.fastjson.JSONObject paramsMap,
javax.servlet.http.HttpServletResponse response) |
org.springframework.http.ResponseEntity<BaseResult> |
getById(String id) |
org.springframework.http.ResponseEntity<BaseResult> |
getDetailsById(String id) |
protected cn.chiship.sdk.cache.vo.CacheUserVO |
getLoginUser()
获得当前等了用户
|
protected Object |
getOrganizationId()
获得当前登陆用户所属组织
|
void |
getProcessStatus(javax.servlet.http.HttpServletResponse response,
Map<String,Object> paramsMap) |
protected List<String> |
getRoles() |
abstract BaseService<Record,Example> |
getService() |
protected Object |
getUserId()
获取当前登陆用户主键
|
protected String |
getUserName()
获得当前登陆用户名
|
PageVo |
page(Example example)
分页
|
BaseResult |
remove(Example example)
删除
|
protected org.springframework.http.ResponseEntity |
responseEntity(BaseResult baseResult) |
protected org.springframework.http.ResponseEntity |
responseEntity(BaseResult baseResult,
org.springframework.http.HttpStatus httpStatus) |
BaseResult |
save(Record record)
新增
|
BaseResult |
update(Object id,
Record record)
修改
|
org.springframework.http.ResponseEntity<BaseResult> |
validateExistByField(String id,
String field,
String value) |
BaseResult |
validParams(org.springframework.validation.BindingResult bindingResult) |
public abstract BaseService<Record,Example> getService()
@GetMapping(value="validateExistByField") public org.springframework.http.ResponseEntity<BaseResult> validateExistByField(@RequestParam(required=false,defaultValue="",value="id") String id, @RequestParam(value="field") String field, @RequestParam(value="value") String value)
@PostMapping(value="exportData")
public void exportData(@RequestBody(required=true)
com.alibaba.fastjson.JSONObject paramsMap,
javax.servlet.http.HttpServletResponse response)
throws Exception
Exception@PostMapping(value="getProcessStatus")
public void getProcessStatus(javax.servlet.http.HttpServletResponse response,
@RequestBody(required=true)
Map<String,Object> paramsMap)
throws Exception
Exception@GetMapping(value="getById/{id}")
public org.springframework.http.ResponseEntity<BaseResult> getById(@PathVariable(value="id")
String id)
@GetMapping(value="getDetailsById/{id}")
public org.springframework.http.ResponseEntity<BaseResult> getDetailsById(@PathVariable(value="id")
String id)
public BaseResult save(Record record)
record - public BaseResult update(Object id, Record record)
record - public BaseResult remove(Example example)
example - public BaseResult validParams(org.springframework.validation.BindingResult bindingResult)
protected Object getUserId()
protected String getUserName()
protected Object getOrganizationId()
protected cn.chiship.sdk.cache.vo.CacheUserVO getLoginUser()
protected org.springframework.http.ResponseEntity responseEntity(BaseResult baseResult)
protected org.springframework.http.ResponseEntity responseEntity(BaseResult baseResult, org.springframework.http.HttpStatus httpStatus)
Copyright © 2022. All rights reserved.