会员充值 退款
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user