会员退款
退款回调
This commit is contained in:
@@ -1,16 +1,19 @@
|
||||
|
||||
package com.czg.account.dto.flow;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import java.io.Serial;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 用户余额流水 实体类。
|
||||
*
|
||||
@@ -26,27 +29,56 @@ public class ShopUserFlowDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Long id;
|
||||
|
||||
private Long userId;
|
||||
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 充值金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 当前余额
|
||||
*/
|
||||
private BigDecimal balance;
|
||||
/**
|
||||
* 已退款金额
|
||||
*/
|
||||
private BigDecimal refundAmount;
|
||||
|
||||
/**
|
||||
* 类型:cashIn 会员充值,awardIn 充值奖励,wechatIn 微信小程序充值,alipayIn 支付宝小程序充值,orderPay 订单消费,orderRefund 订单退款,rechargeRefund 充值退款 adminOp 管理员手动增减
|
||||
* 类型:
|
||||
* cashIn 现金充值,
|
||||
* wechatIn 微信小程序充值,
|
||||
* alipayIn 支付宝小程序充值,
|
||||
* awardIn 充值奖励,
|
||||
* rechargeRefund 充值退款
|
||||
* <p>
|
||||
* orderPay 订单消费,
|
||||
* orderRefund 订单退款,
|
||||
* <p>
|
||||
* adminIn 管理员充值
|
||||
* adminOut管理员消费
|
||||
*/
|
||||
private String bizCode;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 加减号
|
||||
* 关联id,
|
||||
* 订单支付/订单退款/霸王餐时 订单id
|
||||
* 支付/退款 tb_order_payment.id
|
||||
*/
|
||||
private String type;
|
||||
|
||||
private String remark;
|
||||
private Long relationId;
|
||||
/**
|
||||
* 充值记录id 当前表的id
|
||||
* 退款使用
|
||||
*/
|
||||
private Long rechargeId;
|
||||
|
||||
/**
|
||||
* 关联订单编号,支付单号,退款单号
|
||||
|
||||
@@ -31,6 +31,11 @@ public class ShopUserMoneyEditDTO {
|
||||
* 支付/退款 tb_order_payment.id
|
||||
*/
|
||||
private Long relationId;
|
||||
/**
|
||||
* 充值记录id 当前表的id
|
||||
* 退款使用
|
||||
*/
|
||||
private Long rechargeId;
|
||||
/**
|
||||
* 浮动金额
|
||||
*/
|
||||
|
||||
@@ -127,4 +127,11 @@ public class ShopUser implements Serializable {
|
||||
@Column(onInsertValue = "now()", onUpdateValue = "now()")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
|
||||
public BigDecimal getAmount() {
|
||||
if (amount == null) {
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
return amount;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
@@ -37,36 +38,67 @@ public class ShopUserFlow implements Serializable {
|
||||
private Long userId;
|
||||
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 充值金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 当前余额
|
||||
*/
|
||||
private BigDecimal balance;
|
||||
/**
|
||||
* 已退款金额
|
||||
*/
|
||||
private BigDecimal refundAmount;
|
||||
|
||||
/**
|
||||
* 类型:cashIn 会员充值,awardIn 充值奖励,wechatIn 微信小程序充值,alipayIn 支付宝小程序充值,orderPay 订单消费,orderRefund 订单退款,rechargeRefund 充值退款 adminOp 管理员手动增减
|
||||
* 类型:
|
||||
* cashIn 现金充值,
|
||||
* wechatIn 微信小程序充值,
|
||||
* alipayIn 支付宝小程序充值,
|
||||
* awardIn 充值奖励,
|
||||
* rechargeRefund 充值退款
|
||||
* <p>
|
||||
* orderPay 订单消费,
|
||||
* orderRefund 订单退款,
|
||||
* <p>
|
||||
* adminIn 管理员充值
|
||||
* adminOut管理员消费
|
||||
*/
|
||||
private String bizCode;
|
||||
|
||||
/**
|
||||
* 加减号
|
||||
* 备注
|
||||
*/
|
||||
private String type;
|
||||
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 是否可退款
|
||||
*/
|
||||
private Integer isCanRefund;
|
||||
|
||||
/**
|
||||
* 关联id,
|
||||
* 订单支付/订单退款/霸王餐时 订单id
|
||||
* 支付/退款 tb_order_payment.id
|
||||
*/
|
||||
private Long relationId;
|
||||
/**
|
||||
* 充值记录id 当前表的id
|
||||
* 退款使用
|
||||
*/
|
||||
private Long rechargeId;
|
||||
|
||||
|
||||
@Column(onInsertValue = "now()")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
|
||||
public BigDecimal getAmount() {
|
||||
if (amount == null) {
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
return amount;
|
||||
}
|
||||
|
||||
public BigDecimal getRefundAmount() {
|
||||
if (refundAmount == null) {
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
return refundAmount;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.czg.account.service;
|
||||
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.account.entity.ShopUserFlow;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
|
||||
/**
|
||||
* 用户余额流水 服务层。
|
||||
|
||||
@@ -7,6 +7,8 @@ import com.czg.order.enums.PayEnums;
|
||||
import com.czg.order.vo.OrderInfoVo;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
@@ -21,9 +23,9 @@ public interface OrderInfoService extends IService<OrderInfo> {
|
||||
|
||||
Page<OrderInfoVo> getOrderByPage(OrderInfoQueryDTO param);
|
||||
|
||||
void payCallBackOrder(String orderNo, JSONObject resultJson);
|
||||
void payCallBackOrder(@NotBlank String orderNo, @NotNull JSONObject resultJson);
|
||||
|
||||
void refundCallBackOrder();
|
||||
void refundCallBackOrder(@NotBlank String orderNo, @NotNull JSONObject resultJson);
|
||||
|
||||
void upOrderInfo(Long orderId, BigDecimal payAmount, LocalDateTime payTime, Long payOrderId, PayEnums payType);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user