TestGeomInfoMapper.java 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. package com.shkpr.service.aimodelpower.dbdao.mapper;
  2. import com.shkpr.service.aimodelpower.dbdao.pgtype.GisPointTypeHandlePg;
  3. import com.shkpr.service.aimodelpower.dbdao.providers.TestGeomInfoSqlProvider;
  4. import com.shkpr.service.aimodelpower.dto.SelfGis;
  5. import org.apache.ibatis.annotations.*;
  6. import org.apache.ibatis.type.JdbcType;
  7. import java.util.List;
  8. import java.util.Map;
  9. public interface TestGeomInfoMapper {
  10. @SelectProvider(type = TestGeomInfoSqlProvider.class, method = "totalCounts")
  11. int totalCounts(@Param("table") String table
  12. , @Param("andWheres") Map<String, Object> andWheres
  13. , @Param("orWheres") Map<String, Object> orWheres
  14. , @Param("extend") String extend);
  15. @Results({
  16. @Result(property = "gis_xy", column = "gis_xy", javaType = SelfGis.class ,jdbcType = JdbcType.OTHER, typeHandler = GisPointTypeHandlePg.class)
  17. })
  18. @SelectProvider(type = TestGeomInfoSqlProvider.class, method = "listAllWiths")
  19. List<Map<String, Object>> listAllWiths(@Param("table") String table, @Param("filed") String file
  20. , @Param("limit") int limit
  21. , @Param("offset") int offset
  22. , @Param("andWheres") Map<String, Object> andWheres
  23. , @Param("orWheres") Map<String, Object> orWheres
  24. , @Param("order") String order
  25. , @Param("extend") String extend);
  26. @Results({
  27. @Result(property = "gis_xy", column = "gis_xy", javaType = SelfGis.class ,jdbcType = JdbcType.OTHER, typeHandler = GisPointTypeHandlePg.class)
  28. })
  29. @SelectProvider(type = TestGeomInfoSqlProvider.class, method = "getByUniqueId")
  30. Map<String, Object> getOne(@Param("table") String table, @Param("filed") String filed, @Param("id") Object id);
  31. @Results({
  32. @Result(property = "gis_xy", column = "gis_xy", javaType = SelfGis.class ,jdbcType = JdbcType.OTHER, typeHandler = GisPointTypeHandlePg.class)
  33. })
  34. @SelectProvider(type = TestGeomInfoSqlProvider.class, method = "batchQueryIn")
  35. List<Map<String, Object>> batchQueryIn(@Param("table") String table, @Param("filed") String file
  36. , @Param("ids") List<? extends Object> ids
  37. , @Param("order") String order
  38. , @Param("extend") String extend);
  39. @Results({
  40. @Result(property = "gis_xy", column = "gis_xy", javaType = SelfGis.class ,jdbcType = JdbcType.OTHER, typeHandler = GisPointTypeHandlePg.class)
  41. })
  42. @SelectProvider(type = TestGeomInfoSqlProvider.class, method = "batchQueryWiths")
  43. List<Map<String, Object>> batchQueryWiths(@Param("table") String table, @Param("filed") String filed
  44. , @Param("andWheres") Map<String, Object> andWheres
  45. , @Param("orWheres") Map<String, Object> orWheres
  46. , @Param("order") String order
  47. , @Param("extend") String extend);
  48. @InsertProvider(type = TestGeomInfoSqlProvider.class, method = "inserts")
  49. int inserts(@Param("inserts") Map<String, Object> inserts);
  50. /**
  51. * update和delete返回受影响条数需要配合useAffectedRows=true
  52. * @param datas
  53. * @param andWheres
  54. * @return
  55. */
  56. @UpdateProvider(type = TestGeomInfoSqlProvider.class, method = "updateWiths")
  57. int updateWiths(@Param("datas") Map<String, Object> datas
  58. , @Param("andWheres") Map<String, Object> andWheres
  59. , @Param("orWheres") Map<String, Object> orWheres
  60. , @Param("extend") String extend);
  61. @UpdateProvider(type = TestGeomInfoSqlProvider.class, method = "updateWiths")
  62. int updateWithsEx(@Param("datas") Map<String, Object> datas
  63. , @Param("datasEx") Map<String, Object> datasEx
  64. , @Param("andWheres") Map<String, Object> andWheres
  65. , @Param("orWheres") Map<String, Object> orWheres
  66. , @Param("extend") String extend);
  67. @SelectProvider(type = TestGeomInfoSqlProvider.class, method = "existsLine")
  68. boolean existLine(@Param("table") String table
  69. , @Param("andWheres") Map<String, Object> andWheres
  70. , @Param("orWheres") Map<String, Object> orWheres
  71. , @Param("extend") String extend);
  72. @DeleteProvider(type = TestGeomInfoSqlProvider.class, method = "deleteWiths")
  73. int deleteWithsEx(@Param("andWheres") Map<String, Object> andWheres
  74. , @Param("orWheres") Map<String, Object> orWheres
  75. , @Param("extend") String extend);
  76. @UpdateProvider(type = TestGeomInfoSqlProvider.class, method = "batchUpdateWiths")
  77. int batchUpdateWiths( @Param("andWheres") List<Map<String, Object>> andWheres
  78. , @Param("datas") List<Map<String, Object>> datas);
  79. }