<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper  PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cpic.xim.mybatis.mapper.StaffMapper">
     <select id="queryCpicStaff" resultMap="CpicXIMStaff" >
        SELECT ry.p13uid,
               ry.staff_code,
               ry.staff_name,
               bm.department_code,
               bm.department_name,
               ksh.section_office_code,
               ksh.section_office_name
          FROM idst0.rydm_t ry,
               idst0.ks_t   ksh,
               idst0.bm_t   bm
          WHERE ry.staff_code = #{staffCode,mode=IN}
          AND ry.department_code = bm.department_code
          AND ry.section_office_code = ksh.section_office_code
     </select>
     <resultMap id="CpicXIMStaff" type="com.cpic.xim.mybatis.pojo.CpicStaff">
          <!-- <constructor>
               <arg column="p13uid"  name="p13uid"/>
               <arg column="staff_code"  name="staffCode"/>
               <arg column="staff_name"  name="staffName"/>
               <arg column="department_code"  name="departmentCode"/>
               <arg column="department_name"  name="departmentName"/>
               <arg column="section_office_code"  name="sectionOfficeCode"/>
               <arg column="section_office_name"  name="sectionOfficeName"/>
          </constructor> -->
          <id property="staffCode" column="staff_code"/>
          <result property="staffName" column="staff_name"/>
          <result property="p13UID" column="p13uid"/>
          <result property="departmentCode" column="department_code"/>
          <result property="departmentName" column="department_name"/>
          <result property="sectionOfficeCode" column="section_office_code"/>
          <result property="sectionOfficeName" column="section_office_name"/>
     </resultMap>
</mapper>