新增专长
This commit is contained in:
@@ -55,8 +55,8 @@ func (r *UserDoctor) GetUserDoctorPage(c *gin.Context) {
|
||||
responses.OkWithData(result, c)
|
||||
}
|
||||
|
||||
// GetPostUserDoctor 医生详情
|
||||
func (r *UserDoctor) GetPostUserDoctor(c *gin.Context) {
|
||||
// GetUserDoctor 医生详情
|
||||
func (r *UserDoctor) GetUserDoctor(c *gin.Context) {
|
||||
id := c.Param("doctor_id")
|
||||
if id == "" {
|
||||
responses.FailWithMessage("缺少参数", c)
|
||||
@@ -70,17 +70,14 @@ func (r *UserDoctor) GetPostUserDoctor(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// 获取医生数据
|
||||
userDoctorDao := dao.UserDoctorDao{}
|
||||
userDoctor, err := userDoctorDao.GetUserDoctorPreloadById(doctorId)
|
||||
// 业务处理
|
||||
userDoctorService := service.UserDoctorService{}
|
||||
getUserDoctorResponses, err := userDoctorService.GetUserDoctor(doctorId)
|
||||
if err != nil {
|
||||
responses.FailWithMessage("用户数据错误", c)
|
||||
responses.FailWithMessage(err.Error(), c)
|
||||
return
|
||||
}
|
||||
|
||||
// 处理返回值
|
||||
getUserDoctorResponses := userDoctorResponse.GetUserDoctorResponse(userDoctor)
|
||||
|
||||
responses.OkWithData(getUserDoctorResponses, c)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user