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({