新增提现模型,修正我的账户

This commit is contained in:
2023-02-23 17:28:40 +08:00
parent 956c9c6474
commit 695cb4f1a2
5 changed files with 111 additions and 115 deletions
+3 -3
View File
@@ -15,7 +15,7 @@ use Hyperf\Snowflake\Concern\Snowflake;
* @property int $month 月(12
* @property int $day 日(01
* @property string $date 日期(2022-01-01
* @property string $total_amount_day 订单总金额-日
* @property string $total_amount 订单总金额-日
* @property \Carbon\Carbon $created_at 创建时间
* @property \Carbon\Carbon $updated_at 修改时间
*/
@@ -31,7 +31,7 @@ class DoctorAccountDay extends Model
/**
* The attributes that are mass assignable.
*/
protected array $fillable = ['account_detail_id', 'doctor_id', 'year', 'month', 'day', 'date', 'total_amount_day', 'created_at', 'updated_at'];
protected array $fillable = ['account_detail_id', 'doctor_id', 'year', 'month', 'day', 'date', 'total_amount', 'created_at', 'updated_at'];
/**
* The attributes that should be cast to native types.
@@ -69,6 +69,6 @@ class DoctorAccountDay extends Model
*/
public static function getDoctorSumTotalAmount(array $params): mixed
{
return self::where($params)->sum("total_amount_day");
return self::where($params)->sum("total_amount");
}
}