65 lines
2.5 KiB
XML
65 lines
2.5 KiB
XML
<?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.hivekion.environment.mapper.SimtoolWeatherMapper">
|
|
<resultMap id="DMSimtoolWeather" type="com.hivekion.environment.entity.SimtoolWeather">
|
|
<result property="startTime" column="START_TIME"/>
|
|
<result property="durationTime" column="DURATION_TIME"/>
|
|
<result property="windDirection" column="WIND_DIRECTION"/>
|
|
<result property="windPower" column="WIND_POWER"/>
|
|
<result property="windSpeed" column="WIND_SPEED"/>
|
|
<result property="scenarioUuid" column="SCENARIO_UUID"/>
|
|
<!-- 其他字段 -->
|
|
</resultMap>
|
|
<select id="list" resultType="com.hivekion.environment.entity.SimtoolWeather" parameterType="com.hivekion.environment.entity.SimtoolWeather" >
|
|
SELECT
|
|
@rownum := @rownum + 1 AS seq,
|
|
*
|
|
FROM (
|
|
SELECT * FROM tbl_simtool_weather
|
|
<where>
|
|
<if test="scenarioUuid != null and scenarioUuid !='' ">
|
|
and scenario_uuid =#{scenarioUuid}
|
|
</if>
|
|
</where>
|
|
order by id asc ) t, ( SELECT @rownum := #{start} ) r limit
|
|
#{start},#{pageSize}
|
|
</select>
|
|
|
|
<select id="count" resultType="java.lang.Long" parameterType="com.hivekion.environment.entity.SimtoolWeather" >
|
|
select count(id) from tbl_simtool_weather
|
|
<where>
|
|
<if test="scenarioUuid != null and scenarioUuid !='' ">
|
|
and scenario_uuid =#{scenarioUuid}
|
|
</if>
|
|
</where>
|
|
|
|
</select>
|
|
|
|
<select id="list" resultMap="DMSimtoolWeather" parameterType="com.hivekion.environment.entity.SimtoolWeather" databaseId="dm">
|
|
select
|
|
t.seq,
|
|
t.*
|
|
FROM (
|
|
SELECT
|
|
ROW_NUMBER() OVER (ORDER BY id ASC) AS seq,
|
|
a.*
|
|
FROM tbl_simtool_weather a
|
|
<where>
|
|
<if test="scenarioUuid != null and scenarioUuid !='' ">
|
|
and scenario_uuid =#{scenarioUuid}
|
|
</if>
|
|
</where>
|
|
) t
|
|
WHERE t.seq > #{start} AND t.seq <= (#{start} + #{pageSize})
|
|
</select>
|
|
|
|
<select id="count" resultType="java.lang.Long" parameterType="com.hivekion.environment.entity.SimtoolWeather" databaseId="dm">
|
|
select count(id) from tbl_simtool_weather
|
|
<where>
|
|
<if test="scenarioUuid != null and scenarioUuid !='' ">
|
|
and scenario_uuid =#{scenarioUuid}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
</mapper>
|