24 lines
841 B
XML
24 lines
841 B
XML
|
<?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">
|
||
|
|
||
|
<!-- 关联设备表获取设备名称 -->
|
||
|
<select id="findAllUnit" resultType="com.jdc.jdcproject.entity.VO.FangpaishuiUnitVo">
|
||
|
select fn.*,
|
||
|
e.equipmentName
|
||
|
FROM fangpaishui_unit fn
|
||
|
LEFT JOIN equipment e ON e.EquipmentId = fn.EquipmentId
|
||
|
|
||
|
</select>
|
||
|
|
||
|
<select id="findUnitById" resultType="com.jdc.jdcproject.entity.VO.FangpaishuiUnitVo">
|
||
|
select fn.*,
|
||
|
e.equipmentName
|
||
|
FROM fangpaishui_unit fn
|
||
|
LEFT JOIN equipment e ON e.EquipmentId = fn.EquipmentId
|
||
|
where fn.UnitID = #{id}
|
||
|
</select>
|
||
|
</mapper>
|