feat(invite): 新增用户邀请码功能

新增实体、Mapper、Service及Controller接口,支持注册时自动生成与用户查询个人邀请码
This commit is contained in:
2025-12-18 19:20:25 +08:00
parent c4d0c60ea8
commit 419878a607
8 changed files with 254 additions and 3 deletions

View File

@@ -0,0 +1,20 @@
<?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.KeyboardUserInviteCodesMapper">
<resultMap id="BaseResultMap" type="com.yolo.keyborad.model.entity.KeyboardUserInviteCodes">
<!--@mbg.generated-->
<!--@Table keyboard_user_invite_codes-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="owner_user_id" jdbcType="BIGINT" property="ownerUserId" />
<result column="status" jdbcType="SMALLINT" property="status" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="expires_at" jdbcType="TIMESTAMP" property="expiresAt" />
<result column="max_uses" jdbcType="INTEGER" property="maxUses" />
<result column="used_count" jdbcType="INTEGER" property="usedCount" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, code, owner_user_id, "status", created_at, expires_at, max_uses, used_count
</sql>
</mapper>