Authored by yyq

recent uniqBy

... ... @@ -227,14 +227,16 @@ module.exports = class extends global.yoho.BaseModel {
where = ' and act_prize_id = :actPrizeId';
}
return mysqlCli.query(`select user_name, user_thumb, create_time
return mysqlCli.query(`select uid, user_name, user_thumb, create_time
from ${TABLE_ACT_PRIZE_PRODUCT_USER} where act_id = :actId${where}
order by create_time desc limit 10;`, {
actPrizeId,
actId
}, {
cache: RECENT_CODE_CACHE_TIME
}).then(handelResult);
}).then(result => {
return handelResult(_.uniqBy(result, 'uid'));
});
}
/**
... ...