feat(invite): 添加邀请码注册与验证功能
- 新增邀请码实体、Mapper、Service 及 XML 配置 - 注册接口支持填写邀请码并建立绑定关系 - 邀请码校验包含存在性、状态、过期及次数限制 - 补充相关错误码:INVITE_CODE_* 与 RECEIPT_ALREADY_PROCESSED
This commit is contained in:
22
src/main/resources/mapper/KeyboardUserInvitesMapper.xml
Normal file
22
src/main/resources/mapper/KeyboardUserInvitesMapper.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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.KeyboardUserInvitesMapper">
|
||||
<resultMap id="BaseResultMap" type="com.yolo.keyborad.model.entity.KeyboardUserInvites">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table keyboard_user_invites-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="inviter_user_id" jdbcType="BIGINT" property="inviterUserId" />
|
||||
<result column="invitee_user_id" jdbcType="BIGINT" property="inviteeUserId" />
|
||||
<result column="invite_code_id" jdbcType="BIGINT" property="inviteCodeId" />
|
||||
<result column="click_token" jdbcType="VARCHAR" property="clickToken" />
|
||||
<result column="bind_type" jdbcType="SMALLINT" property="bindType" />
|
||||
<result column="bound_at" jdbcType="TIMESTAMP" property="boundAt" />
|
||||
<result column="bind_ip" jdbcType="VARCHAR" property="bindIp" />
|
||||
<result column="bind_user_agent" jdbcType="VARCHAR" property="bindUserAgent" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, inviter_user_id, invitee_user_id, invite_code_id, click_token, bind_type, bound_at,
|
||||
bind_ip, bind_user_agent
|
||||
</sql>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user