Commit 79e2d6fa authored by shajiaiming's avatar shajiaiming

fix

parent be9c7e87
......@@ -111,7 +111,7 @@ class AirDropController extends BaseController
$apply_id_arr = explode(',', $apply_ids);
$query->andWhere(['in', 'id', $apply_id_arr]);
}
$expiry_date = date("Y-m-d", strtotime("+1 day"));
$expiry_date = date("Y-m-d");
$query->andWhere(['<', 'create_time', $expiry_date]);
$items = $query->offset(($page - 1) * $size)->orderBy('id desc')->limit($size)->all();
......@@ -147,7 +147,7 @@ class AirDropController extends BaseController
$this->data = AirDropApplyRecord::find()
->where(['apply_id' => $model['id'], 'reach' => AirDropApplyRecord::REACH_YES])
->sum('bonus_token');
->sum('amount');
if (empty($this->data)) {
$this->data = 0;
goto doEnd;
......
......@@ -40,14 +40,14 @@ class AirDropController extends Controller
$draw_success = AirDropApplyRecord::find()
->where(['apply_id' => $val['id'], 'draw_status' => AirDropApplyRecord::STATUS_DRAW_SUEEESS])
->andWhere(['<', 'create_time', $expiry_date])
->sum('bonus_token');
->sum('amount');
$draw_success = empty($draw_success) ? 0 : (int)$draw_success;
//总收益
$income = AirDropApplyRecord::find()
->where(['apply_id' => $val['id'], 'reach' => AirDropApplyRecord::REACH_YES])
->andWhere(['<', 'create_time', $expiry_date])
->sum('bonus_token');
->sum('amount');
$income = empty($income) ? 0 : (int)$income;
//未领取
......@@ -136,7 +136,7 @@ class AirDropController extends Controller
foreach ($record as $val) {
go(function () use ($val) {
\Co::sleep(0.5);
$amount = $val->amount;
$amount = $val->amount * 1e8;
$fee = 1;
$note = '';
$execer = 'token';
......
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