Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
golang_asynctask
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
33abea4a
authored
Apr 27, 2021
by
孙龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
up
parent
21883dde
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
app/dao/crm/sync_comuser.go
app/dao/crm/sync_comuser.go
View file @
33abea4a
...
...
@@ -3,7 +3,6 @@ package crm
import
(
"encoding/json"
"errors"
"fmt"
"github.com/tidwall/gjson"
"golang-asynctask/util/lib"
"net/http"
...
...
@@ -21,7 +20,7 @@ type comUser struct {
func
PushComUserInfoToErp
(
data
string
)
(
err
error
){
pushData
:=
&
comUser
{}
err
=
nil
err
=
json
.
Unmarshal
([]
byte
(
data
),
pushData
)
if
err
!=
nil
{
return
...
...
@@ -44,7 +43,7 @@ func PushComUserInfoToErp(data string) (err error){
header
.
Set
(
"Content-Type"
,
"application/json"
)
push_url
:=
cfg
.
Instance
(
"config"
)
.
GetString
(
"pushErpDomain"
)
response
,
returnData
,
err
:=
lib
.
HttpPOST
(
push_url
,
urlParams
,
0
,
header
,
""
)
fmt
.
Println
(
response
,
string
(
returnData
),
err
)
//
fmt.Println(response,string(returnData),err)
if
err
==
nil
&&
response
.
StatusCode
==
200
{
err_code
:=
gjson
.
Parse
(
string
(
returnData
))
.
Get
(
"errcode"
)
.
Int
()
msg
:=
gjson
.
Parse
(
string
(
returnData
))
.
Get
(
"errmsg"
)
.
String
()
...
...
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