优化店铺信息获取接口

This commit is contained in:
zhl 2021-06-09 10:14:17 +08:00
parent a9c717a418
commit f1b199b16c

View File

@ -95,11 +95,11 @@ class ShopController extends BaseController {
if (!shop) {
throw new ZError(11, '未找到对应的店铺')
}
let user = (await GameUser.findOrCreate({ accountId })).doc
user.shop = shop.id
user.shops.pushOnce(shop.id)
user.loginParams = sid.split('|').slice(1)
await user.save()
await GameUser.findOneAndUpdate(
{ accountId },
{ shop: shop.id, loginParams: sid.split('_').slice(1) },
{ upsert: true, new: true },
)
rspData.gameCfg = {}
if (!!shop.gameInfo) {
let gameInfo = shop.gameInfo