【功能优化】增加钱包分佣提现功能
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package cn.iocoder.yudao.module.pay.api.wallet;
|
||||
|
||||
import cn.iocoder.yudao.module.pay.api.wallet.dto.PayWalletCreateReqDto;
|
||||
import cn.iocoder.yudao.module.pay.api.wallet.dto.PayWalletRespDTO;
|
||||
|
||||
/**
|
||||
* 钱包 API 接口
|
||||
*
|
||||
* @author liurulin
|
||||
*/
|
||||
public interface PayWalletApi {
|
||||
|
||||
/**
|
||||
* 添加钱包
|
||||
* @param reqDTO 创建请求
|
||||
*/
|
||||
void addWallet(PayWalletCreateReqDto reqDTO);
|
||||
|
||||
/**
|
||||
* 根据用户id获取钱包信息
|
||||
* @param userId 用户id
|
||||
* @return 钱包信息
|
||||
*/
|
||||
PayWalletRespDTO getWalletByUserId(Long userId);
|
||||
}
|
@@ -0,0 +1,42 @@
|
||||
package cn.iocoder.yudao.module.pay.api.wallet.dto;
|
||||
|
||||
import cn.iocoder.yudao.module.pay.enums.wallet.PayWalletBizTypeEnum;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PayWalletCreateReqDto {
|
||||
|
||||
/**
|
||||
* 钱包编号
|
||||
*/
|
||||
@NotNull(message = "钱包编号不能为空")
|
||||
private Long walletId;
|
||||
|
||||
/**
|
||||
* 关联业务分类
|
||||
*/
|
||||
@NotNull(message = "关联业务分类不能为空")
|
||||
private PayWalletBizTypeEnum bizType;
|
||||
|
||||
/**
|
||||
* 关联业务编号
|
||||
*/
|
||||
@NotNull(message = "关联业务编号不能为空")
|
||||
private String bizId;
|
||||
|
||||
/**
|
||||
* 流水说明
|
||||
*/
|
||||
@NotNull(message = "流水说明不能为空")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 交易金额,单位分
|
||||
*
|
||||
* 正值表示余额增加,负值表示余额减少
|
||||
*/
|
||||
@NotNull(message = "交易金额不能为空")
|
||||
private Integer price;
|
||||
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
package cn.iocoder.yudao.module.pay.api.wallet.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PayWalletRespDTO {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 余额,单位分
|
||||
*/
|
||||
private Integer balance;
|
||||
|
||||
}
|
@@ -19,7 +19,8 @@ public enum PayWalletBizTypeEnum implements IntArrayValuable {
|
||||
RECHARGE_REFUND(2, "充值退款"),
|
||||
PAYMENT(3, "支付"),
|
||||
PAYMENT_REFUND(4, "支付退款"),
|
||||
UPDATE_BALANCE(5, "更新余额");
|
||||
UPDATE_BALANCE(5, "更新余额"),
|
||||
WITHDRAW(6, "分佣提现");
|
||||
|
||||
/**
|
||||
* 业务分类
|
||||
@@ -36,4 +37,5 @@ public enum PayWalletBizTypeEnum implements IntArrayValuable {
|
||||
public int[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user