Showing
1 changed file
with
4 additions
and
2 deletions
@@ -227,14 +227,16 @@ module.exports = class extends global.yoho.BaseModel { | @@ -227,14 +227,16 @@ module.exports = class extends global.yoho.BaseModel { | ||
227 | where = ' and act_prize_id = :actPrizeId'; | 227 | where = ' and act_prize_id = :actPrizeId'; |
228 | } | 228 | } |
229 | 229 | ||
230 | - return mysqlCli.query(`select user_name, user_thumb, create_time | 230 | + return mysqlCli.query(`select uid, user_name, user_thumb, create_time |
231 | from ${TABLE_ACT_PRIZE_PRODUCT_USER} where act_id = :actId${where} | 231 | from ${TABLE_ACT_PRIZE_PRODUCT_USER} where act_id = :actId${where} |
232 | order by create_time desc limit 10;`, { | 232 | order by create_time desc limit 10;`, { |
233 | actPrizeId, | 233 | actPrizeId, |
234 | actId | 234 | actId |
235 | }, { | 235 | }, { |
236 | cache: RECENT_CODE_CACHE_TIME | 236 | cache: RECENT_CODE_CACHE_TIME |
237 | - }).then(handelResult); | 237 | + }).then(result => { |
238 | + return handelResult(_.uniqBy(result, 'uid')); | ||
239 | + }); | ||
238 | } | 240 | } |
239 | 241 | ||
240 | /** | 242 | /** |
-
Please register or login to post a comment