|
@@ -2,15 +2,20 @@
|
|
<!DOCTYPE mapper
|
|
<!DOCTYPE mapper
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
-<mapper namespace="com.ruoyi.system.mapper.MaintenanceStaffMapper">
|
|
|
|
|
|
+<mapper namespace="com.ruoyi.system.mapper.StaffManageMapper">
|
|
|
|
|
|
- <resultMap type="MaintenanceStaff" id="MaintenanceStaffResult">
|
|
|
|
|
|
+ <resultMap type="StaffManage" id="StaffManageResult">
|
|
<result property="staffId" column="staff_id" />
|
|
<result property="staffId" column="staff_id" />
|
|
<result property="staffName" column="staff_name" />
|
|
<result property="staffName" column="staff_name" />
|
|
<result property="gender" column="gender" />
|
|
<result property="gender" column="gender" />
|
|
|
|
+ <result property="staffCategory" column="staff_category" />
|
|
<result property="maintenanceCategory" column="maintenance_category" />
|
|
<result property="maintenanceCategory" column="maintenance_category" />
|
|
<result property="phoneNumber" column="phone_number" />
|
|
<result property="phoneNumber" column="phone_number" />
|
|
<result property="avatarPhoto" column="avatar_photo" />
|
|
<result property="avatarPhoto" column="avatar_photo" />
|
|
|
|
+ <result property="idCard" column="id_card" />
|
|
|
|
+ <result property="idCardFront" column="id_card_front" />
|
|
|
|
+ <result property="idCardBack" column="id_card_back" />
|
|
|
|
+ <result property="certificate" column="certificate" />
|
|
<result property="status" column="status" />
|
|
<result property="status" column="status" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="createTime" column="create_time" />
|
|
@@ -19,35 +24,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="remark" column="remark" />
|
|
<result property="remark" column="remark" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
- <sql id="selectMaintenanceStaffVo">
|
|
|
|
- select staff_id, staff_name, gender, maintenance_category, phone_number, avatar_photo, status, create_by, create_time, update_by, update_time, remark from maintenance_staff
|
|
|
|
|
|
+ <sql id="selectStaffManageVo">
|
|
|
|
+ select staff_id, staff_name, gender, staff_category, maintenance_category, phone_number, avatar_photo, id_card, id_card_front, id_card_back, certificate, status, create_by, create_time, update_by, update_time, remark from staff_manage
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
- <select id="selectMaintenanceStaffList" parameterType="MaintenanceStaff" resultMap="MaintenanceStaffResult">
|
|
|
|
- <include refid="selectMaintenanceStaffVo"/>
|
|
|
|
|
|
+ <select id="selectStaffManageList" parameterType="StaffManage" resultMap="StaffManageResult">
|
|
|
|
+ <include refid="selectStaffManageVo"/>
|
|
<where>
|
|
<where>
|
|
<if test="staffName != null and staffName != ''"> and staff_name like concat('%', #{staffName}, '%')</if>
|
|
<if test="staffName != null and staffName != ''"> and staff_name like concat('%', #{staffName}, '%')</if>
|
|
<if test="gender != null and gender != ''"> and gender = #{gender}</if>
|
|
<if test="gender != null and gender != ''"> and gender = #{gender}</if>
|
|
|
|
+ <if test="staffCategory != null and staffCategory != ''"> and staff_category = #{staffCategory}</if>
|
|
<if test="maintenanceCategory != null and maintenanceCategory != ''"> and maintenance_category = #{maintenanceCategory}</if>
|
|
<if test="maintenanceCategory != null and maintenanceCategory != ''"> and maintenance_category = #{maintenanceCategory}</if>
|
|
<if test="phoneNumber != null and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
|
|
<if test="phoneNumber != null and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
|
|
<if test="avatarPhoto != null and avatarPhoto != ''"> and avatar_photo = #{avatarPhoto}</if>
|
|
<if test="avatarPhoto != null and avatarPhoto != ''"> and avatar_photo = #{avatarPhoto}</if>
|
|
|
|
+ <if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
|
|
|
|
+ <if test="idCardFront != null and idCardFront != ''"> and id_card_front = #{idCardFront}</if>
|
|
|
|
+ <if test="idCardBack != null and idCardBack != ''"> and id_card_back = #{idCardBack}</if>
|
|
|
|
+ <if test="certificate != null and certificate != ''"> and certificate = #{certificate}</if>
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <select id="selectMaintenanceStaffByStaffId" parameterType="Long" resultMap="MaintenanceStaffResult">
|
|
|
|
- <include refid="selectMaintenanceStaffVo"/>
|
|
|
|
|
|
+ <select id="selectStaffManageByStaffId" parameterType="Long" resultMap="StaffManageResult">
|
|
|
|
+ <include refid="selectStaffManageVo"/>
|
|
where staff_id = #{staffId}
|
|
where staff_id = #{staffId}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <insert id="insertMaintenanceStaff" parameterType="MaintenanceStaff" useGeneratedKeys="true" keyProperty="staffId">
|
|
|
|
- insert into maintenance_staff
|
|
|
|
|
|
+ <insert id="insertStaffManage" parameterType="StaffManage" useGeneratedKeys="true" keyProperty="staffId">
|
|
|
|
+ insert into staff_manage
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="staffName != null">staff_name,</if>
|
|
<if test="staffName != null">staff_name,</if>
|
|
<if test="gender != null">gender,</if>
|
|
<if test="gender != null">gender,</if>
|
|
|
|
+ <if test="staffCategory != null">staff_category,</if>
|
|
<if test="maintenanceCategory != null">maintenance_category,</if>
|
|
<if test="maintenanceCategory != null">maintenance_category,</if>
|
|
<if test="phoneNumber != null">phone_number,</if>
|
|
<if test="phoneNumber != null">phone_number,</if>
|
|
<if test="avatarPhoto != null">avatar_photo,</if>
|
|
<if test="avatarPhoto != null">avatar_photo,</if>
|
|
|
|
+ <if test="idCard != null">id_card,</if>
|
|
|
|
+ <if test="idCardFront != null">id_card_front,</if>
|
|
|
|
+ <if test="idCardBack != null">id_card_back,</if>
|
|
|
|
+ <if test="certificate != null">certificate,</if>
|
|
<if test="status != null">status,</if>
|
|
<if test="status != null">status,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
@@ -58,9 +73,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="staffName != null">#{staffName},</if>
|
|
<if test="staffName != null">#{staffName},</if>
|
|
<if test="gender != null">#{gender},</if>
|
|
<if test="gender != null">#{gender},</if>
|
|
|
|
+ <if test="staffCategory != null">#{staffCategory},</if>
|
|
<if test="maintenanceCategory != null">#{maintenanceCategory},</if>
|
|
<if test="maintenanceCategory != null">#{maintenanceCategory},</if>
|
|
<if test="phoneNumber != null">#{phoneNumber},</if>
|
|
<if test="phoneNumber != null">#{phoneNumber},</if>
|
|
<if test="avatarPhoto != null">#{avatarPhoto},</if>
|
|
<if test="avatarPhoto != null">#{avatarPhoto},</if>
|
|
|
|
+ <if test="idCard != null">#{idCard},</if>
|
|
|
|
+ <if test="idCardFront != null">#{idCardFront},</if>
|
|
|
|
+ <if test="idCardBack != null">#{idCardBack},</if>
|
|
|
|
+ <if test="certificate != null">#{certificate},</if>
|
|
<if test="status != null">#{status},</if>
|
|
<if test="status != null">#{status},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
@@ -70,14 +90,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
- <update id="updateMaintenanceStaff" parameterType="MaintenanceStaff">
|
|
|
|
- update maintenance_staff
|
|
|
|
|
|
+ <update id="updateStaffManage" parameterType="StaffManage">
|
|
|
|
+ update staff_manage
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="staffName != null">staff_name = #{staffName},</if>
|
|
<if test="staffName != null">staff_name = #{staffName},</if>
|
|
<if test="gender != null">gender = #{gender},</if>
|
|
<if test="gender != null">gender = #{gender},</if>
|
|
|
|
+ <if test="staffCategory != null">staff_category = #{staffCategory},</if>
|
|
<if test="maintenanceCategory != null">maintenance_category = #{maintenanceCategory},</if>
|
|
<if test="maintenanceCategory != null">maintenance_category = #{maintenanceCategory},</if>
|
|
<if test="phoneNumber != null">phone_number = #{phoneNumber},</if>
|
|
<if test="phoneNumber != null">phone_number = #{phoneNumber},</if>
|
|
<if test="avatarPhoto != null">avatar_photo = #{avatarPhoto},</if>
|
|
<if test="avatarPhoto != null">avatar_photo = #{avatarPhoto},</if>
|
|
|
|
+ <if test="idCard != null">id_card = #{idCard},</if>
|
|
|
|
+ <if test="idCardFront != null">id_card_front = #{idCardFront},</if>
|
|
|
|
+ <if test="idCardBack != null">id_card_back = #{idCardBack},</if>
|
|
|
|
+ <if test="certificate != null">certificate = #{certificate},</if>
|
|
<if test="status != null">status = #{status},</if>
|
|
<if test="status != null">status = #{status},</if>
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
@@ -88,12 +113,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
where staff_id = #{staffId}
|
|
where staff_id = #{staffId}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
- <delete id="deleteMaintenanceStaffByStaffId" parameterType="Long">
|
|
|
|
- delete from maintenance_staff where staff_id = #{staffId}
|
|
|
|
|
|
+ <delete id="deleteStaffManageByStaffId" parameterType="Long">
|
|
|
|
+ delete from staff_manage where staff_id = #{staffId}
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
- <delete id="deleteMaintenanceStaffByStaffIds" parameterType="String">
|
|
|
|
- delete from maintenance_staff where staff_id in
|
|
|
|
|
|
+ <delete id="deleteStaffManageByStaffIds" parameterType="String">
|
|
|
|
+ delete from staff_manage where staff_id in
|
|
<foreach item="staffId" collection="array" open="(" separator="," close=")">
|
|
<foreach item="staffId" collection="array" open="(" separator="," close=")">
|
|
#{staffId}
|
|
#{staffId}
|
|
</foreach>
|
|
</foreach>
|