| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?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.persagy.fm.person.dao.PersonMapper">
- <resultMap id="PersonMap" type="com.persagy.fm.person.model.Person">
- <result column="id" property="id"/>
- <result column="name" property="name"/>
- <result column="username" property="username"/>
- <result column="id_number" property="idNumber"/>
- <result column="gender" property="gender"/>
- <result column="birthday" property="birthday"/>
- <result column="other_account" property="otherAccount"/>
- <result column="user_from" property="userFrom"/>
- <result column="remark" property="remark"/>
- <result column="profession" property="profession"/>
- <result column="ts" property="ts"/>
- <result column="creation_time" property="creationTime"/>
- <result column="creator" property="creator"/>
- <result column="modifier" property="modifier"/>
- <result column="modified_time" property="modifiedTime"/>
- <result column="valid" property="valid"/>
- </resultMap>
- <resultMap id="SimplePersonMap" type="com.persagy.fm.person.model.Person">
- <result column="id" property="id"/>
- <result column="name" property="name"/>
- <result column="profession" property="profession"/>
- </resultMap>
- <select id="queryPersonList" parameterType="com.persagy.fm.person.model.dto.PageQueryPersonDTO"
- resultType="com.persagy.fm.person.model.Person">
- select p.id as id, p.name as name, p.profession as profession
- from person p,
- work_resume w
- where p.id = w.person_id
- <if test="depId != null">
- and w.dep_id = #{depId}
- </if>
- <if test="state != null">
- and w.state = #{state}
- </if>
- <if test="name != null">
- and p.name = #{name}
- </if>
- order by w.is_leader desc, p.name_pinyin
- </select>
- <select id="queryCount" parameterType="com.persagy.fm.person.model.dto.PageQueryPersonDTO"
- resultType="int">
- select count(*) total
- from person p,
- work_resume w
- where p.id = w.person_id
- <if test="depId != null">
- and w.dep_id = #{depId}
- </if>
- <if test="state != null">
- and w.state = #{state}
- </if>
- <if test="name != null">
- and p.name = #{name}
- </if>
- </select>
- </mapper>
|