From cf249a0e079aa38bcab89f387f5d79c9d2349cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=90=89=E5=85=86?= <303176530@qq.com> Date: Fri, 29 Oct 2021 21:52:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=AD=E7=9A=84mysql=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/config.yaml b/server/config.yaml index c47658c5..119e69c9 100644 --- a/server/config.yaml +++ b/server/config.yaml @@ -65,8 +65,8 @@ mysql: password: '' max-idle-conns: 10 max-open-conns: 100 - log-mode: false - log-zap: "" + log-mode: "" + log-zap: false # local configuration local: From 53f0e83687b3a8636b2271b9ebffbca2f6c2b02d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=90=89=E5=85=86?= <303176530@qq.com> Date: Thu, 4 Nov 2021 22:20:02 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:#786=20=E4=BF=AE=E5=A4=8D=EF=BC=9A?= =?UTF-8?q?=E7=94=9F=E6=88=90=E8=A1=A8=E5=90=8E=E6=97=A0=E6=B3=95=E5=9B=9E?= =?UTF-8?q?=E6=BB=9A=E7=9A=84bug=20=E4=BF=AE=E5=A4=8D=EF=BC=9Aapi=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=B8=8D=E8=83=BD=E5=A4=9A=E5=88=A0=E9=99=A4=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/service/system/sys_api.go | 2 +- server/service/system/sys_autocode_history.go | 2 +- web/src/view/superAdmin/api/api.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/service/system/sys_api.go b/server/service/system/sys_api.go index 7234a470..1d3a8364 100644 --- a/server/service/system/sys_api.go +++ b/server/service/system/sys_api.go @@ -149,5 +149,5 @@ func (apiService *ApiService) DeleteApisByIds(ids request.IdsReq) (err error) { } func (apiService *ApiService) DeleteApiByIds(ids []string) (err error) { - return global.GVA_DB.Delete(system.SysApi{}, ids).Error + return global.GVA_DB.Delete(&system.SysApi{}, "id in ?", ids).Error } diff --git a/server/service/system/sys_autocode_history.go b/server/service/system/sys_autocode_history.go index 2e163e6f..e338eaf2 100644 --- a/server/service/system/sys_autocode_history.go +++ b/server/service/system/sys_autocode_history.go @@ -125,5 +125,5 @@ func (autoCodeHistoryService *AutoCodeHistoryService) GetSysHistoryPage(info req // DeletePage 删除历史数据 func (autoCodeHistoryService *AutoCodeHistoryService) DeletePage(id uint) error { - return global.GVA_DB.Delete(system.SysAutoCodeHistory{}, id).Error + return global.GVA_DB.Delete(&system.SysAutoCodeHistory{}, id).Error } diff --git a/web/src/view/superAdmin/api/api.vue b/web/src/view/superAdmin/api/api.vue index 675dfc50..3bccfb5f 100644 --- a/web/src/view/superAdmin/api/api.vue +++ b/web/src/view/superAdmin/api/api.vue @@ -211,7 +211,7 @@ export default { this.apis = val }, async onDelete() { - const ids = this.apis.forEach(item => item.ID) + const ids = this.apis.map(item => item.ID) const res = await deleteApisByIds({ ids }) if (res.code === 0) { this.$message({