You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ocr/jyjz-system/jyjz-system-admin/target/classes/mapper/admin/DepartmentchildMapper.xml

39 lines
1.7 KiB

<?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="cn.jyjz.xiaoyao.admin.dataDao.DepartmentchildMybatisDao">
<resultMap id="BaseResultMap" type="cn.jyjz.xiaoyao.admin.dataobject.Departmentchild">
<id column="ID" property="id" jdbcType="BIGINT"/>
<result column="PARENTID" property="parentid" jdbcType="BIGINT"/>
<result column="CHILDID" property="childid" jdbcType="BIGINT"/>
</resultMap>
<sql id="Base_Column_List">
ID AS id,
PARENTID AS parentid,
CHILDID AS childid
</sql>
<sql id="Base_Where">
<where>
<trim prefixOverrides="and|or">
<if test="id != null"> and ID ${id.dataOp} ${id.likestar}#{id.value}${id.likeend}</if>
<if test="parentid != null"> and PARENTID ${parentid.dataOp} ${parentid.likestar}#{parentid.value}${parentid.likeend}</if>
<if test="childid != null"> and CHILDID ${childid.dataOp} ${childid.likestar}#{childid.value}${childid.likeend}</if>
<if test="userid != null"> and USERID ${userid.dataOp} ${userid.likestar}#{userid.value}${userid.likeend}</if>
<if test="listdept != null">
and DEPARTID in
<foreach collection="listdept.value" item="item" index="index" open="(" separator="," close=")" >
#{item}
</foreach>
</if>
</trim>
</where>
<if test="page != null">
<if test="page.sortname != null"> order by ${page.sortname} ${page.sortorder}</if>
limit ${page.start}, ${page.Pagesize}
</if>
</sql>
<select id="selectChildDepartid" resultType="java.lang.Long" parameterType="java.lang.String">
select CHILDID from S_DEPARTMENTCHILD_T WHERE parentid = #{departid}
</select>
</mapper>