作者 tangxvhui

bug 修复

... ... @@ -13,7 +13,11 @@ import (
)
const (
ResponseOk int = 0
ResponseOk string = "0"
)
const (
curPlatformId string = "3" //向企业平台发起请求时 ,机会系统自身对应的id “3”
)
//请求企业平台的接口
... ... @@ -71,7 +75,7 @@ func (client BusinessAdminClient) Call(param IBusinessAdminParam) ([]byte, error
}
type CommResponse struct {
Code int `json:"code"`
Code string `json:"code"`
Msg string `json:"msg"`
}
... ... @@ -87,7 +91,7 @@ func (resp CommResponse) IsOK() bool {
//PlatformId 编号 机会系统固定值18
type RequestGetuserAuth struct {
UserId string `json:"userId"`
platformId string `json:"platformId"`
PlatformId string `json:"platformId"`
}
type ResponseGetUserAuth struct {
... ... @@ -98,7 +102,7 @@ type ResponseGetUserAuth struct {
}
func (r RequestGetuserAuth) Format() []byte {
r.platformId = "3"
r.PlatformId = curPlatformId
var bt []byte
bt, _ = json.Marshal(r)
return bt
... ... @@ -130,7 +134,7 @@ func GetuserAuthDo(userid int64) (ResponseGetUserAuth, error) {
//RequestGetUserCompany 从企业平台获取用户的公司
type RequestGetUserCompany struct {
Phone string `json:"phone"`
platformId string `json:"platformId"`
PlatformId string `json:"platformId"`
}
type ResponseGetUserCompany struct {
... ... @@ -145,7 +149,7 @@ type ResponseGetUserCompany struct {
}
func (r RequestGetUserCompany) Format() []byte {
r.platformId = "3"
r.PlatformId = curPlatformId
var bt []byte
bt, _ = json.Marshal(r)
return bt
... ...