JdcProject/src/main/java/com/jdc/jdcproject/mapper/xml/FangpaishuiUnitMapper.xml

25 lines
965 B
XML
Raw Normal View History

2025-05-07 11:08:10 +08:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jdc.jdcproject.mapper.FangpaishuiUnitMapper">
2025-05-07 13:37:12 +08:00
<select id="findUnitByDetail" parameterType="com.jdc.jdcproject.entity.VO.FangpaishuiUnitVo" resultType="com.jdc.jdcproject.entity.VO.FangpaishuiUnitVo">
2025-05-07 11:08:10 +08:00
select fn.*,
e.equipmentName
FROM fangpaishui_unit fn
LEFT JOIN equipment e ON e.EquipmentId = fn.EquipmentId
2025-05-07 13:37:12 +08:00
<where>
<if test="UnitID !=0">
and fn.UnitID = #{UnitID}
</if>
<if test="equipmentName !=null">
and e.equipmentName like concat(concat('%',#{equipmentName}),'%')
</if>
<if test="UnitCode !=null">
and fn.UnitCode like concat(concat('%',#{UnitCode}),'%')
</if>
</where>
2025-05-07 11:08:10 +08:00
</select>
</mapper>