【积分银行】积分

This commit is contained in:
2026-02-09 16:30:50 +08:00
parent 03f8be4c98
commit 6e005f2f4e
20 changed files with 719 additions and 48 deletions
@@ -15,7 +15,7 @@ public enum PointsSourceEnum {
TYPE_2_VIOLATION(2, "violation", "违规扣除"),
TYPE_2_EXPIRED(2, "expired", "过期清除");
/**
*类型1-获得积分,2-扣减积分
* 类型1-获得积分,2-扣减积分
*/
public final Integer changeType;
/**
@@ -23,7 +23,7 @@ public enum PointsSourceEnum {
*/
public final String source;
/**
*来源描述
* 来源描述
*/
public final String desc;
@@ -6,6 +6,9 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import org.jeecg.base.PageInfo;
import java.util.Date;
import java.util.List;
/**
* @author pj
* @version 1.0
@@ -16,7 +19,27 @@ import org.jeecg.base.PageInfo;
@Data
public class UserPointsRankingDTO extends PageInfo<PointsRule> {
@Schema(title = "榜单类型,0榜,1周榜,2月榜")
@Schema(title = "榜单类型,0榜,1周榜,2月榜3季榜,4年榜,5选时排名,10总榜")
private String rankType;
@Schema(title = "开始时间")
private Date startTime;
@Schema(title = "截止时间")
private Date endTime;
@Schema(title = "所属单位")
private String orgCode;
@Schema(title = "所属部门")
private String deptCode;
@Schema(title = "姓名")
private String realName;
@Schema(title = "员工编号")
private String workNo;
private List<String> userIds;
}
@@ -81,4 +81,16 @@ public class PointsRule implements Serializable {
@Schema(title = "最后修改时间")
private Date lastModifyDate;
@Schema(title = "周期内打卡次数上限")
private Integer checkInUpper;
@Schema(title = "年额外积分上限")
private BigDecimal yearExtraPointUpper;
@Schema(title = "是否支持打卡叠加得分,0不支持,1支持")
private Integer supportCum;
@Schema(title = "是否需要填写补充信息,0不需要,1需要")
private Integer needRemark;
}
@@ -9,6 +9,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
@@ -40,9 +41,11 @@ public class UserPoints implements Serializable {
@Schema(title = "用户部门")
private String orgCode;
@Excel(name = "当前可用积分", width = 15, orderNum = "7")
@Schema(title = "当前可用积分")
private BigDecimal points;
@Excel(name = "累计获得积分", width = 15, orderNum = "8")
@Schema(title = "历史获得的积分总和")
private BigDecimal addPointsSum;
@@ -55,6 +58,7 @@ public class UserPoints implements Serializable {
/**
* 积分兑换记录总和,只记录积分兑换
*/
@Excel(name = "累计兑换积分", width = 15, orderNum = "9")
@Schema(title = "历史兑换积分总和")
private BigDecimal exchangePointsSum;
@@ -71,6 +75,7 @@ public class UserPoints implements Serializable {
@Schema(title = "最新一天消耗积分的总和")
private BigDecimal latestDeductDaySum;
@Excel(name = "最近一次打卡时间", width = 25, format = "yyyy-MM-dd HH:mm:ss", orderNum = "10")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Schema(title = "最新获得积分的日期")
@@ -2,6 +2,7 @@ package com.renkang.bank.model.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import java.math.BigDecimal;
@@ -14,27 +15,44 @@ import java.math.BigDecimal;
@Data
public class UserPointRankingVO {
@Excel(name = "排名", width = 15, orderNum = "8")
@Schema(title = "排名")
private Integer ranking;
@Schema(title = "用户id")
private String userId;
@Excel(name = "姓名", width = 15, orderNum = "3")
@Schema(title = "姓名")
private String realName;
@Excel(name = "员工编号", width = 15, orderNum = "4")
@Schema(title = "员工编号")
private String workNo;
@Excel(name = "年龄", width = 15, orderNum = "6")
@Schema(title = "年龄")
private Integer age;
@Schema(title = "头像")
private String avatar;
@Excel(name = "所属单位", width = 15, orderNum = "1")
@Schema(title = "单位名称")
private String orgName;
@Excel(name = "所属部门", width = 15, orderNum = "2")
@Schema(title = "部门名称")
private String deptName;
@Schema(title = "性别")
private Integer sex;
@Excel(name = "性别", width = 15, orderNum = "5")
@Schema(title = "性别")
private String sexName;
@Excel(name = "日累计积分", width = 15, orderNum = "7")
@Schema(title = "积分")
private BigDecimal pointSum;
}
@@ -0,0 +1,48 @@
package com.renkang.bank.model.vo;
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.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
/**
* 用户积分详情VO
*
* @author feng
* @date 2026-02-05
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(title = "用户积分详情VO", description = "用户积分详情VO")
public class UserPointsDeductDetailsVO {
@Schema(title = "id")
private Long id;
@Schema(title = "用户ID")
private String userId;
@Excel(name = "积分变化", width = 15, orderNum = "2")
@Schema(title = "本次积分变化")
private BigDecimal points;
@Excel(name = "支出信息", width = 25, orderNum = "1")
@Schema(title = "补充信息")
private String remark;
@Schema(title = "关联业务ID(规则ID,礼品兑换订单Id等)")
private Long businessId;
@Excel(name = "支出时间", width = 25, format = "yyyy-MM-dd HH:mm:ss", orderNum = "3")
@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.vo;
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.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
/**
* 用户积分详情VO
*
* @author feng
* @date 2026-02-05
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(title = "用户积分详情VO", description = "用户积分详情VO")
public class UserPointsDetailsVO {
@Schema(title = "id")
private Long id;
@Schema(title = "用户ID")
private String userId;
@Excel(name = "积分变化", width = 15, orderNum = "4")
@Schema(title = "本次积分变化")
private BigDecimal points;
@Excel(name = "补充信息", width = 15, orderNum = "2")
@Schema(title = "补充信息")
private String remark;
@Schema(title = "关联业务ID(规则ID,礼品兑换订单Id等)")
private Long businessId;
@Excel(name = "健康行为", width = 25, orderNum = "1")
@Schema(title = "关联业务详情(可选择性的冗余业务详情:待定)")
private String businessInfo;
@Excel(name = "打卡时间", width = 25, format = "yyyy-MM-dd HH:mm:ss", orderNum = "5")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Schema(title = "创建时间")
private Date createTime;
@Excel(name = "行为周期", width = 15, replace = {"次_1", "日_2", "周_3", "月_4", "季度_5", "年_6"}, orderNum = "3")
@Schema(title = "问答频次(1-单次,2-日/次,3-周/次,4-月/次,5-季度/次,6-年/次)")
private Integer frequency;
}
@@ -4,6 +4,7 @@ import com.renkang.bank.model.po.UserPoints;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.jeecgframework.poi.excel.annotation.Excel;
/**
* @author pj
@@ -15,21 +16,27 @@ import lombok.EqualsAndHashCode;
@Data
public class UserPointsListVO extends UserPoints {
@Excel(name = "姓名", width = 15, orderNum = "3")
@Schema(title = "姓名")
private String realName;
@Excel(name = "员工编号", width = 15, orderNum = "4")
@Schema(title = "员工编号")
private String workNo;
@Excel(name = "所属单位", width = 15, orderNum = "1")
@Schema(title = "所属单位名称")
private String orgName;
@Excel(name = "所属部门", width = 15, orderNum = "2")
@Schema(title = "所属部门名称")
private String deptName;
@Excel(name = "性别", width = 15, orderNum = "5")
@Schema(title = "性别")
private String sexName;
@Excel(name = "年龄", width = 15, orderNum = "6")
@Schema(title = "年龄")
private Integer age;
}