whycxzp
2025-06-10 73bb5617e6aeb4ee8f7dfd4ad54b61d477969d86
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?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="com.whyc.mapper.BattWarehouseMapper" >
 
 
    <update id="updateActivateBatchById">
        <foreach collection="list" item="item" index="index" separator=";">
            update tb_batt_warehouse
            <set>
                <if test="item.taskNo != null">
                    task_no = #{item.taskNo},
                </if>
                <if test="item.onPlan != null">
                    on_plan = #{item.onPlan},
                </if>
            </set>
            where id = #{item.id}
        </foreach>
    </update>
 
    <update id="updateChargeBatchById">
        <foreach collection="list" item="item" index="index" separator=";">
            update tb_batt_warehouse
            <set>
                <if test="item.chargeTaskNo != null">
                    charge_task_no = #{item.chargeTaskNo},
                </if>
                <if test="item.chargeOnPlan != null">
                    charge_on_plan = #{item.chargeOnPlan},
                </if>
            </set>
            where id = #{item.id}
        </foreach>
    </update>
 
    <update id="updateDischargeBatchById">
        <foreach collection="list" item="item" index="index" separator=";">
            update tb_batt_warehouse
            <set>
                <if test="item.dischargeTaskNo != null">
                    discharge_task_no = #{item.dischargeTaskNo},
                </if>
                <if test="item.dischargeOnPlan != null">
                    discharge_on_plan = #{item.dischargeOnPlan},
                </if>
            </set>
            where id = #{item.id}
        </foreach>
    </update>
</mapper>