Commit 2a59420b authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/airdrop' into 'master'

Feature/airdrop See merge request !320
parents d887a5ff c0afd6e9
...@@ -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