RoleInfoMapper.java 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. package com.shkpr.service.aimodelpower.dbdao.mapper;
  2. import com.shkpr.service.aimodelpower.dbdao.providers.RoleInfoSqlProvider;
  3. import com.shkpr.service.aimodelpower.dbdao.tables.RoleInfoTable;
  4. import org.apache.ibatis.annotations.Param;
  5. import org.apache.ibatis.annotations.Result;
  6. import org.apache.ibatis.annotations.Results;
  7. import org.apache.ibatis.annotations.SelectProvider;
  8. import org.apache.ibatis.type.JdbcType;
  9. import java.util.List;
  10. import java.util.Map;
  11. public interface RoleInfoMapper extends RoleInfoTable {
  12. @SelectProvider(type = RoleInfoSqlProvider.class, method = "totalCounts")
  13. int totalCounts(@Param("andWheres") Map<String, Object> andWheres, @Param("orWheres") Map<String, Object> orWheres, @Param("extend") String extend);
  14. @Results({
  15. @Result(property = "parentid", column = "parent_id", javaType = Integer.class ,jdbcType = JdbcType.INTEGER)
  16. })
  17. @SelectProvider(type = RoleInfoSqlProvider.class, method = "listAllWiths")
  18. List<Map<String, Object>> listAllWiths(@Param("limit") int limit
  19. , @Param("offset") int offset
  20. , @Param("andWheres") Map<String, Object> andWheres
  21. , @Param("orWheres") Map<String, Object> orWheres
  22. , @Param("order") String order
  23. , @Param("extend") String extend);
  24. @Results({
  25. @Result(property = "parentid", column = "parent_id", javaType = Integer.class ,jdbcType = JdbcType.INTEGER)
  26. })
  27. @SelectProvider(type = RoleInfoSqlProvider.class, method = "getBySerialId")
  28. Map<String, Object> getOne(@Param("table") String table, @Param("filed") String filed, @Param("id") int id);
  29. @Results({
  30. @Result(property = "parentid", column = "parent_id", javaType = Integer.class ,jdbcType = JdbcType.INTEGER)
  31. })
  32. @SelectProvider(type = RoleInfoSqlProvider.class, method = "queryChildOrParentWiths")
  33. List<Map<String, Object>> queryChildOrParentWiths(@Param("selfId") int id
  34. , @Param("childOrParent") boolean bQueryChildOrParent
  35. , @Param("andWheres") Map<String, Object> andWheres
  36. , @Param("orWheres") Map<String, Object> orWheres
  37. , @Param("order") String order
  38. , @Param("extend") String extend);
  39. }