我的账户数据修改-获取我的账户数据

This commit is contained in:
2024-04-22 14:30:46 +08:00
parent 155ce8d7aa
commit 5d79f4795b
9 changed files with 426 additions and 205 deletions
+3 -2
View File
@@ -115,9 +115,10 @@ class DoctorAccountDay extends Model
*/
public static function getDoctorMonth(array $params,array $fields = ['*']): \Hyperf\Collection\Collection
{
return self::select(['month',Db::raw('SUM(total_amount) AS `total_amount`')])
return self::select(['year','month',Db::raw('SUM(total_amount) AS `total_amount`')])
->where($params)
->groupBy(['month'])
->groupBy(['year','month'])
->orderBy('year')
->orderBy('month')
->get($fields);
}