Commit cd282ae1 authored by shajiaiming's avatar shajiaiming

Merge branch 'master' into develop

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