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-oa/target/classes/mapper/oa/OaCandidateuserTMapper.xml

50 lines
2.3 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.oa.from.dataDao.CandidateuserMybatisDao">
<resultMap id="BaseResultMap" type="cn.jyjz.xiaoyao.oa.from.dataobject.Candidateuser">
<id column="ID" property="id" jdbcType="BIGINT"/>
<result column="CANDIDATEID" property="candidateid" jdbcType="BIGINT"/>
<result column="USERDISID" property="userdisid" jdbcType="BIGINT"/>
</resultMap>
<resultMap id="BaseResultMapInclude" type="cn.jyjz.xiaoyao.oa.from.dataobject.Candidateuser">
<id column="ID" property="id" jdbcType="BIGINT"/>
<result column="CANDIDATEID" property="candidateid" jdbcType="BIGINT"/>
<result column="USERDISID" property="userdisid" jdbcType="BIGINT"/>
<association property="candidate" column="CANDIDATEID" select="cn.jyjz.xiaoyao.oa.from.dataDao.CandidateMybatisDao.selectById"/>
</resultMap>
<sql id="Base_Column_List">
ID AS id,
CANDIDATEID AS candidateid,
USERDISID AS userdisid
</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="candidateid != null"> and CANDIDATEID ${candidateid.dataOp} ${candidateid.likestar}#{candidateid.value}${candidateid.likeend}</if>
<if test="userdisid != null"> and USERDISID ${userdisid.dataOp} ${userdisid.likestar}#{userdisid.value}${userdisid.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="selectByUserDistionaryId" resultMap="BaseResultMap" parameterType="java.lang.Long">
select * from OA_CANDIDATEUSER_T where USERDISID = #{userdisid}
</select>
<select id="selectByCandidateuser" resultMap="BaseResultMapInclude" parameterType="java.util.Map">
select * from OA_CANDIDATEUSER_T
<include refid="Base_Where" />
</select>
</mapper>