179 lines
6.8 KiB
XML
Raw Normal View History

2026-03-10 14:30:24 +08:00
<?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="Transfer">
<insert id="insertTransfer" parameterType="Transfer">
INSERT INTO Transfer ( transferId, studentId, sourceClassId, sourceDate, targetClassId, targetDate, status , areaid ) Values ( #{transferId}, #{studentId}, #{sourceClassId}, #{sourceDate}, #{targetClassId}, #{targetDate}, #{status} , #{areaid} )
</insert>
<update id="updateTransfer" parameterType="Transfer">
UPDATE Transfer SET
transferId = #{transferId}, studentId = #{studentId}, sourceClassId = #{sourceClassId}, sourceDate = #{sourceDate}, targetClassId = #{targetClassId}, targetDate = #{targetDate}, status = #{status} , areaid = #{areaid}
where transferId=#{transferId} and studentId=#{studentId} and areaid = #{areaid}
</update>
<select id="getTransferByKey" parameterType="java.util.Map" resultType="Transfer">
SELECT transferId , studentId , sourceClassId , sourceDate , targetClassId , targetDate , status , areaid
FROM Transfer WHERE transferId=#{transferId} and studentId=#{studentId} and areaid = #{areaid}
</select>
<select id="getSeqTransfer" resultType="Integer" useCache="false" flushCache="true">
SELECT nextval('seq_transferId') ;
</select>
<insert id="insertTransferBatch" parameterType="java.util.List">
INSERT INTO Transfer ( transferId, studentId, sourceClassId, sourceDate, targetClassId, targetDate, status , areaid ) Values
<foreach collection="list" index="index" item="item" separator=",">
( #{item.transferId}, #{item.studentId}, #{item.sourceClassId}, #{item.sourceDate}, #{item.targetClassId}, #{item.targetDate}, #{item.status} , #{item.areaid} )
</foreach>
</insert>
<select id="getTransfersByStudentId" parameterType="java.util.Map" resultType="Transfer">
SELECT transferId , studentId , sourceClassId , sourceDate , targetClassId , targetDate , status , areaid
FROM Transfer
WHERE studentId=#{studentId} and status = 1 , and areaid= #{areaid}
</select>
<update id="finishTransfer" parameterType="java.util.Map">
UPDATE Transfer
SET status = 1 , targetClassId = #{targetClassId} ,
targetDate = current_timestamp
WHERE status = 0
AND studentId in
<foreach collection="studentIds" item="item" separator="," close=")" open="(">
#{item}
</foreach>
</update>
<update id="updateWordAchiveOfAreaId" parameterType="java.util.Map" >
update wordachive set areaId = #{areaId} where uid=#{studentId}
</update>
<update id="updateUserOwnLessonOfAreaId" parameterType="java.util.Map" >
update userownlesson set areaId = #{areaId} where uid=#{studentId}
</update>
<update id="updateUserHonorOfAreaId" parameterType="java.util.Map" >
update userhonor set areaId = #{areaId} where uid=#{studentId}
</update>
<update id="updateTransferOfAreaId" parameterType="java.util.Map" >
update transfer set areaId = #{areaId} where studentId=#{studentId}
</update>
<update id="updateReplyMessageOfAreaId" parameterType="java.util.Map" >
update replymessage set areaId = #{areaId} where uid=#{studentId}
</update>
<update id="updateRaceScoreOfAreaId" parameterType="java.util.Map" >
update racescore set areaId = #{areaId} where uid=#{studentId}
</update>
<update id="updatePronoStatOfAreaId" parameterType="java.util.Map" >
update pronostat set areaId = #{areaId} where uid=#{studentId}
</update>
<update id="updatePointLogAreaId" parameterType="java.util.Map" >
update pointlog set areaId = #{areaId} where uid=#{studentId}
</update>
<update id="updateOrderOwnGoodsOfAreaId" parameterType="java.util.Map" >
update orderowngoods set areaId = #{areaId} where orderinfoId
in ( select orderinfoid from orderinfo where uid =#{studentId} )
</update>
<update id="updateOrderInfoOfAreaId" parameterType="java.util.Map" >
update orderinfo set areaId = #{areaId} where uid=#{studentId}
</update>
<update id="updateLeaveMessMasterOfAreaId" parameterType="java.util.Map" >
update leavemessmaster set areaId = #{areaId} where uid=#{studentId}
</update>
<update id="updateLeaveMessageOfAreaId" parameterType="java.util.Map" >
update leavemessage set areaId = #{areaId} where uid=#{studentId}
</update>
<update id="updateHearAnswerOfAreaId" parameterType="java.util.Map" >
update hearanswer set areaId = #{areaId} where userId=#{studentId}
</update>
<update id="updateFollowshipOfAreaId" parameterType="java.util.Map" >
update followship set areaId = #{areaId} where follower =#{studentId}
</update>
<update id="updateFinishWordsStatOfAreaId" parameterType="java.util.Map" >
update finishwordsstat set areaId = #{areaId} where uid=#{studentId}
</update>
<update id="updateFinishLessonStatOfAreaId" parameterType="java.util.Map" >
update finishlessonstat set areaId = #{areaId} where uid=#{studentId}
</update>
<update id="updateFinishAssignStatOfAreaId" parameterType="java.util.Map" >
update finishassignstat set areaId = #{areaId} where uid=#{studentId}
</update>
<update id="updateExamAnswerOfAreaId" parameterType="java.util.Map" >
update examanswer set areaId = #{areaId} where userId=#{studentId}
</update>
<update id="updateEmoneyLogOfAreaId" parameterType="java.util.Map" >
update emoneylog set areaId = #{areaId} where uid=#{studentId}
</update>
<update id="updateDeviceUseLogOfAreaId" parameterType="java.util.Map" >
update deviceuselog set areaId = #{areaId} where uid=#{studentId}
</update>
<update id="updateConnectlogOfAreaId" parameterType="java.util.Map" >
update connectlog set areaId = #{areaId} where uid=#{studentId}
</update>
<update id="updateBlackListOfAreaId" parameterType="java.util.Map" >
update blacklist set areaId = #{areaId} where uid=#{studentId}
</update>
<update id="updateBindInfoOfAreaId" parameterType="java.util.Map" >
update bindinfo set areaId = #{areaId} where uid=#{studentId}
</update>
<update id="updateBadgeLogOfAreaId" parameterType="java.util.Map" >
update badgelog set areaId = #{areaId} where userId=#{studentId}
</update>
<update id="updateAchivementOfAreaId" parameterType="java.util.Map" >
update achivement set areaId = #{areaId} where uid=#{studentId}
</update>
<update id="updateDubCriticOfAreaId" parameterType="java.util.Map" >
update DubCritic set areaId = #{areaId} where uid=#{studentId}
</update>
<update id="updateDubUserVoiceOfAreaId" parameterType="java.util.Map" >
update DubUserVoice set areaId = #{areaId} where uid=#{studentId}
</update>
</mapper>