|
|
<?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>
|