✨ feat(37需求): 评论引导记录

This commit is contained in:
luying
2023-04-10 16:15:20 +08:00
parent 98411f2725
commit 33560c93df
5 changed files with 38 additions and 14 deletions
@@ -215,18 +215,7 @@ export class ChatHandler {
if (!accuseRec) return resResult(STATUS.WRONG_PARMS);
return resResult(STATUS.SUCCESS, accuseRec);
}
async setPushMsgTrigger(msg: { isClosePush: boolean }, session: BackendSession) {
const roleId = session.get('roleId');
const { isClosePush } = msg;
let role = await RoleModel.setPushMsgOpen(roleId, isClosePush);
if(!role) return resResult(STATUS.ROLE_NOT_FOUND);
return resResult(STATUS.SUCCESS, {
isClosePushPush: role.isClosePush
})
}
// 客户端推送消息
async debugPushMessage(msg: { uid: number }, session: BackendSession) {
let dic = gameData.dicPushMessage.get(SDK_PUSH_MSG_TYPE.GUILD_ACTIVITY_START);
@@ -503,6 +503,28 @@ export class RoleHandler {
});
}
async setPushMsgTrigger(msg: { isClosePush: boolean }, session: BackendSession) {
const roleId = session.get('roleId');
const { isClosePush } = msg;
let role = await RoleModel.setPushMsgOpen(roleId, isClosePush);
if(!role) return resResult(STATUS.ROLE_NOT_FOUND);
return resResult(STATUS.SUCCESS, {
isClosePushPush: role.isClosePush
})
}
async setHasComment(msg: { hasComment: boolean }, session: BackendSession) {
const roleId = session.get('roleId');
const { hasComment } = msg;
let role = await RoleModel.setHasComment(roleId, hasComment);
if(!role) return resResult(STATUS.ROLE_NOT_FOUND);
return resResult(STATUS.SUCCESS, {
hasComment: role.hasComment
})
}
// 防沉迷调试用,推送窗口
async debugPlayerTime(msg: { type: number }, session: BackendSession) {
let { type } = msg;
+6 -1
View File
@@ -1994,11 +1994,16 @@ export function checkRouteParam(route: string, msg: any) {
if(!isDevelopEnv() && !checkNaturalNumbers(msg.id, msg.count)) return false;
break;
}
case "chat.chatHandler.setPushMsgTrigger":
case "role.roleHandler.setPushMsgTrigger":
{
if(!isBoolean(msg.isClosePush)) return false;
break;
}
case "role.roleHandler.setHasComment":
{
if(!isBoolean(msg.hasComment)) return false;
break;
}
case 'activity.activityHandler.debugActivityMemory':
case 'activity.popUpShopHandler.debugPushPopUpShop':
case 'activity.popUpShopHandler.debugPushPopUpInterval':