From 6b88c9a0045ac2a8b857fb8958870e9e166958c7 Mon Sep 17 00:00:00 2001 From: zhangwenjian Date: Tue, 27 Jul 2021 19:16:47 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix=F0=9F=90=9B:=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=96=87=E6=A1=A3=E6=B3=A8=E9=87=8A=20(#507)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/apis/sys_dept.go | 6 +++--- app/admin/apis/sys_opera_log.go | 2 +- app/admin/apis/sys_role.go | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/admin/apis/sys_dept.go b/app/admin/apis/sys_dept.go index 306e1292..f37eae4b 100644 --- a/app/admin/apis/sys_dept.go +++ b/app/admin/apis/sys_dept.go @@ -87,7 +87,7 @@ func (e SysDept) Get(c *gin.Context) { // @Tags 部门 // @Accept 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": -1, "message": "添加失败"}" // @Router /api/v1/dept [post] @@ -123,7 +123,7 @@ func (e SysDept) Insert(c *gin.Context) { // @Accept application/json // @Product application/json // @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": -1, "message": "添加失败"}" // @Router /api/v1/dept/{deptId} [put] @@ -154,7 +154,7 @@ func (e SysDept) Update(c *gin.Context) { // @Summary 删除部门 // @Description 删除数据 // @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": -1, "message": "删除失败"}" // @Router /api/v1/dept [delete] diff --git a/app/admin/apis/sys_opera_log.go b/app/admin/apis/sys_opera_log.go index 4d8285b6..28039245 100644 --- a/app/admin/apis/sys_opera_log.go +++ b/app/admin/apis/sys_opera_log.go @@ -90,7 +90,7 @@ func (e SysOperaLog) Get(c *gin.Context) { // @Summary 删除操作日志 // @Description 删除数据 // @Tags 操作日志 -// @Param data body dto.SysOperaLogById true "body" +// @Param data body dto.SysOperaLogDeleteReq true "body" // @Success 200 {object} response.Response "{"code": 200, "data": [...]}" // @Router /api/v1/sys-opera-log [delete] // @Security Bearer diff --git a/app/admin/apis/sys_role.go b/app/admin/apis/sys_role.go index 5c9f8af8..7e28a671 100644 --- a/app/admin/apis/sys_role.go +++ b/app/admin/apis/sys_role.go @@ -98,7 +98,7 @@ func (e SysRole) Get(c *gin.Context) { // @Tags 角色/Role // @Accept 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": [...]}" // @Router /api/v1/role [post] // @Security Bearer @@ -142,7 +142,7 @@ func (e SysRole) Insert(c *gin.Context) { // @Tags 角色/Role // @Accept 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": [...]}" // @Router /api/v1/role/{id} [put] // @Security Bearer @@ -180,7 +180,7 @@ func (e SysRole) Update(c *gin.Context) { // @Summary 删除用户角色 // @Description 删除数据 // @Tags 角色/Role -// @Param data body dto.SysRoleById true "body" +// @Param data body dto.SysRoleDeleteReq true "body" // @Success 200 {object} response.Response "{"code": 200, "data": [...]}" // @Router /api/v1/role [delete] // @Security Bearer From 981313c0e285f663c3f478a34df52a521935893a Mon Sep 17 00:00:00 2001 From: zhangwenjian Date: Wed, 28 Jul 2021 08:45:39 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fix=F0=9F=90=9B:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E7=94=A8=E6=88=B7=E6=97=B6=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20(=20#506)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/service/dto/sys_user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/admin/service/dto/sys_user.go b/app/admin/service/dto/sys_user.go index e9b9ecee..51123430 100644 --- a/app/admin/service/dto/sys_user.go +++ b/app/admin/service/dto/sys_user.go @@ -98,7 +98,7 @@ type SysUserInsertReq struct { Avatar string `json:"avatar" comment:"头像"` Sex string `json:"sex" comment:"性别"` 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:"岗位"` Remark string `json:"remark" comment:"备注"` Status string `json:"status" comment:"状态" vd:"len($)>0" default:"1"` From 10491f97454bf8ff6d1d2c2d90875c26d43b360a Mon Sep 17 00:00:00 2001 From: zhangwenjian Date: Wed, 28 Jul 2021 08:53:18 +0800 Subject: [PATCH 3/4] =?UTF-8?q?fix=F0=9F=90=9B:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=83=A8=E9=97=A8=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#510)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/router/sys_dept.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/admin/router/sys_dept.go b/app/admin/router/sys_dept.go index 79d7f8dc..f9393743 100644 --- a/app/admin/router/sys_dept.go +++ b/app/admin/router/sys_dept.go @@ -21,7 +21,7 @@ func registerSysDeptRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddle r.GET("/:id", api.Get) r.POST("", api.Insert) r.PUT("/:id", api.Update) - r.DELETE("/:id", api.Delete) + r.DELETE("", api.Delete) } r1 := v1.Group("").Use(authMiddleware.MiddlewareFunc()) From fd0fa49f1c72fd403e67766ae9ba3afa7bf179bd Mon Sep 17 00:00:00 2001 From: zhangwenjian Date: Wed, 28 Jul 2021 09:06:23 +0800 Subject: [PATCH 4/4] =?UTF-8?q?docs=F0=9F=93=9D:=20=20=E6=9B=B4=E6=96=B02.?= =?UTF-8?q?0.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/global/adm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/global/adm.go b/common/global/adm.go index 96c7c80c..846dc6e5 100644 --- a/common/global/adm.go +++ b/common/global/adm.go @@ -2,7 +2,7 @@ package global const ( // Version go-admin version info - Version = "2.0.1" + Version = "2.0.2" ) var (