修正返回数据大小写问题
This commit is contained in:
parent
3a99ce1b58
commit
38094bf106
@ -4,8 +4,8 @@ package model
|
||||
type AdminMenuApi struct {
|
||||
MenuId int64 `gorm:"column:menu_id;type:bigint(19);comment:菜单id" json:"menu_id"`
|
||||
ApiId int64 `gorm:"column:api_id;type:bigint(19);comment:接口id" json:"api_id"`
|
||||
Menu AdminMenu `gorm:"foreignkey:MenuId;association_foreignkey:MenuID"`
|
||||
API AdminAPI `gorm:"foreignkey:ApiId;association_foreignkey:APIID"`
|
||||
Menu AdminMenu `gorm:"foreignkey:MenuId;association_foreignkey:MenuID" json:"menu"`
|
||||
API AdminAPI `gorm:"foreignkey:ApiId;association_foreignkey:APIID" json:"api"`
|
||||
}
|
||||
|
||||
func (m *AdminMenuApi) TableName() string {
|
||||
|
||||
@ -4,8 +4,8 @@ package model
|
||||
type AdminRoleMenu struct {
|
||||
RoleID int64 `gorm:"column:role_id;type:bigint(19);primary_key;comment:权限id" json:"role_id"`
|
||||
MenuID int64 `gorm:"column:menu_id;type:bigint(19);primary_key;comment:菜单id" json:"menu_id"`
|
||||
Menu AdminMenu `gorm:"foreignKey:MenuID"`
|
||||
Role AdminRole `gorm:"foreignKey:RoleID"`
|
||||
Menu AdminMenu `gorm:"foreignKey:MenuID" json:"menu"`
|
||||
Role AdminRole `gorm:"foreignKey:RoleID" json:"role"`
|
||||
}
|
||||
|
||||
func (m *AdminRoleMenu) TableName() string {
|
||||
|
||||
@ -20,9 +20,9 @@ type AdminUser struct {
|
||||
PostID int64 `gorm:"column:post_id;type:bigint(19);comment:'岗位id'" json:"post_id"`
|
||||
CreateBy int64 `gorm:"column:create_by;type:bigint(19);comment:'创建者id(用户表id)'" json:"create_by"`
|
||||
UpdateBy int64 `gorm:"column:update_by;type:bigint(19);comment:'更新者id(用户表id)'" json:"update_by"`
|
||||
Role *AdminRole `gorm:"foreignKey:RoleID"` // 角色
|
||||
Dept *AdminDept `gorm:"foreignKey:DeptID"` // 部门
|
||||
Post *AdminPost `gorm:"foreignKey:PostID"` // 岗位
|
||||
Role *AdminRole `gorm:"foreignKey:RoleID" json:"role"` // 角色
|
||||
Dept *AdminDept `gorm:"foreignKey:DeptID" json:"dept"` // 部门
|
||||
Post *AdminPost `gorm:"foreignKey:PostID" json:"post"` // 岗位
|
||||
}
|
||||
|
||||
func (m *AdminUser) TableName() string {
|
||||
|
||||
@ -198,4 +198,23 @@ func privateRouter(r *gin.Engine, api controller.Api) {
|
||||
// 修改岗位
|
||||
postGroup.PUT("/:post_id", api.Post.PutPost)
|
||||
}
|
||||
|
||||
// 医生管理
|
||||
doctorGroup := adminGroup.Group("/doctor")
|
||||
{
|
||||
// 获取医生列表-分页
|
||||
doctorGroup.GET("", api.Post.GetPostPage)
|
||||
|
||||
// 新增医生
|
||||
doctorGroup.POST("", api.Post.AddPost)
|
||||
|
||||
// 医生详情
|
||||
doctorGroup.GET("/:post_id", api.Post.GetPost)
|
||||
|
||||
// 删除医生-批量
|
||||
doctorGroup.DELETE("", api.Post.DeletePost)
|
||||
|
||||
// 修改医生
|
||||
doctorGroup.PUT("/:post_id", api.Post.PutPost)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user