Browse Source

Merge pull request #787 from flipped-aurora/update

fix:#786
main
奇淼(piexlmax 3 years ago
committed by GitHub
parent
commit
ed755df9c6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      server/config.yaml
  2. 2
      server/service/system/sys_api.go
  3. 2
      server/service/system/sys_autocode_history.go
  4. 2
      web/src/view/superAdmin/api/api.vue

4
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:

2
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
}

2
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
}

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

Loading…
Cancel
Save