You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/09/16 15:38:00 UTC

[GitHub] [shardingsphere] wang7241 commented on issue #7489: When i updateBatch,the sqls only one route to shard tables

wang7241 commented on issue #7489:
URL: https://github.com/apache/shardingsphere/issues/7489#issuecomment-693488662


   > 
   > 
   > what's your original sql?
   
   sorry,i forget
   
   <update id="updateBatchNoAssessCountByStuCwId">
   		<foreach collection="list" item="item" index="index" open="" close="" separator=";">
   			UPDATE oral_cw_classwork_stu SET no_assess_count = if(ISNULL(no_assess_count),0,no_assess_count) + 1,update_time = #{item.updateTime}
   			<where>
   				<if test="item.teaCwId != null"> AND tea_cw_id = #{item.teaCwId} </if>
   				<if test="item.schoolId != null"> AND school_id = #{item.schoolId} </if>
   				<if test="item.classId != null"> AND class_id = #{item.classId} </if>
   				<if test="item.stuCwId != null"> AND stu_cw_id = #{item.stuCwId} </if>
   				<if test="item.cwShowStatus != null"> AND cw_show_status = #{item.cwShowStatus}</if>
   			</where>
   		</foreach>
   	</update>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org