Commit bbc16bb9374375922c65ffe13ef1d7bb08366d6a

Authored by jason
1 parent ebd4ea54

钱包充值 Mapper 类

yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/wallet/PayWalletRechargeDO.java 0 → 100644
  1 +package cn.iocoder.yudao.module.pay.dal.dataobject.wallet;
  2 +
  3 +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
  4 +import com.baomidou.mybatisplus.annotation.KeySequence;
  5 +import com.baomidou.mybatisplus.annotation.TableId;
  6 +import com.baomidou.mybatisplus.annotation.TableName;
  7 +import lombok.Data;
  8 +
  9 +import java.time.LocalDateTime;
  10 +
  11 +/**
  12 + * 会员钱包充值
  13 + */
  14 +@TableName(value ="pay_wallet_recharge")
  15 +@KeySequence("pay_wallet_recharge_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
  16 +@Data
  17 +public class PayWalletRechargeDO extends BaseDO {
  18 +
  19 + /**
  20 + * 编号
  21 + */
  22 + @TableId
  23 + private Long id;
  24 +
  25 + /**
  26 + * 会员钱包 id
  27 + */
  28 + private Long walletId;
  29 +
  30 + /**
  31 + * 用户实际到账余额,例如充 100 送 20,则该值是 120
  32 + */
  33 + private Integer price;
  34 +
  35 + /**
  36 + * 实际支付金额
  37 + */
  38 + private Integer payPrice;
  39 +
  40 + /**
  41 + * 钱包赠送金额
  42 + */
  43 + private Integer walletBonus;
  44 +
  45 + /**
  46 + * 是否已支付:[0:未支付 1:已经支付过]
  47 + */
  48 + private Boolean payStatus;
  49 +
  50 + /**
  51 + * 支付订单编号
  52 + */
  53 + private Long payOrderId;
  54 +
  55 + /**
  56 + * 支付成功的支付渠道
  57 + */
  58 + private String payChannelCode;
  59 +
  60 + /**
  61 + * 订单支付时间
  62 + */
  63 + private LocalDateTime payTime;
  64 +
  65 + /**
  66 + * 支付退款单编号
  67 + */
  68 + private Long payRefundId;
  69 +
  70 + /**
  71 + * 退款金额,包含赠送金额
  72 + */
  73 + private Integer refundPrice;
  74 +
  75 + /**
  76 + * 退款支付金额
  77 + */
  78 + private Integer refundPayPrice;
  79 +
  80 + /**
  81 + * 退款钱包赠送金额
  82 + */
  83 + private Integer refundWalletBonus;
  84 +
  85 + /**
  86 + * 退款时间
  87 + */
  88 + private LocalDateTime refundTime;
  89 +}
0 90 \ No newline at end of file
... ...
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/wallet/PayWalletRechargeMapper.java 0 → 100644
  1 +package cn.iocoder.yudao.module.pay.dal.mysql.wallet;
  2 +
  3 +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
  4 +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
  5 +import cn.iocoder.yudao.module.pay.dal.dataobject.demo.PayDemoOrderDO;
  6 +import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargeDO;
  7 +import org.apache.ibatis.annotations.Mapper;
  8 +
  9 +@Mapper
  10 +public interface PayWalletRechargeMapper extends BaseMapperX<PayWalletRechargeDO> {
  11 +
  12 + default int updateByIdAndPaid(Long id, boolean wherePayed, PayWalletRechargeDO updateObj){
  13 + return update(updateObj, new LambdaQueryWrapperX<PayWalletRechargeDO>()
  14 + .eq(PayWalletRechargeDO::getId, id).eq(PayWalletRechargeDO::getPayStatus, wherePayed));
  15 + }
  16 +}
  17 +
  18 +
  19 +
  20 +
... ...