chart_edb_config.go 670 B

123456789101112131415161718192021222324252627
  1. package data
  2. import (
  3. "fmt"
  4. "eta/eta_api/models/data_manage"
  5. )
  6. // BatchAddNoPermissionAdmin 批量添加配置
  7. func BatchAddNoPermissionAdmin(edbInfoIdList []int, adminIdList []int) (err error) {
  8. //_, err = data_manage.GetEdbInfoById(edbInfoId)
  9. //if err != nil {
  10. // if err.Error() == utils.ErrNoRow() {
  11. // errMsg = "找不到该指标"
  12. // }
  13. // return
  14. //}
  15. errMsgList := make([]string, 0)
  16. for _, edbInfoId := range edbInfoIdList {
  17. obj := data_manage.EdbInfoNoPermissionAdmin{}
  18. err = obj.AddByEdbInfoId(edbInfoId, adminIdList)
  19. if err != nil {
  20. errMsgList = append(errMsgList, fmt.Sprint(edbInfoId, "指标添加失败,err:", err))
  21. }
  22. }
  23. return
  24. }