src/main/resources/mapper/CstmrMapper.xml
@@ -33,8 +33,22 @@ </resultMap> <select id="selectByUuid" resultMap="BaseResultMap"> select * from man_cstmr where 1=1 and uuid = #{uuid} <if test="hostId != null"> and host_id = #{hostId} </if> </select> <select id="selectCstmrByNewestUuid" resultMap="BaseResultMap"> select * from man_cstmr where 1=1 order by uuid + 0 desc select * from man_cstmr where 1=1 <if test="hostId != null"> and host_id = #{hostId} </if> order by uuid + 0 desc </select> </mapper>