分类管理

dev
truthhun 2 years ago
parent e3675956e4
commit 580d3bc6c1

@ -288,7 +288,8 @@ func (m *DBModel) DeleteUser(ids []int64) (err error) {
}
}()
err = sess.Where("id in (?)", ids).Delete(&User{}).Error
// id==1的用户不允许删除
err = sess.Where("id in (?) and id != ?", ids, 1).Delete(&User{}).Error
if err != nil {
m.logger.Error("DeleteUser", zap.Error(err))
}

@ -114,9 +114,9 @@ export default {
}
},
async created() {
this.initTableListFields()
await this.listGroup()
await this.initSearchForm()
await this.initTableListFields()
await this.listGroup()
await this.listUser()
},
methods: {

Loading…
Cancel
Save