feat(login): 新增网页AI登录场景WEB_AI

- 在LoginSceneEnum中增加WEB_AI枚举,绑定路径webAi-doLogin
- LoginService扩展WEB_AI登录逻辑:缓存登录态、创建w.tenant.{tenantId}队列并绑定webAiHeadersExchange
- 新增webAiHeadersExchange Bean,交换机名web.ai.headers.exchange
- 用户实体与Service增加web_ai字段及checkWebAILoginRole权限校验
- 提供/webAi-doLogin接口,支持网页端AI独立登录与Token管理
This commit is contained in:
2025-12-15 20:17:50 +08:00
parent e2eb5f9ad0
commit 49a0022ee8
3 changed files with 10 additions and 2 deletions

View File

@@ -150,4 +150,7 @@ public class ServerBigBrother {
@TableField(value = "tenant_id")
@ApiModelProperty(value="租户 Id")
private Long tenantId;
@TableField(value = "sec_uid")
private String secUid;
}

View File

@@ -112,4 +112,7 @@ public class ServerBigBrotherVO {
@TableField(value = "fans_level")
@ApiModelProperty(value = "大哥粉丝团等级")
private Integer fansLevel;
@TableField(value = "sec_uid")
private String secUid;
}

View File

@@ -23,12 +23,13 @@
<result column="updater" jdbcType="VARCHAR" property="updater" />
<result column="deleted" jdbcType="BOOLEAN" property="deleted" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="secUid" jdbcType="VARCHAR" property="secUid" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, display_id, user_id_str, nickname, `level`, hostcoins, follower_count, following_count,
region, historic_high_coins, total_gift_coins, host_display_id, owner_id, create_time,
update_time, creator, updater, deleted, tenant_id
update_time, creator, updater, deleted, tenant_id,secUid
</sql>
<resultMap id="BaseResultMapCopy" type="com.yupi.springbootinit.model.vo.bigbrother.ServerBigBrotherVO">
@@ -47,6 +48,7 @@
<result column="host_display_id" jdbcType="VARCHAR" property="hostDisplayId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="fans_level" jdbcType="INTEGER" property="fansLevel" />
<result column="secUid" jdbcType="VARCHAR" property="secUid" />
</resultMap>
@@ -54,7 +56,7 @@
<select id="selectPageByCondition" resultMap="BaseResultMapCopy">
select sbr.display_id, sbr.user_id_str,sbr.nickname,sbr.level,sbr.hostcoins,
sbr.follower_count, sbr.following_count, sbr.region, sbr.historic_high_coins, sbr.total_gift_coins,
sbr.host_display_id,sbr.create_time,sbr.fans_level from
sbr.host_display_id,sbr.create_time,sbr.fans_level,sbr.secUid from
server_big_brother sbr left join server_country_info ci ON sbr.region = ci.country_name
where sbr.tenant_id=#{dto.tenantId}
<!-- 大哥所属国家筛选 -->