|
@@ -140,7 +140,7 @@ func (w *WxSafeChange) LabelSafe() error {
|
|
Where(
|
|
Where(
|
|
label.DeletedAtIsNil(),
|
|
label.DeletedAtIsNil(),
|
|
label.HasLabelRelationshipsWith(
|
|
label.HasLabelRelationshipsWith(
|
|
- labelrelationship.DeletedAtIsNil(),
|
|
|
|
|
|
+ //labelrelationship.DeletedAtIsNil(),
|
|
labelrelationship.HasContactsWith(
|
|
labelrelationship.HasContactsWith(
|
|
contact.WxWxidEQ(w.WxId),
|
|
contact.WxWxidEQ(w.WxId),
|
|
),
|
|
),
|
|
@@ -220,7 +220,7 @@ func (w *WxSafeChange) LabelSafe() error {
|
|
// 建立新的标签关系
|
|
// 建立新的标签关系
|
|
labelRelationships, err := w.Tx.LabelRelationship.Query().
|
|
labelRelationships, err := w.Tx.LabelRelationship.Query().
|
|
Where(
|
|
Where(
|
|
- labelrelationship.DeletedAtIsNil(),
|
|
|
|
|
|
+ //labelrelationship.DeletedAtIsNil(),
|
|
labelrelationship.HasContactsWith(
|
|
labelrelationship.HasContactsWith(
|
|
contact.WxWxidEQ(w.WxId),
|
|
contact.WxWxidEQ(w.WxId),
|
|
),
|
|
),
|
|
@@ -245,7 +245,7 @@ func (w *WxSafeChange) LabelSafe() error {
|
|
// 删除旧的标签关系
|
|
// 删除旧的标签关系
|
|
_, err = w.Tx.LabelRelationship.Delete().
|
|
_, err = w.Tx.LabelRelationship.Delete().
|
|
Where(
|
|
Where(
|
|
- labelrelationship.DeletedAtIsNil(),
|
|
|
|
|
|
+ //labelrelationship.DeletedAtIsNil(),
|
|
labelrelationship.HasLabelsWith(
|
|
labelrelationship.HasLabelsWith(
|
|
label.OrganizationIDNEQ(wxinfo.OrganizationID)),
|
|
label.OrganizationIDNEQ(wxinfo.OrganizationID)),
|
|
labelrelationship.HasContactsWith(
|
|
labelrelationship.HasContactsWith(
|