1.代客下单 会员支付,负数余额问题

This commit is contained in:
2024-08-23 10:47:38 +08:00
parent 614ffc9abf
commit 8381287036

View File

@@ -37,7 +37,7 @@ public interface TbMShopUserMapper extends BaseMapper<TbShopUser> {
"</script>") "</script>")
Map<String, Object> selectUserSummary(@Param("shopId") String shopId, @Param("isVip") Integer isVip); Map<String, Object> selectUserSummary(@Param("shopId") String shopId, @Param("isVip") Integer isVip);
@Update("update tb_shop_user set amount=amount-#{orderAmount}, consume_amount=consume_amount+#{orderAmount} where id=#{vipUserId} and amount >= 0") @Update("update tb_shop_user set amount=amount-#{orderAmount}, consume_amount=consume_amount+#{orderAmount} where id=#{vipUserId} and amount-#{orderAmount} >= 0")
long decrBalance(@Param("vipUserId") Integer vipUserId, @Param("orderAmount") BigDecimal orderAmount); long decrBalance(@Param("vipUserId") Integer vipUserId, @Param("orderAmount") BigDecimal orderAmount);
} }