Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-micCenter
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujiebin
hilo-micCenter
Commits
8f7120ca
Commit
8f7120ca
authored
Aug 23, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tencentyun.go
parent
f7119a32
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
tencentyun.go
common/tencentyun/tencentyun.go
+4
-6
No files found.
common/tencentyun/tencentyun.go
View file @
8f7120ca
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment