package com.terra.system.mapper.data; import com.terra.system.entity.ctrl.TabEntity; import com.terra.system.entity.data.DictEntity; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; import java.util.List; /** * 字典管理 * @author WWW */ @Mapper @Repository public interface DictMapper { /** * 查询记录数 * * @param ns 表空间 * @param tab 表名 * @return 记录数 */ public Integer selectCount(String ns, String tab); /** * 分页查询 * * @param ns 表空间 * @param tab 表名 * @param limit 记录数 * @param offset 偏移量 * @return 列表 */ public List selectByPage(String ns, String tab, Integer limit, Integer offset); /** * 根据ID查询 * * @param id * @return */ public DictEntity selectById(int id); /** * 查询字典表结构 * * @param name * @param field * @return */ public List selectDictTab(String name, String field); /** * 插入一条 * * @param entity * @return */ public Integer insert(DictEntity entity); /** * 插入多条 * * @param list * @return */ public Integer inserts(List list); /** * 删除一条 * * @param id * @return */ public Integer delete(int id); /** * 删除多条 * * @param ids * @return */ public Integer deletes(List ids); /** * 更新一条 * * @param entity * @return */ public Integer update(DictEntity entity); /** * 更新多条 * * @param list * @return */ public Integer updates(List list); }