修改im路由
This commit is contained in:
parent
9d65658ebe
commit
adad73a9b7
@ -81,3 +81,42 @@ func (r *InquiryConfig) GetDoctorInquiryConfig(c *gin.Context) {
|
|||||||
|
|
||||||
responses.OkWithData(getUserDoctorResponses, c)
|
responses.OkWithData(getUserDoctorResponses, c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PutDoctorInquiryConfig 修改医生问诊配置
|
||||||
|
func (r *InquiryConfig) PutDoctorInquiryConfig(c *gin.Context) {
|
||||||
|
// inquiryConfigRequest := requests.InquiryConfigRequest{}
|
||||||
|
// req := inquiryConfigRequest.PutDoctorInquiryConfig
|
||||||
|
// if err := c.ShouldBindJSON(&req); err != nil {
|
||||||
|
// responses.FailWithMessage(err.Error(), c)
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // 参数验证
|
||||||
|
// if err := global.Validate.Struct(req); err != nil {
|
||||||
|
// responses.FailWithMessage(utils.Translate(err), c)
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// id := c.Param("doctor_id")
|
||||||
|
// if id == "" {
|
||||||
|
// responses.FailWithMessage("缺少参数", c)
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // 将 id 转换为 int64 类型
|
||||||
|
// doctorId, err := strconv.ParseInt(id, 10, 64)
|
||||||
|
// if err != nil {
|
||||||
|
// responses.Fail(c)
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // 业务处理
|
||||||
|
// userDoctorService := service.UserDoctorService{}
|
||||||
|
// _, err = userDoctorService.PutUserDoctor(doctorId, req)
|
||||||
|
// if err != nil {
|
||||||
|
// responses.FailWithMessage(err.Error(), c)
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
|
||||||
|
responses.Ok(c)
|
||||||
|
}
|
||||||
|
|||||||
@ -197,19 +197,6 @@ func (r *OrderInquiry) GetOrderInquiryRecord(c *gin.Context) {
|
|||||||
|
|
||||||
// GetOrderInquiryImPage 获取问诊订单im内容列表-分页
|
// GetOrderInquiryImPage 获取问诊订单im内容列表-分页
|
||||||
func (r *OrderInquiry) GetOrderInquiryImPage(c *gin.Context) {
|
func (r *OrderInquiry) GetOrderInquiryImPage(c *gin.Context) {
|
||||||
id := c.Param("order_inquiry_id")
|
|
||||||
if id == "" {
|
|
||||||
responses.FailWithMessage("缺少参数", c)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 将 id 转换为 int64 类型
|
|
||||||
orderInquiryId, err := strconv.ParseInt(id, 10, 64)
|
|
||||||
if err != nil {
|
|
||||||
responses.Fail(c)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
req := requests.OrderInquiryRequest{}
|
req := requests.OrderInquiryRequest{}
|
||||||
if err := c.ShouldBind(&req.GetOrderInquiryImPage); err != nil {
|
if err := c.ShouldBind(&req.GetOrderInquiryImPage); err != nil {
|
||||||
responses.FailWithMessage(err.Error(), c)
|
responses.FailWithMessage(err.Error(), c)
|
||||||
@ -231,7 +218,7 @@ func (r *OrderInquiry) GetOrderInquiryImPage(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
messageImDao := dao.MessageImDao{}
|
messageImDao := dao.MessageImDao{}
|
||||||
messageIm, total, err := messageImDao.GetMessageImPageSearch(orderInquiryId, req.GetOrderInquiryImPage.Page, req.GetOrderInquiryImPage.PageSize)
|
messageIm, total, err := messageImDao.GetMessageImPageSearch(req.GetOrderInquiryImPage.OrderInquiryId, req.GetOrderInquiryImPage.Page, req.GetOrderInquiryImPage.PageSize)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
responses.FailWithMessage(err.Error(), c)
|
responses.FailWithMessage(err.Error(), c)
|
||||||
return
|
return
|
||||||
|
|||||||
@ -14,3 +14,20 @@ type GetDoctorInquiryConfigPage struct {
|
|||||||
InquiryMode *int `json:"inquiry_mode" form:"inquiry_mode" label:"问诊方式"` // 1:图文 2:视频 3:语音 4:电话 5:会员
|
InquiryMode *int `json:"inquiry_mode" form:"inquiry_mode" label:"问诊方式"` // 1:图文 2:视频 3:语音 4:电话 5:会员
|
||||||
IsEnable *int `json:"is_enable" form:"is_enable" label:"是否启用"` // 0:否 1:是
|
IsEnable *int `json:"is_enable" form:"is_enable" label:"是否启用"` // 0:否 1:是
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PutDoctorInquiryConfig 修改医生问诊配置
|
||||||
|
type PutDoctorInquiryConfig struct {
|
||||||
|
DoctorId int `json:"doctor_id" form:"doctor_id"` // 医生id
|
||||||
|
InquiryType *int `json:"inquiry_type" form:"inquiry_type" label:"问诊类型"` // 1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药 5:检测
|
||||||
|
InquiryMode *int `json:"inquiry_mode" form:"inquiry_mode" label:"问诊方式"` // 1:图文 2:视频 3:语音 4:电话 5:会员
|
||||||
|
WorkNumDay *int `json:"work_num_day" label:"每日接诊数量"`
|
||||||
|
IsEnable *int `json:"is_enable" form:"is_enable" label:"是否启用"` // 0:否 1:是
|
||||||
|
PutDoctorInquiryTime []*putDoctorInquiryTime `json:"doctor_inquiry_time" form:"doctor_inquiry_time" label:"医生问诊配置-时间配置"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// putDoctorInquiryConfigByTime 医生问诊配置-时间配置
|
||||||
|
type putDoctorInquiryTime struct {
|
||||||
|
InquiryDate string `json:"inquiry_date" form:"inquiry_date" label:"坐班日期"`
|
||||||
|
StartTime string `json:"start_time" form:"start_time" label:"开始时间"`
|
||||||
|
EndTime string `json:"end_time" form:"end_time" label:"结束时间"`
|
||||||
|
}
|
||||||
|
|||||||
@ -64,4 +64,5 @@ type GetOrderInquiryRecordPage struct {
|
|||||||
type GetOrderInquiryImPage struct {
|
type GetOrderInquiryImPage struct {
|
||||||
Page int `json:"page" form:"page" label:"页码"`
|
Page int `json:"page" form:"page" label:"页码"`
|
||||||
PageSize int `json:"page_size" form:"page_size" label:"每页个数"`
|
PageSize int `json:"page_size" form:"page_size" label:"每页个数"`
|
||||||
|
OrderInquiryId int64 `json:"order_inquiry_id" form:"order_inquiry_id" label:"订单id"`
|
||||||
}
|
}
|
||||||
|
|||||||
@ -478,7 +478,7 @@ func privateRouter(r *gin.Engine, api controller.Api) {
|
|||||||
doctorGroup.GET("/:inquiry_config_id", api.InquiryConfig.GetDoctorInquiryConfig)
|
doctorGroup.GET("/:inquiry_config_id", api.InquiryConfig.GetDoctorInquiryConfig)
|
||||||
|
|
||||||
// 修改医生问诊配置
|
// 修改医生问诊配置
|
||||||
doctorGroup.PUT("/:doctor_id", api.UserDoctor.PutUserDoctor)
|
doctorGroup.PUT("/:inquiry_config_id", api.InquiryConfig.PutDoctorInquiryConfig)
|
||||||
|
|
||||||
// 新增医生问诊配置
|
// 新增医生问诊配置
|
||||||
doctorGroup.POST("", api.UserDoctor.AddUserDoctor)
|
doctorGroup.POST("", api.UserDoctor.AddUserDoctor)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user