48 lines
2.0 KiB
XML
48 lines
2.0 KiB
XML
<?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.ruoyi.system.fantang.mapper.FtStaffInfoDaoMapper">
|
|
|
|
<resultMap type="FtStaffInfoDao" id="FtStaffInfoDaoResult">
|
|
<result property="staffId" column="staff_id"/>
|
|
<result property="departId" column="depart_id"/>
|
|
<result property="name" column="name"/>
|
|
<result property="post" column="post"/>
|
|
<result property="role" column="role"/>
|
|
<result property="password" column="password"/>
|
|
<result property="createAt" column="create_at"/>
|
|
<result property="createBy" column="create_by"/>
|
|
<result property="flag" column="flag"/>
|
|
<result property="balance" column="balance"/>
|
|
<result property="staffType" column="staff_type"/>
|
|
<result property="corpName" column="corp_name"/>
|
|
<result property="pictureUrl" column="picture_url"/>
|
|
<result property="deptList" column="dept_list"/>
|
|
<result property="qrCode" column="qr_code"/>
|
|
<result property="sex" column="sex"/>
|
|
<result property="tel" column="tel"/>
|
|
<result property="personId" column="person_id"/>
|
|
</resultMap>
|
|
|
|
<select id="selectStaffInfoWithDepart" parameterType="FtStaffInfoDao"
|
|
resultType="FtStaffInfoDao">
|
|
SELECT a.*, b.depart_name from ft_staff_info a LEFT JOIN ft_depart b on a.depart_id = b.depart_id where
|
|
staff_type = 1 and a.flag = 1
|
|
<if test="departId != null">and b.depart_id = #{departId}</if>
|
|
</select>
|
|
|
|
<select id="getDepartInfo" resultType="FtStaffInfoDao">
|
|
SELECT a.staff_id,
|
|
a.`name`,
|
|
a.corp_name,
|
|
a.picture_url,
|
|
b.depart_id,
|
|
b.depart_name,
|
|
b.depart_code
|
|
FROM ft_staff_info a
|
|
LEFT JOIN ft_depart b ON a.dept_list = b.depart_id
|
|
WHERE a.staff_id = #{staffId}
|
|
</select>
|
|
|
|
</mapper> |