Commit cd282ae1 authored by shajiaiming's avatar shajiaiming

Merge branch 'master' into develop

parents c237259f 5ae60893
...@@ -304,8 +304,13 @@ class AirDropController extends BaseController ...@@ -304,8 +304,13 @@ class AirDropController extends BaseController
$this->msg = '设备初始化中,请稍后再试.'; $this->msg = '设备初始化中,请稍后再试.';
goto doEnd; goto doEnd;
} }
$expiry_date = date("Y-m-d", strtotime("+1 day"));
$record = AirDropApplyRecord::find()->where(['apply_id' => $model->id, 'draw_status' => AirDropApplyRecord::STATUS_UNDRAW])->limit(1)->orderBy('id')->one(); $record = AirDropApplyRecord::find()
->where(['apply_id' => $model->id, 'draw_status' => AirDropApplyRecord::STATUS_UNDRAW])
->andWhere(['<', 'create_time', $expiry_date])
->orderBy('id')
->limit(1)
->one();
if (empty($record)) { if (empty($record)) {
$this->code = -1; $this->code = -1;
......
...@@ -34,7 +34,7 @@ class BitnasdaqBuilder extends FactoryService ...@@ -34,7 +34,7 @@ class BitnasdaqBuilder extends FactoryService
$keys = $this->redis->smembers($this->supported_symbol); $keys = $this->redis->smembers($this->supported_symbol);
if (false == $this->redis->exists($this->supported_symbol_list)) { if (false == $this->redis->exists($this->supported_symbol_list)) {
foreach ($keys as $val) { foreach ($keys as $val) {
if (in_array(strtoupper($val), ['BNCUSDT', 'BTCUSDT', 'CNYTUSDT', 'ETCUSDT', 'ETHUSDT', 'GHPUSDT', 'LTCUSDT'])) { if (in_array(strtoupper($val), ['BNCUSDT', 'BTCUSDT', 'ETCUSDT', 'ETHUSDT', 'GHPUSDT', 'LTCUSDT'])) {
$this->redis->lpush($this->supported_symbol_list, strtoupper($val)); $this->redis->lpush($this->supported_symbol_list, strtoupper($val));
} }
} }
......
...@@ -43,7 +43,7 @@ class AirDropController extends Controller ...@@ -43,7 +43,7 @@ class AirDropController extends Controller
//已领取次数 //已领取次数
$reached_times = AirDropApplyRecord::find() $reached_times = AirDropApplyRecord::find()
->where(['apply_id' => $val['id'], 'draw_status' => AirDropApplyRecord::STATUS_DRAW_SUEEESS]) ->where(['apply_id' => $val['id'], 'draw_status' => AirDropApplyRecord::STATUS_DRAW_SUEEESS])
->andWhere(['<', 'create_time', $expiry_date]) //->andWhere(['<', 'create_time', $expiry_date])
->count(); ->count();
$reached_times = empty($reached_times) ? 0 : (int)$reached_times; $reached_times = empty($reached_times) ? 0 : (int)$reached_times;
......
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