新增 导出路由+提现详情医生user_id
This commit is contained in:
parent
5113fab527
commit
ca3bbaf77b
@ -30,6 +30,7 @@ type DoctorWithdrawalDto struct {
|
||||
DoctorWithdrawalBank *DoctorWithdrawalBankDto `json:"doctor_withdrawal_bank"` // 医生提现表-关联银行
|
||||
BankName string `json:"bank_name"` // 提现银行名称
|
||||
BankCity string `json:"bank_city"` // 提现银行开户行城市
|
||||
DoctorUserId string `json:"doctor_user_id"` // 医生user_id
|
||||
}
|
||||
|
||||
func GetDoctorWithdrawalDto(m *model.DoctorWithdrawal) *DoctorWithdrawalDto {
|
||||
@ -186,3 +187,11 @@ func (r *DoctorWithdrawalDto) LoadBasicBank(m *model.BasicBank) *DoctorWithdrawa
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
// LoadDoctorUserId 加载医生user_id
|
||||
func (r *DoctorWithdrawalDto) LoadDoctorUserId(m *model.User) *DoctorWithdrawalDto {
|
||||
if m != nil {
|
||||
r.DoctorUserId = fmt.Sprintf("%d", m.UserId)
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
@ -591,4 +591,11 @@ func privateRouter(r *gin.Engine, api controller.Api) {
|
||||
signGroup.POST("", api.UserCaCert.AddUserSignConfig)
|
||||
}
|
||||
}
|
||||
|
||||
// 导出管理
|
||||
exportGroup := adminGroup.Group("/export")
|
||||
{
|
||||
// 提现记录
|
||||
exportGroup.PUT("/withdrawal", api.UserCaCert.RenewUserCloudCert)
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,6 +29,13 @@ func (r *DoctorWithdrawalService) GetDoctorWithdrawal(withdrawalId int64) (g *dt
|
||||
return nil, errors.New("医生数据错误")
|
||||
}
|
||||
|
||||
// 获取医生用户数据
|
||||
userDao := dao.UserDao{}
|
||||
user, err := userDao.GetUserById(userDoctor.UserId)
|
||||
if err != nil || user == nil {
|
||||
return nil, errors.New("医生数据错误")
|
||||
}
|
||||
|
||||
// 获取医生详情数据
|
||||
userDoctorInfoDao := dao.UserDoctorInfoDao{}
|
||||
userDoctorInfo, err := userDoctorInfoDao.GetUserDoctorInfoByUserId(userDoctor.UserId)
|
||||
@ -71,6 +78,9 @@ func (r *DoctorWithdrawalService) GetDoctorWithdrawal(withdrawalId int64) (g *dt
|
||||
// 加载基础银行数据
|
||||
g.LoadBasicBank(basicBank)
|
||||
|
||||
// 加载医生user_id
|
||||
g.LoadDoctorUserId(user)
|
||||
|
||||
return g, nil
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user