新增:提现详情
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"hospital-admin-api/api/model"
|
||||
)
|
||||
|
||||
type DoctorWithdrawalBankDto struct {
|
||||
WithdrawalBankId string `json:"withdrawal_bank_id"` // 主键id
|
||||
WithdrawalId string `json:"withdrawal_id"` // 提现id
|
||||
BankId string `json:"bank_id"` // 银行id
|
||||
BankCardCode string `json:"bank_card_code"` // 银行卡号
|
||||
ProvinceId int `json:"province_id"` // 省份id
|
||||
Province string `json:"province"` // 省份
|
||||
CityId int `json:"city_id"` // 城市id
|
||||
City string `json:"city"` // 城市
|
||||
CountyId int `json:"county_id"` // 区县id
|
||||
County string `json:"county"` // 区县
|
||||
CreatedAt model.LocalTime `json:"created_at"` // 创建时间
|
||||
UpdatedAt model.LocalTime `json:"updated_at"` // 修改时间
|
||||
BasicBank *BasicBankDto `json:"basic_bank"` // 基础-银行数据
|
||||
}
|
||||
|
||||
func GetDoctorWithdrawalBankDto(m *model.DoctorWithdrawalBank) *DoctorWithdrawalBankDto {
|
||||
return &DoctorWithdrawalBankDto{
|
||||
WithdrawalBankId: fmt.Sprintf("%d", m.WithdrawalBankId),
|
||||
WithdrawalId: fmt.Sprintf("%d", m.WithdrawalId),
|
||||
BankId: fmt.Sprintf("%d", m.BankId),
|
||||
BankCardCode: m.BankCardCode,
|
||||
ProvinceId: m.ProvinceId,
|
||||
Province: m.Province,
|
||||
CityId: m.CityId,
|
||||
City: m.City,
|
||||
CountyId: m.CountyId,
|
||||
County: m.County,
|
||||
CreatedAt: m.CreatedAt,
|
||||
UpdatedAt: m.UpdatedAt,
|
||||
}
|
||||
}
|
||||
|
||||
func GetDoctorWithdrawalBankListDto(m []*model.DoctorWithdrawalBank) []*DoctorWithdrawalBankDto {
|
||||
// 处理返回值
|
||||
responses := make([]*DoctorWithdrawalBankDto, len(m))
|
||||
|
||||
if len(m) > 0 {
|
||||
for i, v := range m {
|
||||
response := &DoctorWithdrawalBankDto{
|
||||
WithdrawalBankId: fmt.Sprintf("%d", v.WithdrawalBankId),
|
||||
WithdrawalId: fmt.Sprintf("%d", v.WithdrawalId),
|
||||
BankId: fmt.Sprintf("%d", v.BankId),
|
||||
BankCardCode: v.BankCardCode,
|
||||
ProvinceId: v.ProvinceId,
|
||||
Province: v.Province,
|
||||
CityId: v.CityId,
|
||||
City: v.City,
|
||||
CountyId: v.CountyId,
|
||||
County: v.County,
|
||||
CreatedAt: v.CreatedAt,
|
||||
UpdatedAt: v.UpdatedAt,
|
||||
}
|
||||
|
||||
// 将转换后的结构体添加到新切片中
|
||||
responses[i] = response
|
||||
}
|
||||
}
|
||||
|
||||
return responses
|
||||
}
|
||||
Reference in New Issue
Block a user