Commit 78c75f16 authored by shajiaiming's avatar shajiaiming

fix

parent 33e4ace6
...@@ -24,20 +24,23 @@ class AirDropController extends Controller ...@@ -24,20 +24,23 @@ class AirDropController extends Controller
return 0; return 0;
} }
foreach ($apply as $val) { foreach ($apply as $val) {
//达标次数
$reach = AirDropApplyRecord::find() $reach = AirDropApplyRecord::find()
->where(['apply_id' => $val['id'], 'reach' => AirDropApplyRecord::REACH_YES]) ->where(['apply_id' => $val['id'], 'reach' => AirDropApplyRecord::REACH_YES])
->sum('reach'); ->sum('reach');
$reach = empty($reach) ? 0 : $reach; $reach = empty($reach) ? 0 : $reach;
//已领取
$draw = AirDropApplyRecord::find() $draw = AirDropApplyRecord::find()
->where(['apply_id' => $val['id'], 'draw_status' => AirDropApplyRecord::STATUS_DRAW_SUEEESS]) ->where(['apply_id' => $val['id'], 'draw_status' => AirDropApplyRecord::STATUS_DRAW_SUEEESS])
->sum('reach'); ->sum('bonus_token');
$draw = empty($draw) ? 0 : $draw; $draw = empty($draw) ? 0 : $draw;
$reach = AirDropApplyRecord::find() //总收益
$income = AirDropApplyRecord::find()
->where(['apply_id' => $val['id'], 'reach' => AirDropApplyRecord::REACH_YES]) ->where(['apply_id' => $val['id'], 'reach' => AirDropApplyRecord::REACH_YES])
->sum('reach'); ->sum('bonus_token');
$reach = empty($reach) ? 0 : $reach; $income = empty($income) ? 0 : $income;
} }
......
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