xiaoyong931011
2022-09-22 cf0f93a4c122121b205ab52bb5fc3b3b93682670
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>