Commit f1ad9b14 authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/airdrop' into 'master'

fix See merge request !332
parents 1ac72752 60a0f488
......@@ -201,13 +201,14 @@ class AirDropController extends BaseController
}
$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) {
$this->msg = '已达今日领取上限,请明天再来!';
$this->code = -1;
goto doEnd;
}
$redis->setex($data['identifier'], strtotime('23:59:59') - time(), $value);
$record->draw_status = AirDropApplyRecord::STATUS_DRAWING;
if (false == $record->save()) {
$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