退款相关实现

台桌列表获取报错fix
This commit is contained in:
2024-09-29 09:55:20 +08:00
parent ffe39b3113
commit 2186cd5a04
10 changed files with 427 additions and 25 deletions

View File

@@ -0,0 +1,8 @@
package cn.ysk.cashier.mybatis.mapper;
import cn.ysk.cashier.pojo.shop.TbMerchantThirdApply;
import cn.ysk.cashier.pojo.shop.TbShopArea;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface MpMerchantThirdApplyMapper extends BaseMapper<TbMerchantThirdApply> {
}

View File

@@ -39,6 +39,9 @@ public interface TbMShopUserMapper extends BaseMapper<TbShopUser> {
@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);
@Update("update tb_shop_user set amount=amount+#{returnAmount}, consume_amount=consume_amount-#{returnAmount}, updated_at=#{current} where id=#{userId}")
void incrBalance(@Param("userId") Integer userId, @Param("shopId") Integer shopId, @Param("returnAmount") BigDecimal returnAmount, @Param("current") long current);
}