...
|
...
|
@@ -107,7 +107,6 @@ const whSurfController = { |
|
|
status: {type: 'number', empty: true}
|
|
|
});
|
|
|
|
|
|
// let result = await req.ctx(wheelSurfModel).configModify(data);
|
|
|
let result = await req.ctx(wheelSurfModelRedis).setActConf(data.act_id, data);
|
|
|
|
|
|
return res.json({
|
...
|
...
|
@@ -134,7 +133,6 @@ const whSurfController = { |
|
|
});
|
|
|
}
|
|
|
let actInfo = await req.ctx(wheelSurfModel).actInfo(actId);
|
|
|
// let result = await req.ctx(wheelSurfModel).configFindOne(actId);
|
|
|
let result = await req.ctx(wheelSurfModelRedis).getActConf(actId);
|
|
|
|
|
|
let actStatus = 2; // 1: 活动未开始 2: 活动进行中 3:活动已过期
|
...
|
...
|
@@ -174,7 +172,7 @@ const whSurfController = { |
|
|
prize_idx: {type: 'number', empty: true},
|
|
|
});
|
|
|
});
|
|
|
// let result = await req.ctx(wheelSurfModel).prizeCreate(arr);
|
|
|
|
|
|
let result = await req.ctx(wheelSurfModelRedis).createActPrize(arr[0].act_id, arr);
|
|
|
|
|
|
return res.json({
|
...
|
...
|
@@ -218,13 +216,7 @@ const whSurfController = { |
|
|
});
|
|
|
});
|
|
|
|
|
|
let result;
|
|
|
try {
|
|
|
// let result = await req.ctx(wheelSurfModel).prizeUpdate(arr);
|
|
|
result = await req.ctx(wheelSurfModelRedis).updateActPrize(arr[0].act_id, arr);
|
|
|
} catch (e) {
|
|
|
console.log(e)
|
|
|
}
|
|
|
let result = await req.ctx(wheelSurfModelRedis).updateActPrize(arr[0].act_id, arr);
|
|
|
|
|
|
return res.json({
|
|
|
code: 200,
|
...
|
...
|
@@ -257,7 +249,6 @@ const whSurfController = { |
|
|
});
|
|
|
}
|
|
|
|
|
|
// let result = await req.ctx(wheelSurfModel).prizeFindByActId(actId);
|
|
|
let result = await req.ctx(wheelSurfModelRedis).getActPrize(actId);
|
|
|
|
|
|
return res.json({
|
...
|
...
|
|