|
|
@ -1,12 +1,39 @@
|
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<?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" >
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
|
<mapper namespace="com.ipsos.plugins.xpack.mapper.dept.XpackExtDeptMapper">
|
|
|
|
<mapper namespace="com.ipsos.plugins.xpack.mapper.dept.XpackExtDeptMapper">
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="simpleNode" type="com.ipsos.common.dto.PluginSimpleTreeNode">
|
|
|
|
<resultMap id="simpleNode" type="com.ipsos.common.dto.PluginSimpleTreeNode">
|
|
|
|
<id property="id" column="id" javaType="java.lang.Long" />
|
|
|
|
<id property="id" column="id" javaType="java.lang.Long" />
|
|
|
|
<result property="pid" column="pid" javaType="java.lang.Long"/>
|
|
|
|
<result property="pid" column="pid" javaType="java.lang.Long"/>
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="gridCondition">
|
|
|
|
|
|
|
|
<where>
|
|
|
|
|
|
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
|
|
|
|
|
<if test="criteria.valid">
|
|
|
|
|
|
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
|
|
|
|
|
<foreach collection="criteria.criteria" item="criterion">
|
|
|
|
|
|
|
|
<choose>
|
|
|
|
|
|
|
|
<when test="criterion.noValue">
|
|
|
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
|
|
|
</when>
|
|
|
|
|
|
|
|
<when test="criterion.singleValue">
|
|
|
|
|
|
|
|
and ${criterion.condition} #{criterion.value}
|
|
|
|
|
|
|
|
</when>
|
|
|
|
|
|
|
|
<when test="criterion.betweenValue">
|
|
|
|
|
|
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
|
|
|
|
|
</when>
|
|
|
|
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
|
|
|
|
|
#{listItem}
|
|
|
|
|
|
|
|
</foreach>
|
|
|
|
|
|
|
|
</when>
|
|
|
|
|
|
|
|
</choose>
|
|
|
|
|
|
|
|
</foreach>
|
|
|
|
|
|
|
|
</trim>
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
</foreach>
|
|
|
|
|
|
|
|
</where>
|
|
|
|
|
|
|
|
</sql>
|
|
|
|
<select id="allNodes" resultMap="simpleNode">
|
|
|
|
<select id="allNodes" resultMap="simpleNode">
|
|
|
|
select dept_id as id, pid from sys_dept
|
|
|
|
select dept_id as id, pid from sys_dept
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
@ -14,7 +41,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
<select id="nodesByExample" parameterType="com.ipsos.common.entity.XpackGridExample" resultMap="simpleNode">
|
|
|
|
<select id="nodesByExample" parameterType="com.ipsos.common.entity.XpackGridExample" resultMap="simpleNode">
|
|
|
|
select dept_id as id, pid from sys_dept
|
|
|
|
select dept_id as id, pid from sys_dept
|
|
|
|
<include refid="com.ipsos.common.mapper.PluginGridSql.gridCondition" />
|
|
|
|
<include refid="gridCondition" />
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|