工具类
积分余额明细增加shopName
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
package com.czg.account.vo;
|
||||
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 会员积分变动记录
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 1.0 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Table("tb_member_points_log")
|
||||
public class MemberPointsLogVO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Long id;
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
/**
|
||||
* 店铺用户id
|
||||
*/
|
||||
private Long shopUserId;
|
||||
/**
|
||||
* 摘要信息(如:兑换某个商品/消费多少钱/充值多少钱/新会员赠送积分等)
|
||||
*/
|
||||
private String content;
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
/**
|
||||
* 浮动类型 add-累加 subtract-扣减
|
||||
*/
|
||||
private String floatType;
|
||||
/**
|
||||
* 浮动积分(非0正负数)
|
||||
*/
|
||||
private Integer floatPoints;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(onInsertValue = "now()")
|
||||
private LocalDateTime createTime;
|
||||
private String shopName;
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.czg.account.vo;
|
||||
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 用户余额流水 实体类。
|
||||
*
|
||||
* @author zs
|
||||
* @since 2025-02-13
|
||||
*/
|
||||
@Data
|
||||
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ShopUserFlowInfoVO 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 现金充值,
|
||||
* wechatIn 微信小程序充值,
|
||||
* alipayIn 支付宝小程序充值,
|
||||
* awardIn 充值奖励,
|
||||
* rechargeRefund 充值退款
|
||||
* <p>
|
||||
* orderPay 订单消费,
|
||||
* orderRefund 订单退款,
|
||||
* <p>
|
||||
* adminIn 管理员充值
|
||||
* adminOut管理员消费
|
||||
*/
|
||||
private String bizCode;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 关联id,
|
||||
* 订单支付/订单退款/霸王餐时 订单id
|
||||
* 支付/退款 tb_order_payment.id
|
||||
*/
|
||||
private Long relationId;
|
||||
/**
|
||||
* 充值记录id 当前表的id
|
||||
* 退款使用
|
||||
*/
|
||||
private Long rechargeId;
|
||||
|
||||
|
||||
@Column(onInsertValue = "now()")
|
||||
private LocalDateTime createTime;
|
||||
/**
|
||||
* 退款失败原因
|
||||
*/
|
||||
private String failMsg;
|
||||
private String shopName;
|
||||
|
||||
|
||||
public BigDecimal getAmount() {
|
||||
if (amount == null) {
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
return amount;
|
||||
}
|
||||
|
||||
public BigDecimal getRefundAmount() {
|
||||
if (refundAmount == null) {
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
return refundAmount;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user