✨ 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
@@ -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;