Commit 8f7120ca authored by hujiebin's avatar hujiebin

Update tencentyun.go

parent f7119a32
...@@ -4,14 +4,12 @@ import ( ...@@ -4,14 +4,12 @@ import (
"bytes" "bytes"
"encoding/json" "encoding/json"
"fmt" "fmt"
"hilo-micCenter/common/config"
"io/ioutil" "io/ioutil"
"math/rand" "math/rand"
"net/http" "net/http"
"strconv" "strconv"
"strings" "strings"
"time"
"hilo-micCenter/common/config"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/tencentyun/tls-sig-api-v2-golang/tencentyun" "github.com/tencentyun/tls-sig-api-v2-golang/tencentyun"
...@@ -58,7 +56,7 @@ func SendSystemMsg(logger *logrus.Entry, groupId string, members []string, conte ...@@ -58,7 +56,7 @@ func SendSystemMsg(logger *logrus.Entry, groupId string, members []string, conte
func SendSystemMsgBy(logger *logrus.Entry, txGroupId string, members []string, content string, reqUrl string, getAdminSig func() (string, error), appId int) error { func SendSystemMsgBy(logger *logrus.Entry, txGroupId string, members []string, content string, reqUrl string, getAdminSig func() (string, error), appId int) error {
logger = logger.WithField("appId", appId).WithField("txGroupId", txGroupId) logger = logger.WithField("appId", appId).WithField("txGroupId", txGroupId)
//logger.Infof("SendSystemMsg content: %s", content) //logger.Infof("SendSystemMsg content: %s", content)
beginTime := time.Now() //beginTime := time.Now()
type BodyStruct struct { type BodyStruct struct {
GroupId string GroupId string
...@@ -102,8 +100,8 @@ func SendSystemMsgBy(logger *logrus.Entry, txGroupId string, members []string, c ...@@ -102,8 +100,8 @@ func SendSystemMsgBy(logger *logrus.Entry, txGroupId string, members []string, c
return err return err
} }
endTime := time.Now() //endTime := time.Now()
logger.Infof("SendSystemMsg takes %dms: rsp: %+v", endTime.Sub(beginTime).Milliseconds(), response) //logger.Infof("SendSystemMsg takes %dms: rsp: %+v", endTime.Sub(beginTime).Milliseconds(), response)
if response.ErrorCode == 0 { if response.ErrorCode == 0 {
return nil return nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment