会员充值 退款

This commit is contained in:
2025-03-07 11:24:38 +08:00
parent be47876412
commit 562fbf1695
3 changed files with 15 additions and 9 deletions

View File

@@ -3,9 +3,12 @@ package com.czg.service.account.service.impl;
import com.czg.account.entity.ShopUserFlow;
import com.czg.account.service.ShopUserFlowService;
import com.czg.service.account.mapper.ShopUserFlowMapper;
import com.mybatisflex.core.update.UpdateChain;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import org.apache.dubbo.config.annotation.DubboService;
import java.math.BigDecimal;
/**
* 用户余额流水 服务层实现。
*
@@ -15,4 +18,11 @@ import org.apache.dubbo.config.annotation.DubboService;
@DubboService
public class ShopUserFlowServiceImpl extends ServiceImpl<ShopUserFlowMapper, ShopUserFlow> implements ShopUserFlowService {
@Override
public void updateRefund(Long id, BigDecimal refundAmount) {
UpdateChain.of(ShopUserFlow.class)
.setRaw(ShopUserFlow::getRefundAmount, "refund_amount + " + refundAmount)
.eq(ShopUserFlow::getId, id)
.update();
}
}