|
@@ -107,7 +107,7 @@ class Index extends Api
|
|
|
// 统计前面的收益
|
|
|
$total = Record::where('time', ">=", $beginYesterday)
|
|
|
->where("time", '<', $endYesterday)
|
|
|
- ->field('sum(income) as income ,uid as id')
|
|
|
+ ->field('sum(income) as income, count(id) as num,uid as id')
|
|
|
->group("uid")
|
|
|
->select();
|
|
|
|
|
@@ -118,7 +118,8 @@ class Index extends Api
|
|
|
DayRecord::create([
|
|
|
"uid" => $item->id,
|
|
|
"addtime" => $date,
|
|
|
- "income" => $item->income
|
|
|
+ "link_num" => $item->num,
|
|
|
+ "income" => bcmul('1', $item->income, 4)
|
|
|
]);
|
|
|
}
|
|
|
|