32 lines
932 B
Go
32 lines
932 B
Go
// Package controller 科室管理
|
|
package controller
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"hospital-admin-api/api/requests"
|
|
"hospital-admin-api/api/responses"
|
|
"hospital-admin-api/global"
|
|
"hospital-admin-api/utils"
|
|
)
|
|
|
|
type Department struct{}
|
|
|
|
// GetDepartmentCustomList 获取自定义科室列表
|
|
func (b *Department) GetDepartmentCustomList(c *gin.Context) {
|
|
departmentRequest := requests.DepartmentRequest{}
|
|
if err := c.ShouldBindJSON(&departmentRequest.GetDepartmentCustomList); err != nil {
|
|
responses.FailWithMessage(err.Error(), c)
|
|
return
|
|
}
|
|
|
|
// 参数验证
|
|
if err := global.Validate.Struct(departmentRequest.GetDepartmentCustomList); err != nil {
|
|
responses.FailWithMessage(utils.Translate(err), c)
|
|
return
|
|
}
|
|
|
|
// 处理返回值
|
|
// getDepartmentListResponse := hosDepCustomResponse.GetHospitalDepartmentCustomListResponse(hospitalDepartmentCustom)
|
|
// responses.OkWithData(getDepartmentListResponse, c)
|
|
}
|