|
@@ -2,7 +2,6 @@ package wechat
|
|
|
|
|
|
import (
|
|
import (
|
|
"context"
|
|
"context"
|
|
- "encoding/json"
|
|
|
|
"fmt"
|
|
"fmt"
|
|
"github.com/imroc/req/v3"
|
|
"github.com/imroc/req/v3"
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
"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
|
|
|
|
+ //}
|
|
}
|
|
}
|
|
}
|
|
}
|