|
@@ -153,11 +153,14 @@ func (l *GetFriendsAndGroupsLogic) GetFriendsAndGroups(req *types.IDReq) (resp *
|
|
|
if len(newFriendIds) > 0 && len(newLagIds) > 0 {
|
|
|
for id, lags := range newFriendIds {
|
|
|
for _, lag := range lags {
|
|
|
- l.svcCtx.DB.LabelRelationship.Create().
|
|
|
- SetLabelID(wxSysSet[lag]).
|
|
|
- SetContactID(id).
|
|
|
- SetOrganizationID(organizationId).
|
|
|
- Save(l.ctx)
|
|
|
+ label_id := wxSysSet[lag]
|
|
|
+ if label_id != 0 {
|
|
|
+ l.svcCtx.DB.LabelRelationship.Create().
|
|
|
+ SetLabelID(label_id).
|
|
|
+ SetContactID(id).
|
|
|
+ SetOrganizationID(organizationId).
|
|
|
+ Save(l.ctx)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|