INSERT INTO UserHonor ( uid, totalPoint, userLevel, levelName, totalMoney, goldMedalCount, silverMedalCount, bronzeMedalCount, cupCount, flowerCount, totalScore, howmuch , studyDuration, studyNum, beFollowCount , areaid ) Values ( #{uid}, #{totalPoint}, #{userLevel}, #{levelName}, #{totalMoney}, #{goldMedalCount}, #{silverMedalCount}, #{bronzeMedalCount}, #{cupCount}, #{flowerCount}, #{totalScore}, #{howmuch} , #{studyDuration}, #{studyNum}, #{beFollowCount} , #{areaid}) UPDATE UserHonor SET uid = #{uid}, totalPoint = #{totalPoint}, userLevel = #{userLevel}, levelName = #{levelName}, totalMoney = #{totalMoney}, goldMedalCount = #{goldMedalCount}, silverMedalCount = #{silverMedalCount}, bronzeMedalCount = #{bronzeMedalCount}, cupCount = #{cupCount}, flowerCount = #{flowerCount}, totalScore = #{totalScore}, howmuch = #{howmuch} , studyDuration = #{studyDuration}, studyNum = #{studyNum}, beFollowCount = #{beFollowCount} , areaid = #{areaid} where uid=#{uid} INSERT INTO UserHonor ( uid, totalPoint, userLevel, levelName, totalMoney, goldMedalCount, silverMedalCount, bronzeMedalCount, cupCount, flowerCount, totalScore, howmuch, studyDuration, studyNum , beFollowCount , areaid ) Values ( #{item.uid}, #{item.totalPoint}, #{item.userLevel}, #{item.levelName}, #{item.totalMoney}, #{item.goldMedalCount}, #{item.silverMedalCount}, #{item.bronzeMedalCount}, #{item.cupCount}, #{item.flowerCount}, #{item.totalScore}, #{item.howmuch}, #{item.studyDuration}, #{item.studyNum} , #{item.beFollowCount} , #{item.areaid} ) UPDATE UserHonor SET studyDuration = studyDuration + #{studyDuration}, studyNum = studyNum + 1 where uid=#{uid} and areaid = #{areaid} UPDATE UserHonor SET beFollowCount = #{beFollowCount} WHERE uid=#{uid} and areaid = #{areaid} delete from UserHonor where uid = #{studentId} and areaid = #{areaId}