Commit 3b935d5f authored by zhangsen's avatar zhangsen

bug

parent 3dd5ee65
...@@ -42,23 +42,25 @@ ...@@ -42,23 +42,25 @@
<select id="selectPageData" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorDto"> <select id="selectPageData" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorDto">
select select
state, hjc.state,
sn_code, hjc.sn_code,
station_name, sta.station_name,
update_time, hjc.update_time,
type hjc.type as collectorType,
sta.name,
sta.type
from from
hygf_jp_collector hjc hygf_jp_collector hjc
left join hygf_jp_station sta on sta.third_station_id = hjc.third_station_id left join hygf_jp_station sta on sta.third_station_id = hjc.third_station_id
<where> <where>
<if test="dto.snCode != null and dto.snCode != ''"> <if test="dto.snCode != null and dto.snCode != ''">
sn_code = #{dto.snCode} hjc.sn_code = #{dto.snCode}
</if> </if>
<if test="dto.type != null and dto.type !=''"> <if test="dto.type != null and dto.type !=''">
type = #{dto.type} hjc.type = #{dto.type}
</if> </if>
<if test="dto.state != null and dto.state !=''"> <if test="dto.state != null and dto.state !=''">
state = #{dto.state} hjc.state = #{dto.state}
</if> </if>
</where> </where>
limit #{current},#{size} limit #{current},#{size}
...@@ -66,23 +68,19 @@ ...@@ -66,23 +68,19 @@
<select id="selectPageDataTota" resultType="int"> <select id="selectPageDataTota" resultType="int">
select select
state, count(1)
sn_code,
station_name,
update_time,
type
from from
hygf_jp_collector hjc hygf_jp_collector hjc
left join hygf_jp_station sta on sta.third_station_id = hjc.third_station_id left join hygf_jp_station sta on sta.third_station_id = hjc.third_station_id
<where> <where>
<if test="dto.snCode != null and dto.snCode != ''"> <if test="dto.snCode != null and dto.snCode != ''">
sn_code = #{dto.snCode} hjc.sn_code = #{dto.snCode}
</if> </if>
<if test="dto.type != null and dto.type !=''"> <if test="dto.type != null and dto.type !=''">
type = #{dto.type} hjc.type = #{dto.type}
</if> </if>
<if test="dto.state != null and dto.state !=''"> <if test="dto.state != null and dto.state !=''">
state = #{dto.state} hjc.state = #{dto.state}
</if> </if>
</where> </where>
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment