Authored by yyq

fix gain code

... ... @@ -333,12 +333,14 @@ module.exports = class extends global.yoho.BaseModel {
let userJoinTimes = userTimesCache.get(TimesCacheKey);
if (_.isUndefined(userJoinTimes)) {
userJoinTimes = await mysqlCli.query(`select count(*) from ${TABLE_ACT_PRIZE_PRODUCT_USER}
let info = await mysqlCli.query(`select count(*) as join_num from ${TABLE_ACT_PRIZE_PRODUCT_USER}
where act_prize_id = :actPrizeId and uid = :uid`, {
actPrizeId,
uid
});
userJoinTimes = _.get(info, '[0].join_num', 0);
// 用户参与次数超限(业务缓存)
if (userJoinTimes >= MAX_JOIN_TIMES) {
userTimesCache.set(TimesCacheKey, userJoinTimes);
... ...