package com.shkpr.service.aimodelpower.dbdao.mapper; import com.shkpr.service.aimodelpower.dbdao.pgtype.GisPointTypeHandlePg; import com.shkpr.service.aimodelpower.dbdao.providers.TestGeomInfoSqlProvider; import com.shkpr.service.aimodelpower.dto.SelfGis; import org.apache.ibatis.annotations.*; import org.apache.ibatis.type.JdbcType; import java.util.List; import java.util.Map; public interface TestGeomInfoMapper { @SelectProvider(type = TestGeomInfoSqlProvider.class, method = "totalCounts") int totalCounts(@Param("table") String table , @Param("andWheres") Map andWheres , @Param("orWheres") Map orWheres , @Param("extend") String extend); @Results({ @Result(property = "gis_xy", column = "gis_xy", javaType = SelfGis.class ,jdbcType = JdbcType.OTHER, typeHandler = GisPointTypeHandlePg.class) }) @SelectProvider(type = TestGeomInfoSqlProvider.class, method = "listAllWiths") List> listAllWiths(@Param("table") String table, @Param("filed") String file , @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 = "gis_xy", column = "gis_xy", javaType = SelfGis.class ,jdbcType = JdbcType.OTHER, typeHandler = GisPointTypeHandlePg.class) }) @SelectProvider(type = TestGeomInfoSqlProvider.class, method = "getByUniqueId") Map getOne(@Param("table") String table, @Param("filed") String filed, @Param("id") Object id); @Results({ @Result(property = "gis_xy", column = "gis_xy", javaType = SelfGis.class ,jdbcType = JdbcType.OTHER, typeHandler = GisPointTypeHandlePg.class) }) @SelectProvider(type = TestGeomInfoSqlProvider.class, method = "batchQueryIn") List> batchQueryIn(@Param("table") String table, @Param("filed") String file , @Param("ids") List ids , @Param("order") String order , @Param("extend") String extend); @Results({ @Result(property = "gis_xy", column = "gis_xy", javaType = SelfGis.class ,jdbcType = JdbcType.OTHER, typeHandler = GisPointTypeHandlePg.class) }) @SelectProvider(type = TestGeomInfoSqlProvider.class, method = "batchQueryWiths") List> batchQueryWiths(@Param("table") String table, @Param("filed") String filed , @Param("andWheres") Map andWheres , @Param("orWheres") Map orWheres , @Param("order") String order , @Param("extend") String extend); @InsertProvider(type = TestGeomInfoSqlProvider.class, method = "inserts") int inserts(@Param("inserts") Map inserts); /** * update和delete返回受影响条数需要配合useAffectedRows=true * @param datas * @param andWheres * @return */ @UpdateProvider(type = TestGeomInfoSqlProvider.class, method = "updateWiths") int updateWiths(@Param("datas") Map datas , @Param("andWheres") Map andWheres , @Param("orWheres") Map orWheres , @Param("extend") String extend); @UpdateProvider(type = TestGeomInfoSqlProvider.class, method = "updateWiths") int updateWithsEx(@Param("datas") Map datas , @Param("datasEx") Map datasEx , @Param("andWheres") Map andWheres , @Param("orWheres") Map orWheres , @Param("extend") String extend); @SelectProvider(type = TestGeomInfoSqlProvider.class, method = "existsLine") boolean existLine(@Param("table") String table , @Param("andWheres") Map andWheres , @Param("orWheres") Map orWheres , @Param("extend") String extend); @DeleteProvider(type = TestGeomInfoSqlProvider.class, method = "deleteWiths") int deleteWithsEx(@Param("andWheres") Map andWheres , @Param("orWheres") Map orWheres , @Param("extend") String extend); @UpdateProvider(type = TestGeomInfoSqlProvider.class, method = "batchUpdateWiths") int batchUpdateWiths( @Param("andWheres") List> andWheres , @Param("datas") List> datas); }