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.
|
|
|
<?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.supervision.knowsub.mapper.SystemBaseDeptRelationMapper">
|
|
|
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.supervision.knowsub.model.SystemBaseDeptRelation">
|
|
|
|
<id property="id" column="id" jdbcType="VARCHAR"/>
|
|
|
|
<result property="baseId" column="base_id" jdbcType="VARCHAR"/>
|
|
|
|
<result property="deptId" column="dept_id" jdbcType="VARCHAR"/>
|
|
|
|
<result property="createUserId" column="create_user_id" jdbcType="VARCHAR"/>
|
|
|
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
|
<result property="updateUserId" column="update_user_id" jdbcType="VARCHAR"/>
|
|
|
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
id,base_id,dept_id,
|
|
|
|
create_user_id,create_time,update_user_id,
|
|
|
|
update_time
|
|
|
|
</sql>
|
|
|
|
<select id="listBaseDeptRelation" resultType="com.supervision.knowsub.dto.dept.BaseDeptRelationDTO">
|
|
|
|
select dr.id as id,
|
|
|
|
dr.base_id as baseId,
|
|
|
|
dr.dept_id as deptId,
|
|
|
|
d.dept_name as deptName
|
|
|
|
from ks_system_base_dept_relation dr
|
|
|
|
left join ks_system_dept d on dr.dept_id = d.id
|
|
|
|
where 1=1
|
|
|
|
<if test="systemBaseIds != null and systemBaseIds.size() > 0">
|
|
|
|
and dr.base_id in
|
|
|
|
<foreach collection="systemBaseIds" item="item" index="index" open="(" separator="," close=")">
|
|
|
|
#{item}
|
|
|
|
</foreach>
|
|
|
|
</if>
|
|
|
|
</select>
|
|
|
|
</mapper>
|