Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AD-Control-Golang
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
陶腾飞
AD-Control-Golang
Commits
5a69468d
Commit
5a69468d
authored
Jul 30, 2020
by
陶腾飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v1.5.1 update wxwork
parent
850d3510
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletions
+8
-1
public/env.go
+1
-1
wxwork/wxwork.go
+7
-0
No files found.
public/env.go
View file @
5a69468d
...
@@ -8,7 +8,7 @@ const DaemonListen string = ":" + DaemonPort
...
@@ -8,7 +8,7 @@ const DaemonListen string = ":" + DaemonPort
const
ADServerDaemon
string
=
Host_adserver
+
DaemonListen
const
ADServerDaemon
string
=
Host_adserver
+
DaemonListen
const
WxwrokDaemon
string
=
":16823"
const
WxwrokDaemon
string
=
":16823"
const
RandMax
int
=
60
const
RandMax
int
=
60
const
Version
string
=
"1.5.
0
"
const
Version
string
=
"1.5.
1
"
// user //
// user //
...
...
wxwork/wxwork.go
View file @
5a69468d
...
@@ -52,6 +52,7 @@ func index(w http.ResponseWriter, r *http.Request){
...
@@ -52,6 +52,7 @@ func index(w http.ResponseWriter, r *http.Request){
func
parseHtmlData
(
d
string
,
byteBody
*
[]
byte
)
{
func
parseHtmlData
(
d
string
,
byteBody
*
[]
byte
)
{
var
err
error
var
err
error
// 建立 企业微信 加密方法
// 建立 企业微信 加密方法
wxcpt
:=
wxbizmsgcrypt
.
NewWXBizMsgCrypt
(
pub
.
WxworkTokenMsgSend
,
pub
.
WxworkEncodingAseKey
,
pub
.
WxworkReceiverId
,
wxbizmsgcrypt
.
XmlType
)
wxcpt
:=
wxbizmsgcrypt
.
NewWXBizMsgCrypt
(
pub
.
WxworkTokenMsgSend
,
pub
.
WxworkEncodingAseKey
,
pub
.
WxworkReceiverId
,
wxbizmsgcrypt
.
XmlType
)
...
@@ -81,9 +82,13 @@ func parseHtmlData(d string,byteBody* []byte) {
...
@@ -81,9 +82,13 @@ func parseHtmlData(d string,byteBody* []byte) {
if
len
(
msg
)
==
0
{
if
len
(
msg
)
==
0
{
err
=
pub
.
Error_WXWork_Down
err
=
pub
.
Error_WXWork_Down
}
}
// 解析具体消息
// 解析具体消息
wxmsg
:=
ParseXML
(
&
msg
)
wxmsg
:=
ParseXML
(
&
msg
)
// 打印xml
pub
.
PrintLog
(
msg
)
// 获取 查阅同事的token
// 获取 查阅同事的token
wtBricklayer
,
err
:=
pub
.
GetWXWorkToken
()
wtBricklayer
,
err
:=
pub
.
GetWXWorkToken
()
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -167,6 +172,8 @@ func wxMsgDealEvent(name, userid,eventkey * string) string {
...
@@ -167,6 +172,8 @@ func wxMsgDealEvent(name, userid,eventkey * string) string {
case
pub
.
WXEK_zwDevopsPowerStatus
:
case
pub
.
WXEK_zwDevopsPowerStatus
:
pub
.
SendWxworkTextToAUserWithName
(
*
name
,
*
userid
,
"收到查询指令,正在处理"
)
pub
.
SendWxworkTextToAUserWithName
(
*
name
,
*
userid
,
"收到查询指令,正在处理"
)
result
,
err
=
pub
.
SendServer
(
pub
.
GJwxworkText
(
name
,
userid
,
pub
.
Msg_Wxwork_Status
))
result
,
err
=
pub
.
SendServer
(
pub
.
GJwxworkText
(
name
,
userid
,
pub
.
Msg_Wxwork_Status
))
default
:
return
""
}
}
if
err
!=
nil
{
if
err
!=
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