1
This commit is contained in:
parent
26a884d3e3
commit
9a8797c443
@ -22,7 +22,7 @@ type GetDoctorInquiryConfigPage struct {
|
||||
|
||||
// PutDoctorInquiryConfig 修改医生问诊配置
|
||||
type PutDoctorInquiryConfig struct {
|
||||
DoctorId int64 `json:"doctor_id" form:"doctor_id" validate:"required"` // 医生id
|
||||
DoctorId string `json:"doctor_id" form:"doctor_id" validate:"required"` // 医生id
|
||||
InquiryType int `json:"inquiry_type" form:"inquiry_type" validate:"required,oneof=1 2 3 4 5" label:"问诊类型"` // 1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药 5:检测
|
||||
InquiryMode int `json:"inquiry_mode" form:"inquiry_mode" validate:"required,oneof=1 2 3 4 5" label:"问诊方式"` // 1:图文 2:视频 3:语音 4:电话 5:会员
|
||||
WorkNumDay int `json:"work_num_day" label:"每日接诊数量"`
|
||||
@ -40,7 +40,7 @@ type doctorInquiryTime struct {
|
||||
|
||||
// AddDoctorInquiryConfig 新增医生问诊配置
|
||||
type AddDoctorInquiryConfig struct {
|
||||
DoctorId int64 `json:"doctor_id" form:"doctor_id" validate:"required"` // 医生id
|
||||
DoctorId string `json:"doctor_id" form:"doctor_id" validate:"required"` // 医生id
|
||||
InquiryType int `json:"inquiry_type" form:"inquiry_type" validate:"required,oneof=1 2 3 4 5" label:"问诊类型"` // 1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药 5:检测
|
||||
InquiryMode int `json:"inquiry_mode" form:"inquiry_mode" validate:"required,oneof=1 2 3 4 5" label:"问诊方式"` // 1:图文 2:视频 3:语音 4:电话 5:会员
|
||||
WorkNumDay int `json:"work_num_day" label:"每日接诊数量"`
|
||||
|
||||
@ -349,8 +349,13 @@ func (r *DoctorInquiryConfigService) AddDoctorInquiryConfig(req requests.AddDoct
|
||||
}
|
||||
|
||||
// 获取医生数据
|
||||
doctorId, err := strconv.ParseInt(req.DoctorId, 10, 64)
|
||||
if err != nil {
|
||||
return false, errors.New("医院错误")
|
||||
}
|
||||
|
||||
userDoctorDao := dao.UserDoctorDao{}
|
||||
userDoctor, err := userDoctorDao.GetUserDoctorById(req.DoctorId)
|
||||
userDoctor, err := userDoctorDao.GetUserDoctorById(doctorId)
|
||||
if err != nil || userDoctor == nil {
|
||||
return false, errors.New(err.Error())
|
||||
}
|
||||
@ -424,7 +429,7 @@ func (r *DoctorInquiryConfigService) AddDoctorInquiryConfig(req requests.AddDoct
|
||||
|
||||
// 新增医生问诊配置
|
||||
doctorInquiryConfig = &model.DoctorInquiryConfig{
|
||||
DoctorId: req.DoctorId,
|
||||
DoctorId: doctorId,
|
||||
InquiryType: req.InquiryType,
|
||||
InquiryMode: req.InquiryMode,
|
||||
IsEnable: req.IsEnable,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user