You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.8 KiB
XML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?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="org.dromara.dms.mapper.DmsBaseMaintProjectMapper">
<resultMap type="DmsBaseMaintProject" id="DmsBaseMaintProjectResult">
<result property="maintProjectId" column="maint_project_id" />
<result property="maintProjectName" column="maint_project_name" />
<result property="maintProjectDesc" column="maint_project_desc" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectDmsBaseMaintProjectMenuVo">
select dbmp.maint_project_id,
dbmp.maint_project_name,
dbmp.maint_project_desc,
dbmp.remark, dbmp.create_by, dbmp.create_time, dbmp.update_by, dbmp.update_time,
dbsp.maint_station_id
from dms_base_maint_project dbmp
left join dms_base_station_project dbsp on dbmp.maint_project_id = dbsp.maint_project_id
</sql>
<!-- public List<DmsBaseMaintProject> selectProjectMenuByStationId(Long maintStationId);
先根据maintStationId去dms_base_station_project中查maintStationId相关的maint_project_id再从dms_base_maint_project根据maint_project_id-->
<select id="selectProjectMenuByStationId" parameterType="Long" resultMap="DmsBaseMaintProjectResult">
<include refid="selectDmsBaseMaintProjectMenuVo"/>
where dbsp.maint_station_id = #{maintStationId}
</select>
</mapper>