From 5f62e188168d5b7ef15ca225b19211c391e72401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=90=89=E5=85=86?= <303176530@qq.com> Date: Wed, 11 Mar 2020 10:00:18 +0800 Subject: [PATCH 1/7] Update README.md --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7aeedd07..be0b379a 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,12 @@ - +# 开发者(贡献者)列表 + [@piexlmax](https://github.com/piexlmax) 项目发起者 蒋*兆 + [@krank666](https://github.com/krank666) 前端示例作者 尹* + [@1319612909](https://github.com/1319612909) 前端css优化 杜*兰 + [@granty1](https://github.com/granty1) 代码积极贡献者 印*林 + # gin-vue-admin gin+vue开源快速项目模板 更新代码后如果遇到前端报错请执行 npm i 前端开发会不定期增加新的依赖 请注意更新 # 重构记录 From dd941384d03ab1fb61155c23ede5007dabcdd4b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=90=89=E5=85=86?= <303176530@qq.com> Date: Wed, 11 Mar 2020 10:00:59 +0800 Subject: [PATCH 2/7] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index be0b379a..5e8d7d35 100644 --- a/README.md +++ b/README.md @@ -11,10 +11,10 @@ # 开发者(贡献者)列表 - [@piexlmax](https://github.com/piexlmax) 项目发起者 蒋*兆 - [@krank666](https://github.com/krank666) 前端示例作者 尹* - [@1319612909](https://github.com/1319612909) 前端css优化 杜*兰 - [@granty1](https://github.com/granty1) 代码积极贡献者 印*林 + [@piexlmax](https://github.com/piexlmax) 项目发起者 蒋*兆 + [@krank666](https://github.com/krank666) 前端示例作者 尹* + [@1319612909](https://github.com/1319612909) 前端css优化 杜*兰 + [@granty1](https://github.com/granty1) 代码积极贡献者 印*林 # gin-vue-admin gin+vue开源快速项目模板 更新代码后如果遇到前端报错请执行 npm i 前端开发会不定期增加新的依赖 请注意更新 From 597889eb9308ce43a7c67bd2bc0bd6c8e4e928b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=90=89=E5=85=86?= <303176530@qq.com> Date: Wed, 11 Mar 2020 10:05:30 +0800 Subject: [PATCH 3/7] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加开发者列表 感谢 --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5e8d7d35..6ba350c6 100644 --- a/README.md +++ b/README.md @@ -11,10 +11,10 @@ # 开发者(贡献者)列表 - [@piexlmax](https://github.com/piexlmax) 项目发起者 蒋*兆 - [@krank666](https://github.com/krank666) 前端示例作者 尹* - [@1319612909](https://github.com/1319612909) 前端css优化 杜*兰 - [@granty1](https://github.com/granty1) 代码积极贡献者 印*林 +[@piexlmax](https://github.com/piexlmax) 项目发起者 蒋\*兆 +[@krank666](https://github.com/krank666) 前端示例作者 尹\* +[@1319612909](https://github.com/1319612909) 前端css优化 杜\*兰 +[@granty1](https://github.com/granty1) 代码积极贡献者 印\*林 # gin-vue-admin gin+vue开源快速项目模板 更新代码后如果遇到前端报错请执行 npm i 前端开发会不定期增加新的依赖 请注意更新 From db2b40aa65a55401f8139bd887cbf74486a8cd85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=90=89=E5=85=86?= <303176530@qq.com> Date: Wed, 11 Mar 2020 10:09:37 +0800 Subject: [PATCH 4/7] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加代码开发者列表 感谢 --- README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6ba350c6..6492aded 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,14 @@ # 开发者(贡献者)列表 -[@piexlmax](https://github.com/piexlmax) 项目发起者 蒋\*兆 -[@krank666](https://github.com/krank666) 前端示例作者 尹\* -[@1319612909](https://github.com/1319612909) 前端css优化 杜\*兰 -[@granty1](https://github.com/granty1) 代码积极贡献者 印\*林 - + +| 开发者 | 功能 | 姓名 | +| ---- | ---- | ---- | +| [@piexlmax](https://github.com/piexlmax) | 项目发起者 | 蒋\*兆 | +| [@krank666](https://github.com/krank666) | 前端示例作者 | 尹\* | +| [@1319612909](https://github.com/1319612909) | 前端css优化 | 杜\*兰 | +| [@granty1](https://github.com/granty1) | 代码积极贡献者 | 印\*林 | + # gin-vue-admin gin+vue开源快速项目模板 更新代码后如果遇到前端报错请执行 npm i 前端开发会不定期增加新的依赖 请注意更新 # 重构记录 From 8aaa5d8ace62a1cf529d51c5d9db096164844e29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=90=89=E5=85=86?= <303176530@qq.com> Date: Wed, 11 Mar 2020 10:13:02 +0800 Subject: [PATCH 5/7] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加了开发者列表 感谢 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6492aded..fd209742 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ | 开发者 | 功能 | 姓名 | | ---- | ---- | ---- | | [@piexlmax](https://github.com/piexlmax) | 项目发起者 | 蒋\*兆 | -| [@krank666](https://github.com/krank666) | 前端示例作者 | 尹\* | +| [@krank666](https://github.com/krank666) | 前端联合作者 | 尹\* | | [@1319612909](https://github.com/1319612909) | 前端css优化 | 杜\*兰 | | [@granty1](https://github.com/granty1) | 代码积极贡献者 | 印\*林 | From 15d17c7a9ac15255c273a784d51f8131069346f4 Mon Sep 17 00:00:00 2001 From: pixel <303176530@qq.com> Date: Wed, 11 Mar 2020 15:28:44 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E8=A1=A8?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E4=B8=8D=E5=90=8C=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QMPlusServer/model/sysModel/sys_authority.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/QMPlusServer/model/sysModel/sys_authority.go b/QMPlusServer/model/sysModel/sys_authority.go index 50a165e3..8efb96df 100644 --- a/QMPlusServer/model/sysModel/sys_authority.go +++ b/QMPlusServer/model/sysModel/sys_authority.go @@ -27,7 +27,7 @@ func (a *SysAuthority) CreateAuthority() (err error, authority *SysAuthority) { func (a *SysAuthority) DeleteAuthority() (err error) { err = qmsql.DEFAULTDB.Where("authority_id = ?", a.AuthorityId).Find(&SysUser{}).Error if err != nil { - err = qmsql.DEFAULTDB.Where("parentId = ?", a.AuthorityId).Find(&SysAuthority{}).Error + err = qmsql.DEFAULTDB.Where("parent_id = ?", a.AuthorityId).Find(&SysAuthority{}).Error if err != nil { err = qmsql.DEFAULTDB.Where("authority_id = ?", a.AuthorityId).First(a).Unscoped().Delete(a).Error new(CasbinModel).clearCasbin(0, a.AuthorityId) @@ -75,7 +75,7 @@ func (a *SysAuthority) SetDataAuthority() error { return err } -func (a *SysAuthority) GetAuthorityInfo() (err error,sa SysAuthority) { - err = qmsql.DEFAULTDB.Preload("DataAuthorityId").Where("authority_id = ?",a.AuthorityId).First(&sa).Error - return err,sa -} \ No newline at end of file +func (a *SysAuthority) GetAuthorityInfo() (err error, sa SysAuthority) { + err = qmsql.DEFAULTDB.Preload("DataAuthorityId").Where("authority_id = ?", a.AuthorityId).First(&sa).Error + return err, sa +} From 6e3c8bde5137cdac9528fdbac7eba5863623907f Mon Sep 17 00:00:00 2001 From: pixel <303176530@qq.com> Date: Wed, 11 Mar 2020 16:15:26 +0800 Subject: [PATCH 7/7] =?UTF-8?q?shouldBind=20=E4=BF=AE=E6=94=B9=E4=B8=BA=20?= =?UTF-8?q?shouldBindJSON=20=E9=98=B2=E6=AD=A2=E6=B5=8F=E8=A7=88=E5=99=A8a?= =?UTF-8?q?jax=E4=BA=A4=E4=BA=92=E6=97=B6=20content-type=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E5=81=B6=E5=8F=91=E6=80=A7=E4=B8=8D=E5=90=8C=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QMPlusServer/controller/api/exa_fileUploadAndDownload.go | 2 +- QMPlusServer/controller/api/sys_authority.go | 4 ++-- QMPlusServer/controller/api/sys_casbin.go | 4 ++-- QMPlusServer/controller/api/sys_system.go | 4 ++-- QMPlusServer/controller/api/sys_workFlow.go | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/QMPlusServer/controller/api/exa_fileUploadAndDownload.go b/QMPlusServer/controller/api/exa_fileUploadAndDownload.go index 4eaf976a..ff507037 100644 --- a/QMPlusServer/controller/api/exa_fileUploadAndDownload.go +++ b/QMPlusServer/controller/api/exa_fileUploadAndDownload.go @@ -56,7 +56,7 @@ func UploadFile(c *gin.Context) { // @Router /fileUploadAndDownload/deleteFile [post] func DeleteFile(c *gin.Context) { var file dbModel.ExaFileUploadAndDownload - _ = c.ShouldBind(&file) + _ = c.ShouldBindJSON(&file) err, f := file.FindFile() if err != nil { servers.ReportFormat(c, false, fmt.Sprintf("删除失败,%v", err), gin.H{}) diff --git a/QMPlusServer/controller/api/sys_authority.go b/QMPlusServer/controller/api/sys_authority.go index 84272700..d01d0bc0 100644 --- a/QMPlusServer/controller/api/sys_authority.go +++ b/QMPlusServer/controller/api/sys_authority.go @@ -23,7 +23,7 @@ type CreateAuthorityParams struct { // @Router /authority/createAuthority [post] func CreateAuthority(c *gin.Context) { var auth sysModel.SysAuthority - _ = c.ShouldBind(&auth) + _ = c.ShouldBindJSON(&auth) err, authBack := auth.CreateAuthority() if err != nil { servers.ReportFormat(c, false, fmt.Sprintf("创建失败:%v", err), gin.H{ @@ -94,7 +94,7 @@ func GetAuthorityList(c *gin.Context) { // @Router /authority/setDataAuthority [post] func SetDataAuthority(c *gin.Context) { var auth sysModel.SysAuthority - _ = c.ShouldBind(&auth) + _ = c.ShouldBindJSON(&auth) err := auth.SetDataAuthority() if err != nil { servers.ReportFormat(c, false, fmt.Sprintf("设置关联失败,%v", err), gin.H{}) diff --git a/QMPlusServer/controller/api/sys_casbin.go b/QMPlusServer/controller/api/sys_casbin.go index 7f9b8561..e46ee2b4 100644 --- a/QMPlusServer/controller/api/sys_casbin.go +++ b/QMPlusServer/controller/api/sys_casbin.go @@ -17,7 +17,7 @@ import ( // @Router /casbin/casbinPUpdata [post] func CasbinPUpdata(c *gin.Context) { var cmr sysModel.CasbinInReceive - _ = c.ShouldBind(&cmr) + _ = c.ShouldBindJSON(&cmr) err := new(sysModel.CasbinModel).CasbinPUpdata(cmr.AuthorityId, cmr.CasbinInfos) if err != nil { servers.ReportFormat(c, false, fmt.Sprintf("添加规则失败,%v", err), gin.H{}) @@ -36,7 +36,7 @@ func CasbinPUpdata(c *gin.Context) { // @Router /casbin/getPolicyPathByAuthorityId [post] func GetPolicyPathByAuthorityId(c *gin.Context) { var cmr sysModel.CasbinInReceive - _ = c.ShouldBind(&cmr) + _ = c.ShouldBindJSON(&cmr) paths := new(sysModel.CasbinModel).GetPolicyPathByAuthorityId(cmr.AuthorityId) servers.ReportFormat(c, true, "获取规则成功", gin.H{"paths": paths}) } diff --git a/QMPlusServer/controller/api/sys_system.go b/QMPlusServer/controller/api/sys_system.go index 47f02dcc..a34ac51f 100644 --- a/QMPlusServer/controller/api/sys_system.go +++ b/QMPlusServer/controller/api/sys_system.go @@ -31,7 +31,7 @@ func GetSystemConfig(c *gin.Context) { // @Router /system/setSystemConfig [post] func SetSystemConfig(c *gin.Context) { var sys sysModel.System - _ = c.ShouldBind(&sys) + _ = c.ShouldBindJSON(&sys) err := sys.SetSystemConfig() if err != nil { servers.ReportFormat(c, false, fmt.Sprintf("设置失败:%v", err), gin.H{}) @@ -49,7 +49,7 @@ func SetSystemConfig(c *gin.Context) { // @Router /system/ReloadSystem [post] func ReloadSystem(c *gin.Context) { var sys sysModel.System - _ = c.ShouldBind(&sys) + _ = c.ShouldBindJSON(&sys) err := sys.SetSystemConfig() if err != nil { servers.ReportFormat(c, false, fmt.Sprintf("设置失败:%v", err), gin.H{}) diff --git a/QMPlusServer/controller/api/sys_workFlow.go b/QMPlusServer/controller/api/sys_workFlow.go index eed4464a..2eab332e 100644 --- a/QMPlusServer/controller/api/sys_workFlow.go +++ b/QMPlusServer/controller/api/sys_workFlow.go @@ -15,7 +15,7 @@ import ( // @Router /workflow/createWorkFlow [post] func CreateWorkFlow(c *gin.Context) { var wk sysModel.SysWorkflow - _ = c.ShouldBind(&wk) + _ = c.ShouldBindJSON(&wk) err := wk.Create() if err != nil { servers.ReportFormat(c, false, fmt.Sprintf("获取失败:%v", err), gin.H{})