healchow commented on code in PR #8587:
URL: https://github.com/apache/inlong/pull/8587#discussion_r1272399127
##########
inlong-manager/manager-dao/src/main/resources/mappers/InlongGroupEntityMapper.xml:
##########
@@ -390,20 +390,35 @@
and is_deleted = 0
</where>
</select>
- <select id="selectDeletedGroupIds" resultType="java.lang.String">
+ <select id="selectDeletedGroupIdsWithTimeBefore"
resultType="java.lang.String">
<bind name="_isInlongService" value="LoginUser.InlongService"/>
select inlong_group_id
from inlong_group
<where>
+ modify_time <= #{timeBefore, jdbcType=TIMESTAMP}
<if test="_isInlongService == false">
- tenant = #{tenant,jdbcType=VARCHAR}
+ and tenant = #{tenant,jdbcType=VARCHAR}
</if>
- and modify_time <= #{timeBefore, jdbcType=TIMESTAMP}
</where>
group by inlong_group_id
having min(is_deleted) > 0
limit #{limit, jdbcType=INTEGER}
</select>
+ <select id="selectDeletedGroupIdsWithTimeAfter"
resultType="java.lang.String">
+ <bind name="_isInlongService" value="LoginUser.InlongService"/>
+ select inlong_group_id
+ from inlong_group
+ <where>
+ modify_time >= #{timeAfter, jdbcType=TIMESTAMP}
+ <if test="_isInlongService == false">
+ and tenant = #{tenant,jdbcType=VARCHAR}
+ </if>
+ </where>
+ where
Review Comment:
Unecessary `where`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]