package com.shkpr.service.aimodelpower.dbdao.mapper; import com.shkpr.service.aimodelpower.dbdao.providers.RoleInfoSqlProvider; import com.shkpr.service.aimodelpower.dbdao.tables.RoleInfoTable; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Result; import org.apache.ibatis.annotations.Results; import org.apache.ibatis.annotations.SelectProvider; import org.apache.ibatis.type.JdbcType; import java.util.List; import java.util.Map; public interface RoleInfoMapper extends RoleInfoTable { @SelectProvider(type = RoleInfoSqlProvider.class, method = "totalCounts") int totalCounts(@Param("andWheres") Map andWheres, @Param("orWheres") Map orWheres, @Param("extend") String extend); @Results({ @Result(property = "parentid", column = "parent_id", javaType = Integer.class ,jdbcType = JdbcType.INTEGER) }) @SelectProvider(type = RoleInfoSqlProvider.class, method = "listAllWiths") List> listAllWiths(@Param("limit") int limit , @Param("offset") int offset , @Param("andWheres") Map andWheres , @Param("orWheres") Map orWheres , @Param("order") String order , @Param("extend") String extend); @Results({ @Result(property = "parentid", column = "parent_id", javaType = Integer.class ,jdbcType = JdbcType.INTEGER) }) @SelectProvider(type = RoleInfoSqlProvider.class, method = "getBySerialId") Map getOne(@Param("table") String table, @Param("filed") String filed, @Param("id") int id); @Results({ @Result(property = "parentid", column = "parent_id", javaType = Integer.class ,jdbcType = JdbcType.INTEGER) }) @SelectProvider(type = RoleInfoSqlProvider.class, method = "queryChildOrParentWiths") List> queryChildOrParentWiths(@Param("selfId") int id , @Param("childOrParent") boolean bQueryChildOrParent , @Param("andWheres") Map andWheres , @Param("orWheres") Map orWheres , @Param("order") String order , @Param("extend") String extend); }