|
@@ -94,7 +94,12 @@ func (l *GetFriendsAndGroupsLogic) GetFriendsAndGroups(req *types.IDReq) (resp *
|
|
wxLagIdsSet[wxLagId.Id] = wxLagId.Name
|
|
wxLagIdsSet[wxLagId.Id] = wxLagId.Name
|
|
}
|
|
}
|
|
for lagId := range newLagIds {
|
|
for lagId := range newLagIds {
|
|
|
|
+ if lagId == "" {
|
|
|
|
+ continue
|
|
|
|
+ }
|
|
|
|
+ l.Logger.Errorf("------------------------lagId--------------------------- %+v", lagId)
|
|
name := wxLagIdsSet[lagId]
|
|
name := wxLagIdsSet[lagId]
|
|
|
|
+ l.Logger.Errorf("------------------------name--------------------------- %+v", name)
|
|
label, err := l.svcCtx.DB.Label.Query().
|
|
label, err := l.svcCtx.DB.Label.Query().
|
|
Where(
|
|
Where(
|
|
label.NameEQ(name), // Filter by ID
|
|
label.NameEQ(name), // Filter by ID
|
|
@@ -102,6 +107,7 @@ func (l *GetFriendsAndGroupsLogic) GetFriendsAndGroups(req *types.IDReq) (resp *
|
|
label.OrganizationID(organizationId), // Additional filter by organizationId
|
|
label.OrganizationID(organizationId), // Additional filter by organizationId
|
|
).
|
|
).
|
|
Only(l.ctx)
|
|
Only(l.ctx)
|
|
|
|
+ l.Logger.Errorf("------------------------err--------------------------- %+v", err)
|
|
if err != nil {
|
|
if err != nil {
|
|
// 如果标签不存在则创建
|
|
// 如果标签不存在则创建
|
|
newLabel, err := l.svcCtx.DB.Label.Create().
|
|
newLabel, err := l.svcCtx.DB.Label.Create().
|