正在显示
1 个修改的文件
包含
10 行增加
和
6 行删除
| @@ -13,7 +13,11 @@ import ( | @@ -13,7 +13,11 @@ import ( | ||
| 13 | ) | 13 | ) |
| 14 | 14 | ||
| 15 | const ( | 15 | const ( |
| 16 | - ResponseOk int = 0 | 16 | + ResponseOk string = "0" |
| 17 | +) | ||
| 18 | + | ||
| 19 | +const ( | ||
| 20 | + curPlatformId string = "3" //向企业平台发起请求时 ,机会系统自身对应的id “3” | ||
| 17 | ) | 21 | ) |
| 18 | 22 | ||
| 19 | //请求企业平台的接口 | 23 | //请求企业平台的接口 |
| @@ -71,7 +75,7 @@ func (client BusinessAdminClient) Call(param IBusinessAdminParam) ([]byte, error | @@ -71,7 +75,7 @@ func (client BusinessAdminClient) Call(param IBusinessAdminParam) ([]byte, error | ||
| 71 | } | 75 | } |
| 72 | 76 | ||
| 73 | type CommResponse struct { | 77 | type CommResponse struct { |
| 74 | - Code int `json:"code"` | 78 | + Code string `json:"code"` |
| 75 | Msg string `json:"msg"` | 79 | Msg string `json:"msg"` |
| 76 | } | 80 | } |
| 77 | 81 | ||
| @@ -87,7 +91,7 @@ func (resp CommResponse) IsOK() bool { | @@ -87,7 +91,7 @@ func (resp CommResponse) IsOK() bool { | ||
| 87 | //PlatformId 编号 机会系统固定值18 | 91 | //PlatformId 编号 机会系统固定值18 |
| 88 | type RequestGetuserAuth struct { | 92 | type RequestGetuserAuth struct { |
| 89 | UserId string `json:"userId"` | 93 | UserId string `json:"userId"` |
| 90 | - platformId string `json:"platformId"` | 94 | + PlatformId string `json:"platformId"` |
| 91 | } | 95 | } |
| 92 | 96 | ||
| 93 | type ResponseGetUserAuth struct { | 97 | type ResponseGetUserAuth struct { |
| @@ -98,7 +102,7 @@ type ResponseGetUserAuth struct { | @@ -98,7 +102,7 @@ type ResponseGetUserAuth struct { | ||
| 98 | } | 102 | } |
| 99 | 103 | ||
| 100 | func (r RequestGetuserAuth) Format() []byte { | 104 | func (r RequestGetuserAuth) Format() []byte { |
| 101 | - r.platformId = "3" | 105 | + r.PlatformId = curPlatformId |
| 102 | var bt []byte | 106 | var bt []byte |
| 103 | bt, _ = json.Marshal(r) | 107 | bt, _ = json.Marshal(r) |
| 104 | return bt | 108 | return bt |
| @@ -130,7 +134,7 @@ func GetuserAuthDo(userid int64) (ResponseGetUserAuth, error) { | @@ -130,7 +134,7 @@ func GetuserAuthDo(userid int64) (ResponseGetUserAuth, error) { | ||
| 130 | //RequestGetUserCompany 从企业平台获取用户的公司 | 134 | //RequestGetUserCompany 从企业平台获取用户的公司 |
| 131 | type RequestGetUserCompany struct { | 135 | type RequestGetUserCompany struct { |
| 132 | Phone string `json:"phone"` | 136 | Phone string `json:"phone"` |
| 133 | - platformId string `json:"platformId"` | 137 | + PlatformId string `json:"platformId"` |
| 134 | } | 138 | } |
| 135 | 139 | ||
| 136 | type ResponseGetUserCompany struct { | 140 | type ResponseGetUserCompany struct { |
| @@ -145,7 +149,7 @@ type ResponseGetUserCompany struct { | @@ -145,7 +149,7 @@ type ResponseGetUserCompany struct { | ||
| 145 | } | 149 | } |
| 146 | 150 | ||
| 147 | func (r RequestGetUserCompany) Format() []byte { | 151 | func (r RequestGetUserCompany) Format() []byte { |
| 148 | - r.platformId = "3" | 152 | + r.PlatformId = curPlatformId |
| 149 | var bt []byte | 153 | var bt []byte |
| 150 | bt, _ = json.Marshal(r) | 154 | bt, _ = json.Marshal(r) |
| 151 | return bt | 155 | return bt |
-
请 注册 或 登录 后发表评论