Authored by 李奇

容错

const _ = require('lodash');
const {Activity} = require('../../../db');
const mysqlCli = global.yoho.utils.mysqlCli;
... ... @@ -75,6 +76,7 @@ class ActWheelSurfModel extends global.yoho.BaseModel {
getActConf(actId) {
return this.client.hgetallAsync(`turntable:${actId}`).then(conf => {
conf = conf || {};
Object.keys(conf).forEach(key => {
if (conf[key] && !_.isNaN(Number(conf[key]))) {
conf[key] = Number(conf[key])
... ...
... ... @@ -119,7 +119,6 @@ class ActWheelSurfModelRedis extends global.yoho.BaseModel {
}
}
// noinspection JSAnnotator
async goPrize(obj) {
try {
// 校验有效活动时间
... ... @@ -287,7 +286,7 @@ class ActWheelSurfModelRedis extends global.yoho.BaseModel {
getPrize = null;
for (let item of prize) {
if (item.type === 1) {
getPrize = item.dataValues;
getPrize = item;
break;
}
}
... ...