<?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>
|