新增 已完成待入账金额\今日预计收入
This commit is contained in:
+18
-14
@@ -7,17 +7,19 @@ import (
|
||||
)
|
||||
|
||||
type DoctorAccountDto struct {
|
||||
AccountId string `json:"account_id"` // 账户id
|
||||
DoctorId string `json:"doctor_id"` // 医生id
|
||||
TotalAmount float64 `json:"total_amount"` // 总金额(已结束订单的总金额)
|
||||
BalanceAccount float64 `json:"balance_account"` // 账户余额
|
||||
AppliedWithdrawalAmount float64 `json:"applied_withdrawal_amount"` // 提现金额
|
||||
ActualWithdrawalAmount float64 `json:"actual_withdrawal_amount"` // 实际提现金额
|
||||
IncomeTax float64 `json:"income_tax"`
|
||||
CreatedAt model.LocalTime `json:"created_at"` // 创建时间
|
||||
UpdatedAt model.LocalTime `json:"updated_at"` // 修改时间
|
||||
DoctorName string `json:"doctor_name"` // 医生姓名
|
||||
DoctorMobileMask string `json:"doctor_mobile_mask"` // 医生手机号(掩码)
|
||||
AccountId string `json:"account_id"` // 账户id
|
||||
DoctorId string `json:"doctor_id"` // 医生id
|
||||
TotalAmount float64 `json:"total_amount"` // 总金额(已结束订单的总金额)
|
||||
BalanceAccount float64 `json:"balance_account"` // 账户余额
|
||||
AppliedWithdrawalAmount float64 `json:"applied_withdrawal_amount"` // 提现金额
|
||||
ActualWithdrawalAmount float64 `json:"actual_withdrawal_amount"` // 实际提现金额
|
||||
IncomeTax float64 `json:"income_tax"`
|
||||
CreatedAt model.LocalTime `json:"created_at"` // 创建时间
|
||||
UpdatedAt model.LocalTime `json:"updated_at"` // 修改时间
|
||||
DoctorName string `json:"doctor_name"` // 医生姓名
|
||||
DoctorMobileMask string `json:"doctor_mobile_mask"` // 医生手机号(掩码)
|
||||
CompletedWaitEntryAmount float64 `json:"completed_wait_entry_amount"` // 已完成待入账金额
|
||||
EstimateIncome float64 `json:"estimate_income"` // 今日预计收入
|
||||
}
|
||||
|
||||
func GetDoctorAccountDto(m *model.DoctorAccount) *DoctorAccountDto {
|
||||
@@ -34,13 +36,13 @@ func GetDoctorAccountDto(m *model.DoctorAccount) *DoctorAccountDto {
|
||||
}
|
||||
}
|
||||
|
||||
func GetDoctorAccountListDto(m []*model.DoctorAccount) []DoctorAccountDto {
|
||||
func GetDoctorAccountListDto(m []*model.DoctorAccount) []*DoctorAccountDto {
|
||||
// 处理返回值
|
||||
responses := make([]DoctorAccountDto, len(m))
|
||||
responses := make([]*DoctorAccountDto, len(m))
|
||||
|
||||
if len(m) > 0 {
|
||||
for i, v := range m {
|
||||
response := DoctorAccountDto{
|
||||
response := &DoctorAccountDto{
|
||||
AccountId: fmt.Sprintf("%d", v.AccountId),
|
||||
DoctorId: fmt.Sprintf("%d", v.DoctorId),
|
||||
TotalAmount: v.TotalAmount,
|
||||
@@ -62,6 +64,8 @@ func GetDoctorAccountListDto(m []*model.DoctorAccount) []DoctorAccountDto {
|
||||
}
|
||||
}
|
||||
|
||||
// 加载医生已完成待入账金额
|
||||
|
||||
// 将转换后的结构体添加到新切片中
|
||||
responses[i] = response
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user