diff --git a/internal/rpc/msg/organization_notification.go b/internal/rpc/msg/organization_notification.go index cfe4222b1..d9dd6fd52 100644 --- a/internal/rpc/msg/organization_notification.go +++ b/internal/rpc/msg/organization_notification.go @@ -28,7 +28,7 @@ func OrganizationNotificationToAll(opUserID string, operationID string) { utils2.UserDBCopyOpenIM(tips.OpUser, user) for _, v := range userIDList { - log.Debug(operationID, opUserID, v, constant.OrganizationChangedNotification, &tips, operationID) + log.Debug(operationID, "OrganizationNotification", opUserID, v, constant.OrganizationChangedNotification, &tips, operationID) OrganizationNotification(opUserID, v, constant.OrganizationChangedNotification, &tips, operationID) } } diff --git a/pkg/common/db/mysql_model/im_mysql_model/organization_model.go b/pkg/common/db/mysql_model/im_mysql_model/organization_model.go index 1bfb02038..c3005fcec 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/organization_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/organization_model.go @@ -186,7 +186,12 @@ func GetDepartmentMemberList(departmentID string) (error, []db.DepartmentMember) return err, nil } var departmentMemberList []db.DepartmentMember - err = dbConn.Table("department_members").Where("department_id=?", departmentID).Find(&departmentMemberList).Error + if departmentID == "-1" { + err = dbConn.Table("department_members").Find(&departmentMemberList).Error + } else { + err = dbConn.Table("department_members").Where("department_id=?", departmentID).Find(&departmentMemberList).Error + } + if err != nil { return err, nil }