<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.staff.dao.ibatis.StaffPerformSummaryDaoImpl">

    <update id="updateSumScore" parameterType="map">
        update mortals_xhx_staff_perform_summary
        set attendScore=0,reviewScore=0,complainScore=0,goworkScore=0,effectScore=0,otherScore=0,errorScore=0,totalScore=100,
        sumScore = totalScore + addTotalScore,updateTime = NOW()
        where 1 = 1
        <if test="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
        <if test="year != null and year!=''"> AND `year` = #{year} </if>
        <if test="month != null and month!=''"> AND `month` = #{month} </if>
    </update>
</mapper>