Files
intelligent-application-orc…/src/main/resources/mapper/GpuResourceMapper.xml

19 lines
689 B
XML
Raw Normal View History

2025-05-22 18:08:28 +08:00
<!-- src/main/resources/mapper/GpuResourceMapper.xml -->
<select id="selectByCondition" resultType="GpuResource">
SELECT * FROM ipz.gpu_resource
<where>
<if test="gpuId != null">
GPUId = #{gpuId}
</if>
<if test="ipPattern != null and ipPattern != ''">
AND Ip LIKE CONCAT('%', #{ipPattern}, '%')
</if>
<if test="modelKeyword != null and modelKeyword != ''">
AND GPUModel LIKE CONCAT('%', #{modelKeyword}, '%')
</if>
<if test="startTime != null and endTime != null">
AND CreatedTime BETWEEN #{startTime} AND #{endTime}
</if>
</where>
ORDER BY GPUId DESC
</select>