|
|
|
<?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.engine.organization.mapper.extend.ExtendGroupMapper">
|
|
|
|
<resultMap id="BaseResultMap" type="com.engine.organization.entity.extend.po.ExtendGroupPO">
|
|
|
|
<result column="id" property="id"/>
|
|
|
|
<result column="extend_type" property="extendType"/>
|
|
|
|
<result column="group_name" property="groupName"/>
|
|
|
|
<result column="creator" property="creator"/>
|
|
|
|
<result column="delete_type" property="deleteType"/>
|
|
|
|
<result column="create_time" property="createTime"/>
|
|
|
|
<result column="update_time" property="updateTime"/>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<!-- 表字段 -->
|
|
|
|
<sql id="baseColumns">
|
|
|
|
t
|
|
|
|
.
|
|
|
|
id
|
|
|
|
, t.pid
|
|
|
|
, t.extend_type
|
|
|
|
, t.group_name
|
|
|
|
, t.creator
|
|
|
|
, t.delete_type
|
|
|
|
, t.create_time
|
|
|
|
, t.update_time
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="listByType" resultMap="BaseResultMap">
|
|
|
|
SELECT
|
|
|
|
<include refid="baseColumns"/>
|
|
|
|
FROM
|
|
|
|
jcl_field_extendgroup t
|
|
|
|
WHERE t.delete_type = 0
|
|
|
|
<if test=" extendType != null and extendType != '' ">
|
|
|
|
and extend_type = #{extendType}
|
|
|
|
</if>
|
|
|
|
</select>
|
|
|
|
<select id="getGroupNameById" resultType="java.lang.String">
|
|
|
|
select group_name
|
|
|
|
from jcl_field_extendgroup
|
|
|
|
where id = #{id}
|
|
|
|
and delete_type = 0
|
|
|
|
</select>
|
|
|
|
<select id="listGroupByIds" resultMap="BaseResultMap">
|
|
|
|
select
|
|
|
|
<include refid="baseColumns"/>
|
|
|
|
from jcl_field_extendgroup t
|
|
|
|
WHERE t.delete_type = 0
|
|
|
|
AND id IN
|
|
|
|
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
|
|
|
#{id}
|
|
|
|
</foreach>
|
|
|
|
</select>
|
|
|
|
<select id="listGroupByPid" resultMap="BaseResultMap">
|
|
|
|
select
|
|
|
|
<include refid="baseColumns"/>
|
|
|
|
from jcl_field_extendgroup t
|
|
|
|
WHERE t.delete_type = 0
|
|
|
|
and t.pid= #{pid}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|