🐛 fix bug
This commit is contained in:
@@ -2,6 +2,8 @@ package system
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
"miniapp/global"
|
||||
"miniapp/model/common"
|
||||
"miniapp/model/common/request"
|
||||
r "miniapp/model/common/response"
|
||||
@@ -97,3 +99,23 @@ func (h HospitalApi) GetHospitalById(ctx *gin.Context) {
|
||||
|
||||
r.OkWithDetailed(hospitalResult, "获取成功", ctx)
|
||||
}
|
||||
|
||||
// GetHospitalNotes 根据id获取医院注意事项
|
||||
func (h HospitalApi) GetHospitalNotes(ctx *gin.Context) {
|
||||
p := request.GetHospitalNotes{}
|
||||
if err := ctx.ShouldBind(&p); err != nil {
|
||||
global.GVA_LOG.Error("参数错误", zap.Error(err))
|
||||
r.FailWithMessage("参数错误"+err.Error(), ctx)
|
||||
return
|
||||
}
|
||||
|
||||
notes, err := hospitalService.GetHospitalNotes(p)
|
||||
|
||||
if err != nil {
|
||||
global.GVA_LOG.Error("获取医院注意事项失败", zap.Error(err))
|
||||
r.FailWithMessage("获取医院注意事项失败"+err.Error(), ctx)
|
||||
return
|
||||
}
|
||||
|
||||
r.OkWithData(notes, ctx)
|
||||
}
|
||||
|
Reference in New Issue
Block a user