feat(quota): 新增用户额度总计模块
增加用户免费体验额度配置,支持新用户注册时的额度分配功能
This commit is contained in:
@@ -76,6 +76,12 @@ mailgun:
|
||||
from-email: no-reply@yourdomain.com # 发件人邮箱
|
||||
from-name: Key Of Love # 发件人名称(可选)
|
||||
|
||||
# 用户注册配置
|
||||
user:
|
||||
register:
|
||||
# 新用户注册时的免费体验额度
|
||||
free-trial-credits: 5
|
||||
|
||||
|
||||
|
||||
############## Sa-Token 配置 (文档: https://sa-token.cc) ##############
|
||||
|
||||
@@ -28,3 +28,9 @@ logging:
|
||||
max-size: 10MB
|
||||
# 保留的日志文件数量
|
||||
max-history: 30
|
||||
|
||||
# 用户注册配置
|
||||
user:
|
||||
register:
|
||||
# 新用户注册时的免费体验额度
|
||||
free-trial-credits: 5
|
||||
|
||||
18
src/main/resources/mapper/KeyboardUserQuotaTotalMapper.xml
Normal file
18
src/main/resources/mapper/KeyboardUserQuotaTotalMapper.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?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.yolo.keyborad.mapper.KeyboardUserQuotaTotalMapper">
|
||||
<resultMap id="BaseResultMap" type="com.yolo.keyborad.model.entity.KeyboardUserQuotaTotal">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table keyboard_user_quota_total-->
|
||||
<id column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="total_quota" jdbcType="INTEGER" property="totalQuota" />
|
||||
<result column="used_quota" jdbcType="INTEGER" property="usedQuota" />
|
||||
<result column="version" jdbcType="INTEGER" property="version" />
|
||||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
|
||||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
user_id, total_quota, used_quota, version, created_at, updated_at
|
||||
</sql>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user