<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.finance.rst.map.engine.backend.dao.mapper.MapMetadataMapper">
<resultMap id="BaseResultMap" type="com.finance.rst.map.engine.backend.dao.model.MapMetadata">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="img_name" jdbcType="VARCHAR" property="imgName" />
<result column="satellite_source" jdbcType="VARCHAR" property="satelliteSource" />
<result column="satellite_code" jdbcType="VARCHAR" property="satelliteCode" />
<result column="img_channel" jdbcType="VARCHAR" property="imgChannel" />
<result column="img_time" jdbcType="DATE" property="imgTime" />
<result column="img_origin_path" jdbcType="VARCHAR" property="imgOriginPath" />
<result column="img_compress_path" jdbcType="VARCHAR" property="imgCompressPath" />
<result column="cloud_cover" jdbcType="NUMERIC" property="cloudCover" />
<result column="off_nadir_angle" jdbcType="NUMERIC" property="offNadirAngle" />
<result column="sun_azimuth" jdbcType="NUMERIC" property="sunAzimuth" />
<result column="sun_elevation" jdbcType="NUMERIC" property="sunElevation" />
<result column="projection_method" jdbcType="VARCHAR" property="projectionMethod" />
<result column="position_tl" jdbcType="VARCHAR" property="positionTl" />
<result column="position_tr" jdbcType="VARCHAR" property="positionTr" />
<result column="position_bl" jdbcType="VARCHAR" property="positionBl" />
<result column="position_br" jdbcType="VARCHAR" property="positionBr" />
<result column="position_md" jdbcType="VARCHAR" property="positionMd" />
<result column="position_type_tl" jdbcType="OTHER" property="positionTypeTl" />
<result column="position_type_tr" jdbcType="OTHER" property="positionTypeTr" />
<result column="position_type_bl" jdbcType="OTHER" property="positionTypeBl" />
<result column="position_type_br" jdbcType="OTHER" property="positionTypeBr" />
<result column="position_type_md" jdbcType="OTHER" property="positionTypeMd" />
<result column="position_origin" jdbcType="VARCHAR" property="positionOrigin" />
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_user" jdbcType="VARCHAR" property="updateUser" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<select id="getTotalMapMetadataList" parameterType="map" resultType="int">
SELECT COUNT(1) FROM map_metadata
where 1=1
<if test="cloudCover != null and cloudCover != '' ">
and cloud_cover = #{cloudCover} :: NUMERIC
</if>
<if test="offNadirAngle != null and offNadirAngle != '' ">
and off_nadir_angle = #{offNadirAngle} :: NUMERIC
</if>
<if test="sunAzimuth != null and sunAzimuth != '' ">
and sun_azimuth = #{sunAzimuth} :: NUMERIC
</if>
<if test="sunElevation != null and sunElevation != '' ">
and sun_elevation = #{sunElevation} :: NUMERIC
</if>
<if test="imgTimeStart != null and imgTimeStart != '' and imgTimeEnd != null and imgTimeEnd != ''">
and img_time BETWEEN #{imgTimeStart} :: date AND #{imgTimeEnd} :: date
</if>
<if test="positionLists != null and positionLists != ''">
and ${positionLists}
</if>
</select>
<select id="queryMapMetadataList" parameterType="map" resultMap="BaseResultMap">
SELECT * FROM map_metadata
where 1=1
<if test="cloudCover != null and cloudCover != '' ">
and cloud_cover = #{cloudCover} :: NUMERIC
</if>
<if test="offNadirAngle != null and offNadirAngle != '' ">
and off_nadir_angle = #{offNadirAngle} :: NUMERIC
</if>
<if test="sunAzimuth != null and sunAzimuth != '' ">
and sun_azimuth = #{sunAzimuth} :: NUMERIC
</if>
<if test="sunElevation != null and sunElevation != '' ">
and sun_elevation = #{sunElevation} :: NUMERIC
</if>
<if test="imgTimeStart != null and imgTimeStart != '' and imgTimeEnd != null and imgTimeEnd != ''">
and img_time BETWEEN #{imgTimeStart} :: date AND #{imgTimeEnd} :: date
</if>
<if test="positionLists != null and positionLists != ''">
and ${positionLists}
</if>
<if test="start != null ">
LIMIT #{size} OFFSET #{start}
</if>
</select>
</mapper>
postgreSQL分页查询
最新推荐文章于 2024-01-04 14:48:06 发布