This commit is contained in:
苏尹岚
2021-03-23 14:13:57 +08:00
parent 9cba4e483c
commit 2211b15f4c

View File

@@ -2,8 +2,11 @@ package jd
import (
"encoding/json"
"fmt"
"net/url"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/model/dao"
"git.rosy.net.cn/baseapi/platformapi/jdapi"
@@ -117,6 +120,7 @@ func OnTokenChange(values url.Values) {
voc2 := &model.VendorOrgCode{
Comment: voc.Comment,
VendorOrgCode: codeInfo.VenderID,
VendorType: model.VendorOrgTypePlatform,
}
dao.WrapAddIDCULDEntity(voc2, "jxadmin")
if err := dao.CreateEntity(db, voc2); err == nil {
@@ -129,9 +133,12 @@ func OnTokenChange(values url.Values) {
}
} else {
tokenInfo := &JdToken{}
fmt.Println("11111111111111111111", values)
if dataStr := values.Get("token"); dataStr != "" {
json.Unmarshal([]byte(dataStr), &tokenInfo)
}
fmt.Println("11111111111111111111", values.Get("token"))
fmt.Println("11111111111111111111", utils.Format4Output(tokenInfo, false))
if tokenInfo == nil {
return
}