1
This commit is contained in:
@@ -4,14 +4,29 @@ package controller
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"hospital-admin-api/api/dao"
|
||||
"hospital-admin-api/api/requests"
|
||||
"hospital-admin-api/api/responses"
|
||||
"hospital-admin-api/api/responses/hosDepCustomResponse"
|
||||
"hospital-admin-api/global"
|
||||
"hospital-admin-api/utils"
|
||||
)
|
||||
|
||||
type Department struct{}
|
||||
|
||||
// GetDepartmentList 获取自定义科室列表
|
||||
func (b *Department) GetDepartmentList(c *gin.Context) {
|
||||
// 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
|
||||
}
|
||||
|
||||
hospitalDepartmentCustomDao := dao.HospitalDepartmentCustom{}
|
||||
|
||||
maps := make(map[string]interface{})
|
||||
|
||||
Reference in New Issue
Block a user