6 files changed
+10
-10
No files matched your search
@@ -87,7 +87,7 @@ func (e SysDept) Get(c *gin.Context) {
|
|||||||
// @Tags 部门
|
// @Tags 部门
|
||||||
// @Accept application/json
|
// @Accept application/json
|
||||||
// @Product application/json
|
// @Product application/json
|
||||||
// @Param data body dto.SysDeptControl true "data"
|
// @Param data body dto.SysDeptInsertReq true "data"
|
||||||
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
|
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
|
||||||
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
|
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
|
||||||
// @Router /api/v1/dept [post]
|
// @Router /api/v1/dept [post]
|
||||||
@@ -123,7 +123,7 @@ func (e SysDept) Insert(c *gin.Context) {
|
|||||||
// @Accept application/json
|
// @Accept application/json
|
||||||
// @Product application/json
|
// @Product application/json
|
||||||
// @Param id path int true "id"
|
// @Param id path int true "id"
|
||||||
// @Param data body dto.SysDeptControl true "body"
|
// @Param data body dto.SysDeptUpdateReq true "body"
|
||||||
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
|
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
|
||||||
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
|
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
|
||||||
// @Router /api/v1/dept/{deptId} [put]
|
// @Router /api/v1/dept/{deptId} [put]
|
||||||
@@ -154,7 +154,7 @@ func (e SysDept) Update(c *gin.Context) {
|
|||||||
// @Summary 删除部门
|
// @Summary 删除部门
|
||||||
// @Description 删除数据
|
// @Description 删除数据
|
||||||
// @Tags 部门
|
// @Tags 部门
|
||||||
// @Param data body dto.SysDeptById true "body"
|
// @Param data body dto.SysDeptDeleteReq true "body"
|
||||||
// @Success 200 {string} string "{"code": 200, "message": "删除成功"}"
|
// @Success 200 {string} string "{"code": 200, "message": "删除成功"}"
|
||||||
// @Success 200 {string} string "{"code": -1, "message": "删除失败"}"
|
// @Success 200 {string} string "{"code": -1, "message": "删除失败"}"
|
||||||
// @Router /api/v1/dept [delete]
|
// @Router /api/v1/dept [delete]
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ func (e SysOperaLog) Get(c *gin.Context) {
|
|||||||
// @Summary 删除操作日志
|
// @Summary 删除操作日志
|
||||||
// @Description 删除数据
|
// @Description 删除数据
|
||||||
// @Tags 操作日志
|
// @Tags 操作日志
|
||||||
// @Param data body dto.SysOperaLogById true "body"
|
// @Param data body dto.SysOperaLogDeleteReq true "body"
|
||||||
// @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/sys-opera-log [delete]
|
// @Router /api/v1/sys-opera-log [delete]
|
||||||
// @Security Bearer
|
// @Security Bearer
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ func (e SysRole) Get(c *gin.Context) {
|
|||||||
// @Tags 角色/Role
|
// @Tags 角色/Role
|
||||||
// @Accept application/json
|
// @Accept application/json
|
||||||
// @Product application/json
|
// @Product application/json
|
||||||
// @Param data body dto.SysRoleControl true "data"
|
// @Param data body dto.SysRoleInsertReq true "data"
|
||||||
// @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/role [post]
|
// @Router /api/v1/role [post]
|
||||||
// @Security Bearer
|
// @Security Bearer
|
||||||
@@ -142,7 +142,7 @@ func (e SysRole) Insert(c *gin.Context) {
|
|||||||
// @Tags 角色/Role
|
// @Tags 角色/Role
|
||||||
// @Accept application/json
|
// @Accept application/json
|
||||||
// @Product application/json
|
// @Product application/json
|
||||||
// @Param data body dto.SysRoleControl true "body"
|
// @Param data body dto.SysRoleUpdateReq true "body"
|
||||||
// @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/role/{id} [put]
|
// @Router /api/v1/role/{id} [put]
|
||||||
// @Security Bearer
|
// @Security Bearer
|
||||||
@@ -180,7 +180,7 @@ func (e SysRole) Update(c *gin.Context) {
|
|||||||
// @Summary 删除用户角色
|
// @Summary 删除用户角色
|
||||||
// @Description 删除数据
|
// @Description 删除数据
|
||||||
// @Tags 角色/Role
|
// @Tags 角色/Role
|
||||||
// @Param data body dto.SysRoleById true "body"
|
// @Param data body dto.SysRoleDeleteReq true "body"
|
||||||
// @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/role [delete]
|
// @Router /api/v1/role [delete]
|
||||||
// @Security Bearer
|
// @Security Bearer
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ func registerSysDeptRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddle
|
|||||||
r.GET("/:id", api.Get)
|
r.GET("/:id", api.Get)
|
||||||
r.POST("", api.Insert)
|
r.POST("", api.Insert)
|
||||||
r.PUT("/:id", api.Update)
|
r.PUT("/:id", api.Update)
|
||||||
r.DELETE("/:id", api.Delete)
|
r.DELETE("", api.Delete)
|
||||||
}
|
}
|
||||||
|
|
||||||
r1 := v1.Group("").Use(authMiddleware.MiddlewareFunc())
|
r1 := v1.Group("").Use(authMiddleware.MiddlewareFunc())
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ type SysUserInsertReq struct {
|
|||||||
Avatar string `json:"avatar" comment:"头像"`
|
Avatar string `json:"avatar" comment:"头像"`
|
||||||
Sex string `json:"sex" comment:"性别"`
|
Sex string `json:"sex" comment:"性别"`
|
||||||
Email string `json:"email" comment:"邮箱" vd:"len($)>0,email"`
|
Email string `json:"email" comment:"邮箱" vd:"len($)>0,email"`
|
||||||
DeptId int `json:"deptId" comment:"部门" vd:"len($)>0"`
|
DeptId int `json:"deptId" comment:"部门" vd:"$>0"`
|
||||||
PostId int `json:"postId" comment:"岗位"`
|
PostId int `json:"postId" comment:"岗位"`
|
||||||
Remark string `json:"remark" comment:"备注"`
|
Remark string `json:"remark" comment:"备注"`
|
||||||
Status string `json:"status" comment:"状态" vd:"len($)>0" default:"1"`
|
Status string `json:"status" comment:"状态" vd:"len($)>0" default:"1"`
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package global
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
// Version go-admin version info
|
// Version go-admin version info
|
||||||
Version = "2.0.1"
|
Version = "2.0.2"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
Reference in new issue
Block a user