1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
<update id="updateThisMonthBatch" parameterType="java.util.List"> UPDATE crew_scheduling SET plan_name = CASE title <foreach collection="list" item="entity"> <if test="entity.planName == null"> WHEN </if> <if test="entity.planName != null"> WHEN </if> </foreach> END , plan_status = CASE title <foreach collection="list" item="entity"> <if test="entity.planStatus == null"> WHEN </if> <if test="entity.planStatus != null"> WHEN </if> </foreach> END , car_num = CASE title <foreach collection="list" item="entity"> <if test="entity.carNum == null"> WHEN </if> <if test="entity.carNum != null"> WHEN </if> </foreach> END WHERE DATE_FORMAT(create_time,'%Y-%m') = DATE_FORMAT(NOW(),'%Y-%m') </update>
|
近期评论