Commit f811852e authored by shajiaiming's avatar shajiaiming

领取记录条件验证

parent b740bbe8
......@@ -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])
->limit(1)
->orderBy('id')
->one();
if (empty($record)) {
$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