<?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.tuoheng.miniprogram.dao.WorkOrderMapper">



<!--    <select id="queryPage" resultType="com.tuoheng.miniprogram.vo.WorkOrderInfoVo">-->
<!--        select-->
<!--          wo.code,-->
<!--          wo.create_time as CreateTime,-->
<!--          wo.assign_user as assignUser,-->
<!--          from-->
<!--          th_work_order wo-->
<!--          where wo.mark = 1-->
<!--    </select>-->

    <update id="updateWorkOrder" parameterType="com.tuoheng.miniprogram.entity.WorkOrder">
        update th_work_order
        <trim prefix="SET" suffixOverrides=",">
            <if test="assignDeptId != null and assignDeptId !='' "> assign_dept_id = #{assignDeptId}, </if>
            <if test="assignUser != null and assignUser !='' "> assign_user = #{assignUser}, </if>
            <if test="assignContact != null and assignContact !='' "> assign_contact = #{assignContact}, </if>
            <if test="assignNote != null and assignNote !='' "> assign_note = #{assignNote}, </if>
            <if test="assignTime != null"> assign_time = #{assignTime}, </if>
            <if test="status != null"> status = #{status}, </if>
            <if test="updateUser != null and updateUser != ''"> update_user = #{updateUser}, </if>
            <if test="updateTime != null"> update_time = #{updateTime}, </if>
        </trim>
        where id = #{id}
    </update>

</mapper>