| | |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 值域 |
| | | * @author WWW |
| | | */ |
| | | @Mapper |
| | | @Repository |
| | | @SuppressWarnings("ALL") |
| | | public interface DomainMapper { |
| | | /** |
| | | * 查询记录数 |
| | | * |
| | | * @param ns 名称空间 |
| | | * @param tab 表名 |
| | | * @param name 名称 |
| | | * @return 记录数 |
| | | */ |
| | | public Integer selectCount(String ns, String tab, String name); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param ns 名称空间 |
| | | * @param tab 表名 |
| | | * @param name 名称 |
| | | * @param limit 记录数 |
| | | * @param offset 偏移量 |
| | | * @return 列表 |
| | | */ |
| | | public List<DomainEntity> selectByPage(String ns, String tab, String name, Integer limit, Integer offset); |
| | | |
| | | /** |
| | | * 查询所有 |
| | | * |
| | | * @return |
| | | */ |
| | | public List<DomainEntity> selectAll(); |
| | | |
| | | /** |
| | | * 根据ID查询 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public DomainEntity selectById(int id); |
| | | |
| | | /** |
| | | * 根据表名查询值域名称 |
| | | * |
| | | * @param ns 名称空间 |
| | | * @param tab 表名 |
| | | * @return 值域名称集合 |
| | | */ |
| | | public List<String> selectDomainNames(String ns, String tab); |
| | | |
| | | /** |
| | | * 插入一条 |
| | | * |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | public Integer insert(DomainEntity entity); |
| | | |
| | | /** |
| | | * 插入多条 |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer inserts(List<DomainEntity> list); |
| | | |
| | | /** |
| | | * 删除一条 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public Integer delete(int id); |
| | | |
| | | /** |
| | | * 删除多条 |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | public Integer deletes(List<Integer> ids); |
| | | |
| | | /** |
| | | * 更新一条 |
| | | * |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | public Integer update(DomainEntity entity); |
| | | |
| | | /** |
| | | * 更新多条 |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer updates(List<DomainEntity> list); |
| | | } |