public interface BaseService<Record,Example>
| 限定符和类型 | 方法和说明 |
|---|---|
long |
countByExample(Example example)
根据条件查询记录数量
|
BaseResult |
deleteByExample(Example example)
根据条件删除记录
|
BaseResult |
deleteByPrimaryKey(Object id)
根据主键删除记录
|
void |
exportData(javax.servlet.http.HttpServletResponse response,
Map<String,Object> paramMap)
导出
|
BaseResult |
insertSelective(Record record)
插入记录有效字段
|
List<Record> |
selectByExample(Example example)
根据条件查询记录
|
Record |
selectByPrimaryKey(Object id)
根据主键查询记录
|
BaseResult |
selectDetailsByPrimaryKey(Object id)
根据主键查找记录详情
|
PageVo |
selectPageByExample(PageVo pageVo,
Example example,
String sort)
分页
|
BaseResult |
updateByExampleSelective(Record record,
Example example)
根据条件更新有效字段
|
BaseResult |
updateByPrimaryKeySelective(Record record)
根据主键更新记录有效字段
|
BaseResult |
validateExistByField(String id,
String field,
String value)
根据字段校验数据是否存在
|
BaseResult insertSelective(Record record)
record - 插入数据的实体BaseResult deleteByExample(Example example)
example - 删除记录条件BaseResult deleteByPrimaryKey(Object id)
id - 主键BaseResult updateByExampleSelective(Record record, Example example)
record - 实体example - 条件BaseResult updateByPrimaryKeySelective(Record record)
record - 实体BaseResult selectDetailsByPrimaryKey(Object id)
id - long countByExample(Example example)
example - 条件PageVo selectPageByExample(PageVo pageVo, Example example, String sort)
pageVo - 分页对象example - 条件void exportData(javax.servlet.http.HttpServletResponse response,
Map<String,Object> paramMap)
throws Exception
response - paramMap - ExceptionBaseResult validateExistByField(String id, String field, String value)
id - 主键field - 字段名value - 字段值Copyright © 2022. All rights reserved.