现金支付

This commit is contained in:
seesaw
2024-10-31 10:29:36 +08:00
parent cfce1b121f
commit df3afb74b3
2 changed files with 4 additions and 5 deletions

View File

@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.member.service.amount;
import cn.iocoder.yudao.module.member.dal.dataobject.order.DishOrderDO;
import java.math.BigDecimal;
import java.util.List;
public interface DeductionService {
@ -13,9 +12,9 @@ public interface DeductionService {
void deduction(DishOrderDO dishOrderDO);
/**
* 现金提现
* 现金扣款
*/
void cashDraw(Long userId, BigDecimal money);
void cashDraw(Long userId, BigDecimal money,String type);
/**
* 微信提现 金额单位:分

View File

@ -183,7 +183,7 @@ public class DeductionServiceImpl implements DeductionService {
@Override
public void cashDraw(Long userId, BigDecimal money) {
public void cashDraw(Long userId, BigDecimal money, String type) {
BigDecimal newMoney;
BigDecimal wxNewMoney;
@ -211,7 +211,7 @@ public class DeductionServiceImpl implements DeductionService {
cardDO.setUserId(userId);
cardDO.setFlag(CardDO.MINUS);
cardDO.setChangeMoney(money);
cardDO.setType(CostTypeEnum.CASH_WITHDRAW.getCode());
cardDO.setType(type);
cardDO.setWxAmount(wxNewMoney);
cardDO.setGiftAmount(giftNewMoney);
cardDO.setMoney(newMoney);