训练场宝箱展示bug

This commit is contained in:
mamengke01
2021-02-06 11:56:18 +08:00
parent d9bea0444c
commit d9458ede5f
22 changed files with 246 additions and 108 deletions
@@ -87,7 +87,7 @@ export class WishPoolHandler {
count = wishGoodsHero.count;
}
const id = genCode(6);
let { wishGoods: resWishGoods } = await UserGuildModel.pushAndUpdate(roleId, {}, { wishGoods: { type, goodId, count, receiveCnt: 0, drawCnt: 0, id} }, 'wishGoods');
let { wishGoods: resWishGoods } = await UserGuildModel.pushAndUpdate(roleId, {}, { wishGoods: { type, goodId, count, receiveCnt: 0, drawCnt: 0, id, donateNames:[]} }, 'wishGoods');
return resResult(STATUS.SUCCESS, { wishGoods: resWishGoods });
}
@@ -118,7 +118,7 @@ export class WishPoolHandler {
if (wishGood.receiveCnt >= wishGood.count)
return resResult(STATUS.HAS_RECEIVE_WISH_GOOD);//已经收到
let { wishDntCnt } = await UserGuildModel.donateGoods(dntRoleId, 1, 'wishDntCnt');
let { wishGoods: resWishGoods } = await UserGuildModel.donateUpdate(wishRoleId, id, 'wishGoods');
let { wishGoods: resWishGoods } = await UserGuildModel.donateUpdate(wishRoleId, dntRoleName, id, 'wishGoods');
let key = 'login_roleId_' + wishRoleId;
let sid = await getRedis(key);
let goods = await addItems(wishRoleId, role.roleName , sid , [{ id : wishGood.goodId, count: 1 }]);