...
|
...
|
@@ -26,9 +26,28 @@ class ActWheelSurfModel extends global.yoho.BaseModel { |
|
|
return Activity.findOne({where: {id: act_id}});
|
|
|
}
|
|
|
|
|
|
userFind(obj) {
|
|
|
async userFind(obj) {
|
|
|
let pageNo = obj.pageNo || 1;
|
|
|
let pageSize = obj.pageSize || 20;
|
|
|
let actId = obj.act_id;
|
|
|
|
|
|
let len = await this.client.llenAsync(`turntable:${actId}:prize:users`);
|
|
|
return this.client.lrangeAsync(`turntable:${actId}:prize:users`, (pageNo - 1) * pageSize, pageNo * pageSize - 1).then(prizes => {
|
|
|
let afters = prizes.map(prize => {
|
|
|
prize = prize.split(':::');
|
|
|
return {
|
|
|
uid: prize[0],
|
|
|
type: prize[1],
|
|
|
name: prize[2],
|
|
|
time: +prize[3]
|
|
|
}
|
|
|
});
|
|
|
|
|
|
return {
|
|
|
total: len,
|
|
|
list: afters
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
async exportRecords(actId) {
|
...
|
...
|
|