Merge remote-tracking branch 'origin/feature/mall_product' into feature/mall_product

This commit is contained in:
xiaqing 2023-09-15 22:09:13 +08:00
commit 0907ca2081
2 changed files with 109 additions and 0 deletions

View File

@ -0,0 +1,89 @@
package cn.iocoder.yudao.module.pay.dal.dataobject.wallet;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 会员钱包充值
*/
@TableName(value ="pay_wallet_recharge")
@KeySequence("pay_wallet_recharge_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写
@Data
public class PayWalletRechargeDO extends BaseDO {
/**
* 编号
*/
@TableId
private Long id;
/**
* 会员钱包 id
*/
private Long walletId;
/**
* 用户实际到账余额例如充 100 20则该值是 120
*/
private Integer price;
/**
* 实际支付金额
*/
private Integer payPrice;
/**
* 钱包赠送金额
*/
private Integer walletBonus;
/**
* 是否已支付[0:未支付 1:已经支付过]
*/
private Boolean payStatus;
/**
* 支付订单编号
*/
private Long payOrderId;
/**
* 支付成功的支付渠道
*/
private String payChannelCode;
/**
* 订单支付时间
*/
private LocalDateTime payTime;
/**
* 支付退款单编号
*/
private Long payRefundId;
/**
* 退款金额包含赠送金额
*/
private Integer refundPrice;
/**
* 退款支付金额
*/
private Integer refundPayPrice;
/**
* 退款钱包赠送金额
*/
private Integer refundWalletBonus;
/**
* 退款时间
*/
private LocalDateTime refundTime;
}

View File

@ -0,0 +1,20 @@
package cn.iocoder.yudao.module.pay.dal.mysql.wallet;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.pay.dal.dataobject.demo.PayDemoOrderDO;
import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargeDO;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface PayWalletRechargeMapper extends BaseMapperX<PayWalletRechargeDO> {
default int updateByIdAndPaid(Long id, boolean wherePayed, PayWalletRechargeDO updateObj){
return update(updateObj, new LambdaQueryWrapperX<PayWalletRechargeDO>()
.eq(PayWalletRechargeDO::getId, id).eq(PayWalletRechargeDO::getPayStatus, wherePayed));
}
}