Authored by 李奇

remove unnecessary persist

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