<?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.hzs.sale.all.mapper.AllProductMapper">

    <!-- 更新产品库存 -->
    <update id="changeInventory">
        update ALL_PRODUCT ap
        set ap.inventory = ap.inventory + #{param.inventory},
        <if test="param.pkModified != null">
            ap.pk_modified = #{param.pkModified},
        </if>
        ap.modified_time = sysdate
        where ap.pk_id = #{param.pkId}
    </update>

</mapper>
