🐞 fix(活动): 关注豪礼添加debug接口并修复状态错误
This commit is contained in:
@@ -134,4 +134,21 @@ export class BindPhoneHandler {
|
||||
async skipOutSide(msg: { activityId: number }, session: BackendSession) {
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 公众号设置成可以领取的状态
|
||||
* @param {{ activityId: number}} msg
|
||||
* @param {BackendSession} session
|
||||
* @memberof BindPhoneHandler
|
||||
*/
|
||||
async debugSetGiftCodeStatus(msg: { activityId: number }, session: BackendSession) {
|
||||
const { activityId } = msg;
|
||||
const roleId = session.get('roleId');
|
||||
const serverId = session.get('serverId');
|
||||
const uid = session.get('userid');
|
||||
let user = await UserModel.findUserByUid(uid);
|
||||
await ActivityPublicAccountCodeModel.findOneAndUpdate({ activityId, channelId: user.channelId }, { $set: { serverId, roleId, orderId: 'test', hasReceived: false } }, { new: true, upsert: true }).lean();
|
||||
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2084,6 +2084,7 @@ export function checkRouteParam(route: string, msg: any) {
|
||||
case "guild.gvgBattleHandler.debugStopMoveRobot":
|
||||
case "chat.chatHandler.debugPushMessage":
|
||||
case "activity.monthlyFundHandler.debugSendMonthlyFundReward":
|
||||
case "activity.bindPhoneHandler.debugSetGiftCodeStatus":
|
||||
|
||||
{
|
||||
if (msg.magicWord !== DEBUG_MAGIC_WORD || !isDevelopEnv()) return false;
|
||||
|
||||
@@ -77,7 +77,7 @@ class WXPublicAccountPage extends PageData {
|
||||
|
||||
public setPlayerRecord(playerRecord: ActivityPublicAccountCodeType) {
|
||||
if(!playerRecord) return;
|
||||
this.status = playerRecord.hasReceived? BIND_PHONE_STATUS.HAS_BIND: BIND_PHONE_STATUS.RECEIVED;
|
||||
this.status = playerRecord.hasReceived? BIND_PHONE_STATUS.RECEIVED: BIND_PHONE_STATUS.HAS_BIND;
|
||||
}
|
||||
|
||||
public getShowResult() {
|
||||
|
||||
Reference in New Issue
Block a user