11 changed files with 321 additions and 0 deletions
@ -0,0 +1,14 @@ |
|||
package com.youlai.boot.mini.mapper; |
|||
|
|||
import com.youlai.boot.mini.model.entity.MiniPointAccount; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
|
|||
/** |
|||
* 用户积分表 Mapper 接口 |
|||
* |
|||
* @author jwy |
|||
* @since |
|||
*/ |
|||
public interface MiniPointAccountMapper extends BaseMapper<MiniPointAccount> { |
|||
|
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
package com.youlai.boot.mini.mapper; |
|||
|
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
@Mapper |
|||
public interface MiniPointAccountMapperExt extends MiniPointAccountMapper{ |
|||
} |
|||
@ -0,0 +1,14 @@ |
|||
package com.youlai.boot.mini.mapper; |
|||
|
|||
import com.youlai.boot.mini.model.entity.MiniPointRecord; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
|
|||
/** |
|||
* 用户积分流水表 Mapper 接口 |
|||
* |
|||
* @author jwy |
|||
* @since |
|||
*/ |
|||
public interface MiniPointRecordMapper extends BaseMapper<MiniPointRecord> { |
|||
|
|||
} |
|||
@ -0,0 +1,14 @@ |
|||
package com.youlai.boot.mini.mapper; |
|||
|
|||
import com.youlai.boot.mini.model.entity.MiniPointRule; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
|
|||
/** |
|||
* 积分规则表 Mapper 接口 |
|||
* |
|||
* @author jwy |
|||
* @since |
|||
*/ |
|||
public interface MiniPointRuleMapper extends BaseMapper<MiniPointRule> { |
|||
|
|||
} |
|||
@ -0,0 +1,70 @@ |
|||
package com.youlai.boot.mini.model.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Getter; |
|||
import lombok.Setter; |
|||
import lombok.ToString; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
|
|||
@Getter |
|||
@Setter |
|||
@ToString |
|||
@Accessors(chain = true) |
|||
@TableName("mini_point_account") |
|||
@Schema(description = "用户积分表") |
|||
public class MiniPointAccount implements Serializable { |
|||
|
|||
@TableId(value = "id", type = IdType.AUTO) |
|||
@Schema(description = "积分表主键id") |
|||
private Long id; |
|||
|
|||
|
|||
@TableField("uuid") |
|||
@Schema(description = "uuid唯一标识,前后端用这个进行数据交互") |
|||
private String uuid; |
|||
|
|||
@TableField("user_id") |
|||
@Schema(description = "用户id") |
|||
private Long userId; |
|||
|
|||
@TableField("points") |
|||
@Schema(description = "积分") |
|||
private Integer points; |
|||
|
|||
@TableField("create_time") |
|||
@Schema(description = "创建时间") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
private Date createTime; |
|||
|
|||
@TableField("create_timestamp") |
|||
@Schema(description = "创建时间毫秒级时间戳") |
|||
private Long createTimestamp; |
|||
|
|||
@TableField("create_by") |
|||
@Schema(description = "创建人ID") |
|||
private Long createBy; |
|||
|
|||
@TableField("update_time") |
|||
@Schema(description = "更新时间") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
private Date updateTime; |
|||
|
|||
@TableField("update_timestamp") |
|||
@Schema(description = "更新时间毫秒级时间戳") |
|||
private Long updateTimestamp; |
|||
|
|||
@TableField("update_by") |
|||
@Schema(description = "修改人ID") |
|||
private Long updateBy; |
|||
|
|||
@TableField("is_deleted") |
|||
@Schema(description = "逻辑删除标识(0-未删除 1-已删除)") |
|||
private Boolean deleted; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,82 @@ |
|||
package com.youlai.boot.mini.model.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Getter; |
|||
import lombok.Setter; |
|||
import lombok.ToString; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
|
|||
@Getter |
|||
@Setter |
|||
@ToString |
|||
@Accessors(chain = true) |
|||
@TableName("mini_point_record") |
|||
@Schema(description = "用户积分流水表") |
|||
public class MiniPointRecord implements Serializable { |
|||
|
|||
@TableId(value = "id", type = IdType.AUTO) |
|||
@Schema(description = "积分流水表主键id") |
|||
private Long id; |
|||
|
|||
|
|||
@TableField("uuid") |
|||
@Schema(description = "uuid唯一标识,前后端用这个进行数据交互") |
|||
private String uuid; |
|||
|
|||
@TableField("user_id") |
|||
@Schema(description = "用户id") |
|||
private Long userId; |
|||
|
|||
@TableField("change_amount") |
|||
@Schema(description = "变化值(+增加,-扣减)") |
|||
private Integer changeAmount; |
|||
|
|||
@TableField("balance_after") |
|||
@Schema(description = "变更后余额") |
|||
private Integer balanceAfter; |
|||
|
|||
@TableField("biz_type") |
|||
@Schema(description = "业务类型(SIGN_IN / AI_GENERATE / SHARE)") |
|||
private String bizType; |
|||
|
|||
@TableField("biz_id") |
|||
@Schema(description = "业务唯一ID(幂等关键)") |
|||
private String bizId; |
|||
|
|||
@TableField("create_time") |
|||
@Schema(description = "创建时间") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
private Date createTime; |
|||
|
|||
@TableField("create_timestamp") |
|||
@Schema(description = "创建时间毫秒级时间戳") |
|||
private Long createTimestamp; |
|||
|
|||
@TableField("create_by") |
|||
@Schema(description = "创建人ID") |
|||
private Long createBy; |
|||
|
|||
@TableField("update_time") |
|||
@Schema(description = "更新时间") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
private Date updateTime; |
|||
|
|||
@TableField("update_timestamp") |
|||
@Schema(description = "更新时间毫秒级时间戳") |
|||
private Long updateTimestamp; |
|||
|
|||
@TableField("update_by") |
|||
@Schema(description = "修改人ID") |
|||
private Long updateBy; |
|||
|
|||
@TableField("is_deleted") |
|||
@Schema(description = "逻辑删除标识(0-未删除 1-已删除)") |
|||
private Boolean deleted; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,90 @@ |
|||
package com.youlai.boot.mini.model.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Getter; |
|||
import lombok.Setter; |
|||
import lombok.ToString; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
|
|||
@Getter |
|||
@Setter |
|||
@ToString |
|||
@Accessors(chain = true) |
|||
@TableName("mini_point_rule") |
|||
@Schema(description = "积分规则表") |
|||
public class MiniPointRule implements Serializable { |
|||
|
|||
@TableId(value = "id", type = IdType.AUTO) |
|||
@Schema(description = "积分规则表主键id") |
|||
private Long id; |
|||
|
|||
|
|||
@TableField("uuid") |
|||
@Schema(description = "uuid唯一标识,前后端用这个进行数据交互") |
|||
private String uuid; |
|||
|
|||
@TableField("rule_code") |
|||
@Schema(description = "规则编码(SIGN_IN/DAILY_LOGIN等)") |
|||
private String ruleCode; |
|||
|
|||
@TableField("rule_name") |
|||
@Schema(description = "规则名称") |
|||
private String ruleName; |
|||
|
|||
@TableField("points") |
|||
@Schema(description = "积分值") |
|||
private Integer points; |
|||
|
|||
@TableField("limit_period") |
|||
@Schema(description = "限制周期:DAY/WEEK/MONTH/YEAR/ALL(NULL表示无限制)") |
|||
private String limitPeriod; |
|||
|
|||
@TableField("limit_count") |
|||
@Schema(description = "周期内限制次数") |
|||
private Integer limitCount; |
|||
|
|||
@TableField("status") |
|||
@Schema(description = "状态(0启用 1禁用)") |
|||
private Boolean status; |
|||
|
|||
@TableField("description") |
|||
@Schema(description = "规则描述") |
|||
private String description; |
|||
|
|||
@TableField("create_time") |
|||
@Schema(description = "创建时间") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
private Date createTime; |
|||
|
|||
@TableField("create_timestamp") |
|||
@Schema(description = "创建时间毫秒级时间戳") |
|||
private Long createTimestamp; |
|||
|
|||
@TableField("create_by") |
|||
@Schema(description = "创建人ID") |
|||
private Long createBy; |
|||
|
|||
@TableField("update_time") |
|||
@Schema(description = "更新时间") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
private Date updateTime; |
|||
|
|||
@TableField("update_timestamp") |
|||
@Schema(description = "更新时间毫秒级时间戳") |
|||
private Long updateTimestamp; |
|||
|
|||
@TableField("update_by") |
|||
@Schema(description = "修改人ID") |
|||
private Long updateBy; |
|||
|
|||
@TableField("is_deleted") |
|||
@Schema(description = "逻辑删除标识(0-未删除 1-已删除)") |
|||
private Boolean deleted; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper |
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.youlai.boot.mini.mapper.MiniPointAccountMapper"> |
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,9 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper |
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.youlai.boot.mini.mapper.MiniPointRecordMapper"> |
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,9 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper |
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.youlai.boot.mini.mapper.MiniPointRuleMapper"> |
|||
|
|||
|
|||
</mapper> |
|||
Loading…
Reference in new issue