28 lines
817 B
Go
28 lines
817 B
Go
// Package controller 科室管理
|
|
package controller
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"hospital-admin-api/api/dao"
|
|
"hospital-admin-api/api/responses"
|
|
"hospital-admin-api/api/responses/hosDepCustomResponse"
|
|
)
|
|
|
|
type Department struct{}
|
|
|
|
// GetDepartmentList 获取自定义科室列表
|
|
func (b *Department) GetDepartmentList(c *gin.Context) {
|
|
hospitalDepartmentCustomDao := dao.HospitalDepartmentCustom{}
|
|
|
|
maps := make(map[string]interface{})
|
|
hospitalDepartmentCustom, err := hospitalDepartmentCustomDao.GetHospitalDepartmentCustomList(maps)
|
|
if err != nil {
|
|
responses.FailWithMessage(err.Error(), c)
|
|
return
|
|
}
|
|
|
|
// 处理返回值
|
|
getDepartmentListResponse := hosDepCustomResponse.GetHospitalDepartmentCustomListResponse(hospitalDepartmentCustom)
|
|
responses.OkWithData(getDepartmentListResponse, c)
|
|
}
|