xiaoyong931011
2022-09-16 5501ffc9b44e7367a8d44c0c0d85d4452ca50274
src/main/resources/mapper/modules/MallGoodsMapper.xml
@@ -264,4 +264,11 @@
        from mall_goods_comment a limit 1
    </select>
    <update id="upDateStockAndVolumeByGoodsId">
        update mall_goods
        set stock = stock - #{cnt},
            volume = volume + #{cnt}
        where id=#{id} and  stock - #{cnt} <![CDATA[ >= ]]> 0
    </update>
</mapper>