🐞 fix(判空): 根据后台错误日志添加空值判断
This commit is contained in:
@@ -229,8 +229,8 @@ export async function getUserGuildWithRefActive(roleId: string, select?: string)
|
||||
userGuild = await UserGuildModel.resetDailyInfoByRefTimeDaily(roleId, refTimeDaily);
|
||||
if (refTimeDaily && userGuild) {
|
||||
await sendUnreceivedWishPool(wishGoods, roleId);
|
||||
await sendUnreceivedActiveBox(roleId, guildCode, refTimeDaily, receivedActive);
|
||||
await sendUnreceivedDonateBox(roleId, guildCode, refTimeDaily, receiveBoxs);
|
||||
await sendUnreceivedActiveBox(roleId, guildCode, refTimeDaily, receivedActive||[]);
|
||||
await sendUnreceivedDonateBox(roleId, guildCode, refTimeDaily, receiveBoxs||[]);
|
||||
await sendUnreceivedBossWar(roleId, refTimeDaily);
|
||||
}
|
||||
if (!userGuild) {
|
||||
|
||||
@@ -140,7 +140,7 @@ export async function sendMessageToTeam(teamCode: string, route: string, data: a
|
||||
*/
|
||||
export function addUserToTeamChannel(teamCode: string, isCreate: boolean, roleId: string, sid: string) {
|
||||
let channel = pinus.app.get('channelService').getChannel(teamCode, isCreate);
|
||||
addUserToChannel(channel, roleId, sid);
|
||||
if(channel) addUserToChannel(channel, roleId, sid);
|
||||
return channel
|
||||
}
|
||||
|
||||
|
||||
@@ -1331,7 +1331,7 @@ export async function getRankInHandler(redisKey: REDIS_KEY, type: RANK_TYPE, key
|
||||
} else if (type == RANK_TYPE.GUILD_LV) {
|
||||
if(role.hasGuild) {
|
||||
let guild = await GuildModel.findByCode(guildCode, serverId);
|
||||
myRank = await r.generMyRankWithGuild2(roleId, guild.lv, guild.activeWeekly, guild.lvUpdateTime, guild);
|
||||
if(guild) myRank = await r.generMyRankWithGuild2(roleId, guild.lv, guild.activeWeekly, guild.lvUpdateTime, guild);
|
||||
}
|
||||
} else if (type == RANK_TYPE.GUILD_FUND) {
|
||||
if(role.hasGuild) {
|
||||
|
||||
Reference in New Issue
Block a user