123456789101112131415161718192021222324252627 |
- package data
- import (
- "fmt"
- "hongze/hz_crm_api/models/data_manage"
- )
- // BatchAddNoPermissionAdmin 批量添加配置
- func BatchAddNoPermissionAdmin(edbInfoIdList []int, adminIdList []int) (err error) {
- //_, err = data_manage.GetEdbInfoById(edbInfoId)
- //if err != nil {
- // if err.Error() == utils.ErrNoRow() {
- // errMsg = "找不到该指标"
- // }
- // return
- //}
- errMsgList := make([]string, 0)
- for _, edbInfoId := range edbInfoIdList {
- obj := data_manage.EdbInfoNoPermissionAdmin{}
- err = obj.AddByEdbInfoId(edbInfoId, adminIdList)
- if err != nil {
- errMsgList = append(errMsgList, fmt.Sprint(edbInfoId, "指标添加失败,err:", err))
- }
- }
- return
- }
|