优化详情升级到最新

This commit is contained in:
gaoyutao
2026-01-09 19:18:21 +08:00
parent 52090c6f37
commit 14b0e39d5b
2 changed files with 13 additions and 8 deletions
@@ -345,6 +345,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<select id="getMaxAgentVersion" resultType="RmResourceRegistration">
select agent_version maxAgentVersion from rm_resource_registration where del_flag=0
order by create_time desc limit 1
ORDER BY
CAST(SUBSTRING_INDEX(agent_version, '.', 1) AS UNSIGNED) DESC,
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(agent_version, '.', 2), '.', -1) AS UNSIGNED) DESC,
CAST(SUBSTRING_INDEX(agent_version, '.', -1) AS UNSIGNED) DESC
limit 1
</select>
</mapper>