whyclxw
8 小时以前 c7795eb09f3059f1a0310bc817e2fa0e9e64d29e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?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.DeviceSpareMapper" >
 
    <update id="outBound">
        <foreach collection="list" item="item" separator=";">
            update web_site.tb_device_spare set quantity = quantity - #{item.quantity}
            where name = #{item.name}
            and model = #{item.model}
            and version = #{item.version}
            and brand = #{item.brand}
            and type = #{item.type}
            and supplier = #{item.supplier}
        </foreach>
    </update>
    <update id="updateQuantityAndPictureBatch">
        <foreach collection="list" item="item" separator=";">
            update web_site.tb_device_spare set quantity = #{item.quantity},picture_url = #{item.pictureUrl}
            where id = #{item.id}
        </foreach>
    </update>
</mapper>