Commit 60a0f488 authored by shajiaiming's avatar shajiaiming

fix

parent 978ee291
...@@ -201,13 +201,14 @@ class AirDropController extends BaseController ...@@ -201,13 +201,14 @@ class AirDropController extends BaseController
} }
$redis = Yii::$app->redis_app; $redis = Yii::$app->redis_app;
$is_locked = $redis->setnx($data['identifier'], strtotime('23:59:59') - time()); $value = date('Y-m-d H:i:s');
$is_locked = $redis->setnx($data['identifier'], $value);
if (!$is_locked) { if (!$is_locked) {
$this->msg = '已达今日领取上限,请明天再来!'; $this->msg = '已达今日领取上限,请明天再来!';
$this->code = -1; $this->code = -1;
goto doEnd; goto doEnd;
} }
$redis->setex($data['identifier'], strtotime('23:59:59') - time(), $value);
$record->draw_status = AirDropApplyRecord::STATUS_DRAWING; $record->draw_status = AirDropApplyRecord::STATUS_DRAWING;
if (false == $record->save()) { if (false == $record->save()) {
$this->code = -1; $this->code = -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment