1.灿能云部分远程接口调整

This commit is contained in:
wr
2023-12-05 15:37:03 +08:00
parent 7aeb215809
commit 43e16c9418
5 changed files with 34 additions and 29 deletions

View File

@@ -232,27 +232,31 @@
</where>
</select>
<select id="getLinesTarget" resultType="java.lang.String">
SELECT
select
my_index
FROM
r_stat_limit_target_d
<where>
<if test=" ids != null and ids.size > 0">
AND my_index IN
<foreach collection='ids' item='item' index="index" open='(' separator=',' close=')'>
#{item}
</foreach>
</if>
<if test=" startTime != null and startTime !=''">
AND time_id >= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND time_id &lt;= #{endTime}
</if>
</where>
GROUP BY
my_index
HAVING
allCount >0
from (
SELECT
my_index,
sum( all_time ) AS allCount
FROM
r_stat_limit_target_d
<where>
<if test=" ids != null and ids.size > 0">
AND my_index IN
<foreach collection='ids' item='item' index="index" open='(' separator=',' close=')'>
#{item}
</foreach>
</if>
<if test=" startTime != null and startTime !=''">
AND time_id >= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND time_id &lt;= #{endTime}
</if>
</where>
GROUP BY
my_index
HAVING
allCount >0) a
</select>
</mapper>