健康银行表设计
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
package com.renkang.bank.constant;
|
||||
|
||||
/**
|
||||
* @author feng
|
||||
* @date 2026-02-05
|
||||
*/
|
||||
public interface HealthBankConstants {
|
||||
/**
|
||||
* 积分变化-增加积分
|
||||
*/
|
||||
Integer CHANGE_TYPE_ADD = 1;
|
||||
/**
|
||||
*积分变化-扣减积分
|
||||
*/
|
||||
Integer CHANGE_TYPE_DEDUCT_ = 2;
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.renkang.bank.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author: feng
|
||||
* @description: 积分来源枚举类
|
||||
* @date 2026/02/05 09:38
|
||||
*/
|
||||
@Getter
|
||||
public enum PointsSourceEnum {
|
||||
TYPE_1_SURVEY(1, "积分打卡", "survey"),
|
||||
TYPE_2_USE(2, "use", "礼品兑换"),
|
||||
TYPE_2_VIOLATION(2, "violation", "违规扣除"),
|
||||
TYPE_2_EXPIRED(2, "expired", "过期清除");
|
||||
/**
|
||||
*类型1-获得积分,2-扣减积分
|
||||
*/
|
||||
public final Integer changeType;
|
||||
/**
|
||||
* source 标识
|
||||
*/
|
||||
public final String source;
|
||||
/**
|
||||
*来源描述
|
||||
*/
|
||||
public final String desc;
|
||||
|
||||
PointsSourceEnum(Integer changeType, String source, String desc) {
|
||||
this.changeType = changeType;
|
||||
this.source = source;
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.renkang.bank.model.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 礼品表 -礼品基本信息
|
||||
*
|
||||
* @author feng
|
||||
* @date 2026-02-05
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("bank_gift_info")
|
||||
@Schema(title = "礼品基本信息", description = "礼品基本信息")
|
||||
public class GiftInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(title = "id")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long id;
|
||||
|
||||
@Schema(title = "礼品名称")
|
||||
private String giftName;
|
||||
|
||||
@Schema(title = "礼品主图(多个使用逗号分隔)")
|
||||
private String giftImage;
|
||||
|
||||
@Schema(title = "礼品库存")
|
||||
private Integer inventory;
|
||||
|
||||
@Schema(title = "礼品分类(1-实物礼品,2-虚拟礼品)")
|
||||
private Integer type;
|
||||
|
||||
@Schema(title = "礼品价格")
|
||||
private BigDecimal price;
|
||||
|
||||
@Schema(title = "用户限购数量")
|
||||
private Integer purchaseLimit;
|
||||
|
||||
@Schema(title = "礼品详情(富文本内容描述)")
|
||||
private String giftInfo;
|
||||
|
||||
@Schema(title = "状态(0-启用,1-停用)")
|
||||
private Integer status = 0;
|
||||
|
||||
@Schema(title = "删除标记")
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Schema(title = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(title = "修改时间")
|
||||
private Date lastModifyDate;
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package com.renkang.bank.model.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 礼品库存变更记录表 -礼品库存变更记录表
|
||||
*
|
||||
* @author feng
|
||||
* @date 2026-02-05
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("bank_gift_inventory_log")
|
||||
@Schema(title = "礼品库存变更记录表", description = "礼品库存变更记录表")
|
||||
public class GiftInventoryLog implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(title = "id")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long id;
|
||||
|
||||
@Schema(title = "礼品ID")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long giftId;
|
||||
|
||||
@Schema(title = "本次库存变化")
|
||||
private Integer inventory;
|
||||
|
||||
@Schema(title = "1-加库存,2-减库存")
|
||||
private Integer changeType;
|
||||
|
||||
@Schema(title = "本次变动前库存")
|
||||
private Integer beforeInventory;
|
||||
|
||||
@Schema(title = "本次变动后库存")
|
||||
private Integer afterInventory;
|
||||
|
||||
@Schema(title = "操作人ID")
|
||||
private String operatorId;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Schema(title = "创建时间")
|
||||
private Date createTime;
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.renkang.bank.model.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 礼品价格变更记录表 -礼品价格变更记录表
|
||||
*
|
||||
* @author feng
|
||||
* @date 2026-02-05
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("bank_gift_price_log")
|
||||
@Schema(title = "礼品价格变更记录表", description = "礼品价格变更记录表")
|
||||
public class GiftPriceLog implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(title = "id")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long id;
|
||||
|
||||
@Schema(title = "礼品ID")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long giftId;
|
||||
|
||||
@Schema(title = "本次设定的价格")
|
||||
private BigDecimal price;
|
||||
|
||||
@Schema(title = "本次变动前价格")
|
||||
private BigDecimal beforePrice;
|
||||
|
||||
@Schema(title = "本次变动后价格")
|
||||
private BigDecimal afterPrice;
|
||||
|
||||
@Schema(title = "操作人ID")
|
||||
private String operatorId;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Schema(title = "创建时间")
|
||||
private Date createTime;
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.renkang.bank.model.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.github.yulichang.annotation.EntityMapping;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.FieldNameConstants;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单表 -积分兑换记录表
|
||||
*
|
||||
* @author feng
|
||||
* @date 2026-02-05
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@FieldNameConstants
|
||||
@TableName("bank_order_form")
|
||||
@Schema(title = "订单表(积分兑换记录表)", description = "订单表(积分兑换记录表)")
|
||||
public class OrderForm implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(title = "id")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long id;
|
||||
|
||||
@Schema(title = "用户ID")
|
||||
private String userId;
|
||||
|
||||
@Schema(title = "订单总额")
|
||||
private BigDecimal orderPrice;
|
||||
|
||||
@Schema(title = "订单商品集合")
|
||||
@TableField(exist = false)
|
||||
@EntityMapping(thisField = OrderForm.Fields.id, joinField = OrderFormItem.Fields.orderId)
|
||||
private List<OrderFormItem> orderFormItems;
|
||||
|
||||
@Schema(title = "删除标记")
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Schema(title = "下单时间")
|
||||
private Date createTime;
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.renkang.bank.model.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.FieldNameConstants;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 订单子表 -订单明细表
|
||||
*
|
||||
* @author feng
|
||||
* @date 2026-02-05
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@FieldNameConstants
|
||||
@TableName("bank_order_form_item")
|
||||
@Schema(title = "订单明细表", description = "订单明细表")
|
||||
public class OrderFormItem implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(title = "id")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long id;
|
||||
|
||||
@Schema(title = "订单ID")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long orderId;
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.renkang.bank.model.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.FieldNameConstants;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 积分规则表
|
||||
* @Author: feng
|
||||
* @Date: 2026-02-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@FieldNameConstants
|
||||
@TableName("bank_points_rule")
|
||||
@Schema(title = "积分规则表", description = "积分规则表")
|
||||
public class PointsRule implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(title = "ID")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long id;
|
||||
|
||||
@Schema(title = "问答频次(1-单次,2-日/次,3-周/次,4-月/次,5-季度/次,6-年/次)")
|
||||
private Integer frequency;
|
||||
|
||||
@Schema(title = "规则类别")
|
||||
private Integer ruleCategory;
|
||||
|
||||
@Schema(title = "规则描述")
|
||||
private String ruleDesc;
|
||||
|
||||
@Schema(title = "图标")
|
||||
private String icon;
|
||||
|
||||
@Schema(title = "奖励积分")
|
||||
private BigDecimal points;
|
||||
|
||||
@Schema(title = "状态0-启用,1停用")
|
||||
private Integer status = 0;
|
||||
|
||||
@Schema(title = "删除标识0-正常,1已删除")
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
@Schema(title = "创建人ID")
|
||||
private String createUser;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(title = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(title = "最后修改时间")
|
||||
private Date lastModifyDate;
|
||||
|
||||
}
|
||||
-51
@@ -1,51 +0,0 @@
|
||||
package com.renkang.bank.model.po;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
import org.jeecg.config.mybatis.FastjsonArrayTypeHandler;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Schema(title = "APP用户自定义首页菜单设置", description = "APP用户自定义首页菜单设置")
|
||||
public class UserDiyAppMenu {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(title = "id")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long id;
|
||||
|
||||
@Schema(title = "用户ID")
|
||||
private String userId;
|
||||
|
||||
@Schema(title = "用户自定义的菜单设置")
|
||||
@TableField(value = "diy_menu", jdbcType = JdbcType.VARCHAR, typeHandler = FastjsonArrayTypeHandler.class)
|
||||
private JSONArray diyMenu;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Schema(title = "首次设置时间")
|
||||
private Date createTime;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(title = "最后修改时间")
|
||||
private Date lastModifyDate;
|
||||
|
||||
public UserDiyAppMenu(String userId) {
|
||||
this.userId = userId;
|
||||
this.createTime = new Date();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.renkang.bank.model.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* 用户积分汇总表 -产生过积分的用户每人一条数据
|
||||
*
|
||||
* @author feng
|
||||
* @date 2026-02-05
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("bank_user_points")
|
||||
@Schema(title = "用户积分汇总表", description = "用户积分汇总表")
|
||||
public class UserPoints implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(title = "id")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long id;
|
||||
|
||||
@Schema(title = "用户ID")
|
||||
private String userId;
|
||||
|
||||
@Schema(title = "用户部门")
|
||||
private String orgCode;
|
||||
|
||||
@Schema(title = "当前可用积分")
|
||||
private BigDecimal points;
|
||||
|
||||
@Schema(title = "历史获得的积分总和")
|
||||
private BigDecimal addPointsSum;
|
||||
|
||||
@Schema(title = "历史扣除积分总和")
|
||||
private BigDecimal deductPointsSum;
|
||||
|
||||
@Schema(title = "状态(0-正常,1-冻结)")
|
||||
private Integer status = 0;
|
||||
/**
|
||||
* 注意:该字段记录最后一次获得积分当天收获的积分总和,该归档字段的更新会减少后期对积分明细表的查询次数
|
||||
*/
|
||||
@Schema(title = "最新一天获取积分的总和")
|
||||
private BigDecimal latestAddDaySum;
|
||||
/**
|
||||
*注意:该字段记录最后一次消费积分当天收获的积分总和,该归档字段的更新会减少后期对积分明细表的查询次数
|
||||
*/
|
||||
@Schema(title = "最新一天消耗积分的总和")
|
||||
private BigDecimal latestDeductDaySum;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Schema(title = "最新获得积分的日期")
|
||||
private Date lastAddDate;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Schema(title = "最新消费积分的日期")
|
||||
private Date lastDeductDate;
|
||||
|
||||
@Schema(title = "删除标记")
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Schema(title = "首次获得积分时间")
|
||||
private Date createTime;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(title = "积分最后变更时间")
|
||||
private Date lastVaryDate;
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
package com.renkang.bank.model.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.renkang.bank.enums.PointsSourceEnum;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 用户积分详情表 -记录每次的积分变更
|
||||
*
|
||||
* @author feng
|
||||
* @date 2026-02-05
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("bank_user_points")
|
||||
@Schema(title = "用户积分详情表", description = "用户积分详情表")
|
||||
public class UserPointsDetails implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(title = "id")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long id;
|
||||
|
||||
@Schema(title = "用户ID")
|
||||
private String userId;
|
||||
|
||||
@Schema(title = "本次积分变化")
|
||||
private BigDecimal points;
|
||||
|
||||
@Schema(title = "本次变动前积分")
|
||||
private BigDecimal beforePoints;
|
||||
|
||||
@Schema(title = "本次变动后积分")
|
||||
private BigDecimal afterPoints;
|
||||
|
||||
@Schema(title = "1-获得积分,2-扣减积分")
|
||||
private Integer changeType;
|
||||
|
||||
@Schema(title = "补充信息")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* @see PointsSourceEnum 来源详见枚举类
|
||||
*/
|
||||
@Schema(title = "来源(survey-问卷积分,use-礼品兑换,violation-违规扣除,expired-过期清除)")
|
||||
private String source;
|
||||
|
||||
@Schema(title = "关联业务ID(规则ID,礼品兑换订单Id等)")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long businessId;
|
||||
|
||||
@Schema(title = "关联业务详情(可选择性的冗余业务详情:待定)")
|
||||
private String businessInfo;
|
||||
|
||||
@Schema(title = "操作人ID")
|
||||
private String operatorId;
|
||||
|
||||
@Schema(title = "删除标记")
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Schema(title = "创建时间")
|
||||
private Date createTime;
|
||||
}
|
||||
Reference in New Issue
Block a user