feat: add nearby social services

This commit is contained in:
ANG-Server
2026-07-21 22:19:58 +08:00
parent 77302354ac
commit b5365751bb
17 changed files with 1266 additions and 121 deletions

View File

@@ -241,14 +241,14 @@ export class UserProfiles {
*
* 数据库设计:
* - 类型VARCHAR(50),支持地图名称
* - 约束:非空、默认值'plaza'
* - 约束:非空、默认值'whale_port'
* - 索引:用于地图用户查询
*
* 业务规则:
* - 用户当前所在的游戏地图
* - 用于位置广播系统的地图过滤
* - 影响用户可见性和交互范围
* - 默认为广场(plaza),新用户的起始位置
* - 默认为广场(whale_port),新用户的起始位置
*
* 位置广播系统:
* - 核心字段,用于确定用户所在区域
@@ -259,7 +259,7 @@ export class UserProfiles {
type: 'varchar',
length: 50,
nullable: false,
default: 'plaza',
default: 'whale_port',
comment: '当前所在地图'
})
current_map: string;

View File

@@ -128,7 +128,7 @@ export class UserProfilesService extends BaseUserProfilesService {
userProfile.tags = createUserProfileDto.tags || null;
userProfile.social_links = createUserProfileDto.social_links || null;
userProfile.skin_id = createUserProfileDto.skin_id || null;
userProfile.current_map = createUserProfileDto.current_map || 'plaza';
userProfile.current_map = createUserProfileDto.current_map || 'whale_port';
userProfile.pos_x = createUserProfileDto.pos_x || 0;
userProfile.pos_y = createUserProfileDto.pos_y || 0;
userProfile.status = createUserProfileDto.status || 0;
@@ -618,4 +618,4 @@ export class UserProfilesService extends BaseUserProfilesService {
});
return count > 0;
}
}
}

View File

@@ -150,7 +150,7 @@ export class UserProfilesMemoryService extends BaseUserProfilesService {
userProfile.tags = createUserProfileDto.tags || null;
userProfile.social_links = createUserProfileDto.social_links || null;
userProfile.skin_id = createUserProfileDto.skin_id || null;
userProfile.current_map = createUserProfileDto.current_map || 'plaza';
userProfile.current_map = createUserProfileDto.current_map || 'whale_port';
userProfile.pos_x = createUserProfileDto.pos_x || 0;
userProfile.pos_y = createUserProfileDto.pos_y || 0;
userProfile.status = createUserProfileDto.status || 0;
@@ -694,4 +694,4 @@ export class UserProfilesMemoryService extends BaseUserProfilesService {
currentId: this.CURRENT_ID.toString()
};
}
}
}