Explorar el Código

同步个微时,不同步联系人

boweniac hace 3 semanas
padre
commit
224bd09a07
Se han modificado 1 ficheros con 26 adiciones y 29 borrados
  1. 26 29
      internal/service/wechat/sync_wx.go

+ 26 - 29
internal/service/wechat/sync_wx.go

@@ -2,7 +2,6 @@ package wechat
 
 import (
 	"context"
-	"encoding/json"
 	"fmt"
 	"github.com/imroc/req/v3"
 	"github.com/zeromicro/go-zero/core/logx"
@@ -92,33 +91,31 @@ func SyncAllWx(svcCtx *svc.ServiceContext) {
 			}
 		}
 
-		data := map[string]interface{}{
-			"MsgType": "TriggerFriendPushTask",
-			"Content": map[string]interface{}{
-				"WeChatId": *account.Wechatid,
-			},
-		}
-		//logx.Info("data: ", data)
-		jsonStr, err := json.Marshal(data)
-		err = svcCtx.WechatWs["default"].SendMsg([]byte(jsonStr))
-		if err != nil {
-			logx.Error("syncWx: ", err)
-			continue
-		}
-
-		dataChatroom := map[string]interface{}{
-			"MsgType": "TriggerChatroomPushTask",
-			"Content": map[string]interface{}{
-				"WeChatId": *account.Wechatid,
-				"Flag":     1,
-			},
-		}
-		//logx.Info("dataChatroom: ", dataChatroom)
-		jsonStrChatroom, err := json.Marshal(dataChatroom)
-		err = svcCtx.WechatWs["default"].SendMsg([]byte(jsonStrChatroom))
-		if err != nil {
-			logx.Error("syncWx: ", err)
-			continue
-		}
+		//data := map[string]interface{}{
+		//	"MsgType": "TriggerFriendPushTask",
+		//	"Content": map[string]interface{}{
+		//		"WeChatId": *account.Wechatid,
+		//	},
+		//}
+		//jsonStr, err := json.Marshal(data)
+		//err = svcCtx.WechatWs["default"].SendMsg([]byte(jsonStr))
+		//if err != nil {
+		//	logx.Error("syncWx: ", err)
+		//	continue
+		//}
+		//
+		//dataChatroom := map[string]interface{}{
+		//	"MsgType": "TriggerChatroomPushTask",
+		//	"Content": map[string]interface{}{
+		//		"WeChatId": *account.Wechatid,
+		//		"Flag":     1,
+		//	},
+		//}
+		//jsonStrChatroom, err := json.Marshal(dataChatroom)
+		//err = svcCtx.WechatWs["default"].SendMsg([]byte(jsonStrChatroom))
+		//if err != nil {
+		//	logx.Error("syncWx: ", err)
+		//	continue
+		//}
 	}
 }