Commit 79e2d6fa authored by shajiaiming's avatar shajiaiming

fix

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