测试:修改任务好友军团活动
This commit is contained in:
@@ -251,7 +251,7 @@ function createChatRec(sender: boolean, curTime: Date, targetRoleId) {
|
||||
* @param {Date} curTime
|
||||
*/
|
||||
async function updateRecentChats(sender: boolean, roleId: string, targetRoleId: string, curTime: Date) {
|
||||
const chatInfo = await ChatInfoModel.findInfo(roleId);
|
||||
const chatInfo = await roleChatInfos(roleId);
|
||||
let recentPrivateChats: PrivateChatRec[] = chatInfo?.recentPrivateChats||[]
|
||||
const recIdx = recentPrivateChats.findIndex(chat => { return chat.targetRoleId === targetRoleId });
|
||||
if (recIdx === -1) {
|
||||
@@ -269,7 +269,11 @@ async function updateRecentChats(sender: boolean, roleId: string, targetRoleId:
|
||||
/**
|
||||
* @description 获取聊天信息
|
||||
*/
|
||||
export async function roleChatInfos(roleId: string, roleName: string) {
|
||||
export async function roleChatInfos(roleId: string, roleName?: string) {
|
||||
if(!roleName) {
|
||||
let role = await RoleModel.findByRoleId(roleId, 'roleName');
|
||||
roleName = role.roleName;
|
||||
}
|
||||
let result = await ChatInfoModel.findInfo(roleId);
|
||||
if (!result) {
|
||||
result = await ChatInfoModel.createInfo({ roleId, roleName });
|
||||
|
||||
@@ -23,6 +23,7 @@ import { resResult } from "../../pubUtils/util";
|
||||
import { getActivities, getActivitiesByType, getActivityByServerId } from "../activity/activityService";
|
||||
import { getRoleCreateTime, getRoleOnlineInfo, getServerCreateTime } from "../redisService";
|
||||
import { getEquipById, getJewelByEquip, isRandSeUnLock } from "../equipService";
|
||||
import { debug } from "console";
|
||||
|
||||
export class CheckTask {
|
||||
serverId: number; // 区id
|
||||
@@ -339,6 +340,11 @@ export class CheckSingleTask {
|
||||
public async checkIsMatch(dicTaskParam: number[], getRecord: () => Promise<string[]>) {
|
||||
let param = this.param;
|
||||
let result: UpdateTaskParam = null;
|
||||
|
||||
if(this.param.debugInfo) {
|
||||
return { set: this.param.debugInfo.condition }
|
||||
}
|
||||
|
||||
switch(this.taskType) {
|
||||
case TASK_TYPE.LOGIN_SUM: // 1. 累计登录 x 天
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user