Authored by 李奇

remove unnecessary persist

... ... @@ -29,7 +29,6 @@ const adminController = {
const userName = req.body.userName || '';
const password = req.body.password || '';
// TODO 管理员暂时写死
if (userName !== 'admin' || password !== 'yap@admin') {
return res.json({
code: 400,
... ...
... ... @@ -40,9 +40,7 @@ class ActWheelSurfRedis extends global.yoho.BaseModel {
prize.id = idx + 1;
multi.lpush(`turntable:${actId}:prize`, JSON.stringify(prize));
multi.set(`turntable:${actId}:prize:${prize.prize_idx}:stock`, prize.total_left);
multi.persist(`turntable:${actId}:prize:${prize.prize_idx}:stock`);
});
multi.persist(`turntable:${actId}:prize`);
return multi.execAsync();
}
updateActPrize(actId, prizesList) {
... ...