作者 tangxuhui

修复数据解析异常

@@ -38,7 +38,7 @@ type CreateCooperationContractCommand struct { @@ -38,7 +38,7 @@ type CreateCooperationContractCommand struct {
38 // 分红规则激励百分点 38 // 分红规则激励百分点
39 DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"` 39 DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"`
40 // 分红规则激励阶段, 40 // 分红规则激励阶段,
41 - DividendsIncentivesStage int64 `json:"dividendsIncentivesStage,string,"` 41 + DividendsIncentivesStage int `json:"dividendsIncentivesStage,string,"`
42 // 分红规则激励阶段结束 42 // 分红规则激励阶段结束
43 DividendsIncentivesStageEnd int `json:"dividendsIncentivesStageEnd"` 43 DividendsIncentivesStageEnd int `json:"dividendsIncentivesStageEnd"`
44 // 分红规则激励阶段开始 44 // 分红规则激励阶段开始
@@ -40,7 +40,7 @@ type UpdateCooperationContractCommand struct { @@ -40,7 +40,7 @@ type UpdateCooperationContractCommand struct {
40 // 分红规则激励百分点 40 // 分红规则激励百分点
41 DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"` 41 DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"`
42 // 分红规则激励阶段, 42 // 分红规则激励阶段,
43 - DividendsIncentivesStage int64 `json:"dividendsIncentivesStage,string,"` 43 + DividendsIncentivesStage int `json:"dividendsIncentivesStage,string,"`
44 // 分红规则激励阶段结束 44 // 分红规则激励阶段结束
45 DividendsIncentivesStageEnd int `json:"dividendsIncentivesStageEnd"` 45 DividendsIncentivesStageEnd int `json:"dividendsIncentivesStageEnd"`
46 // 分红规则激励阶段开始 46 // 分红规则激励阶段开始
@@ -64,7 +64,7 @@ type DividendsIncentivesRule struct { @@ -64,7 +64,7 @@ type DividendsIncentivesRule struct {
64 ReferrerPercentage float64 `json:"referrerPercentage"` // 推荐人抽成比例 64 ReferrerPercentage float64 `json:"referrerPercentage"` // 推荐人抽成比例
65 SalesmanPercentage float64 `json:"salesmanPercentage"` // 业务员抽成比例 65 SalesmanPercentage float64 `json:"salesmanPercentage"` // 业务员抽成比例
66 DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"` // 分红规则激励百分点 66 DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"` // 分红规则激励百分点
67 - DividendsIncentivesStage int64 `json:"dividendsIncentivesStage,string"` // 分红规则激励阶段, 67 + DividendsIncentivesStage int `json:"dividendsIncentivesStage,string"` // 分红规则激励阶段,
68 DividendsIncentivesStageEnd int64 `json:"dividendsIncentivesStageEnd"` // 分红规则激励阶段结束 68 DividendsIncentivesStageEnd int64 `json:"dividendsIncentivesStageEnd"` // 分红规则激励阶段结束
69 DividendsIncentivesStageStart int64 `json:"dividendsIncentivesStageStart"` // 分红规则激励阶段开始 69 DividendsIncentivesStageStart int64 `json:"dividendsIncentivesStageStart"` // 分红规则激励阶段开始
70 } 70 }
@@ -14,11 +14,11 @@ type CooperationContract struct { @@ -14,11 +14,11 @@ type CooperationContract struct {
14 CooperationProjectNumber string `json:"cooperationProjectNumber"` 14 CooperationProjectNumber string `json:"cooperationProjectNumber"`
15 CooperationContractUndertakerTypes []int `json:"cooperationContractUndertakerType"` // 共创合约承接对象,1员工,2共创用户,3公开 15 CooperationContractUndertakerTypes []int `json:"cooperationContractUndertakerType"` // 共创合约承接对象,1员工,2共创用户,3公开
16 Department struct { 16 Department struct {
17 - DepartmentId int `json:"departmentId"` 17 + DepartmentId int `json:"departmentId,string"`
18 DepartmentName string `json:"departmentName"` 18 DepartmentName string `json:"departmentName"`
19 } `jsopn:"department" json:"department"` //发起部门 19 } `jsopn:"department" json:"department"` //发起部门
20 CooperationContractSponsor struct { 20 CooperationContractSponsor struct {
21 - UserId int `json:"userId"` //id 21 + UserId int `json:"userId,string"` //id
22 UserInfo struct { 22 UserInfo struct {
23 UserAvatar string `json:"userAvatar"` // 用户头像 23 UserAvatar string `json:"userAvatar"` // 用户头像
24 UserEmail string `json:"userEmail"` // 用户邮箱 24 UserEmail string `json:"userEmail"` // 用户邮箱
@@ -75,7 +75,7 @@ type CooperationContract struct { @@ -75,7 +75,7 @@ type CooperationContract struct {
75 UserName string `json:"userName"` 75 UserName string `json:"userName"`
76 UserPhone string `json:"userPhone"` 76 UserPhone string `json:"userPhone"`
77 Referrer struct { 77 Referrer struct {
78 - UserId int `json:"userId"` 78 + UserId int `json:"userId,string"`
79 UserInfo struct { 79 UserInfo struct {
80 UserAvatar string `json:"userAvatar"` // 用户头像 80 UserAvatar string `json:"userAvatar"` // 用户头像
81 UserEmail string `json:"userEmail"` // 用户邮箱 81 UserEmail string `json:"userEmail"` // 用户邮箱
@@ -85,7 +85,7 @@ type CooperationContract struct { @@ -85,7 +85,7 @@ type CooperationContract struct {
85 } `json:"userInfo"` 85 } `json:"userInfo"`
86 } `json:"referrer"` 86 } `json:"referrer"`
87 Salesman struct { 87 Salesman struct {
88 - UserId int `json:"userId"` 88 + UserId int `json:"userId,string"`
89 UserInfo struct { 89 UserInfo struct {
90 UserAvatar string `json:"userAvatar"` // 用户头像 90 UserAvatar string `json:"userAvatar"` // 用户头像
91 UserEmail string `json:"userEmail"` // 用户邮箱 91 UserEmail string `json:"userEmail"` // 用户邮箱
@@ -120,14 +120,14 @@ type CooperationContract struct { @@ -120,14 +120,14 @@ type CooperationContract struct {
120 type ( 120 type (
121 //分红激励规则 121 //分红激励规则
122 DividendsIncentivesRule struct { 122 DividendsIncentivesRule struct {
123 - DividendsIncentivesRuleId int `json:"dividendsIncentivesRuleId"`  
124 - CooperationContractNumber string `json:"cooperationContractNumber"` // 关联的项目合约编号  
125 - ReferrerPercentage float64 `json:"referrerPercentage"` // 推荐人抽成比例  
126 - SalesmanPercentage float64 `json:"salesmanPercentage"` // 业务员抽成比例  
127 - DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"` // 分红规则激励百分点  
128 - DividendsIncentivesStage int64 `json:"dividendsIncentivesStage,string,"` // 分红规则激励阶段,  
129 - DividendsIncentivesStageEnd time.Time `json:"dividendsIncentivesStageEnd"` // 分红规则激励阶段结束  
130 - DividendsIncentivesStageStart time.Time `json:"dividendsIncentivesStageStart"` // 分红规则激励阶段开始 123 + DividendsIncentivesRuleId int `json:"dividendsIncentivesRuleId,string"`
  124 + CooperationContractNumber string `json:"cooperationContractNumber"` // 关联的项目合约编号
  125 + ReferrerPercentage float64 `json:"referrerPercentage"` // 推荐人抽成比例
  126 + SalesmanPercentage float64 `json:"salesmanPercentage"` // 业务员抽成比例
  127 + DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"` // 分红规则激励百分点
  128 + DividendsIncentivesStage int `json:"dividendsIncentivesStage"` // 分红规则激励阶段,
  129 + DividendsIncentivesStageEnd time.Time `json:"dividendsIncentivesStageEnd"` // 分红规则激励阶段结束
  130 + DividendsIncentivesStageStart time.Time `json:"dividendsIncentivesStageStart"` // 分红规则激励阶段开始
131 } 131 }
132 //金额激励规则 132 //金额激励规则
133 MoneyIncentivesRule struct { 133 MoneyIncentivesRule struct {
@@ -7,6 +7,7 @@ import ( @@ -7,6 +7,7 @@ import (
7 "time" 7 "time"
8 8
9 "github.com/beego/beego/v2/client/httplib" 9 "github.com/beego/beego/v2/client/httplib"
  10 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
10 ) 11 )
11 12
12 type MessageCode struct { 13 type MessageCode struct {
@@ -58,6 +59,8 @@ func (gateway BaseServiceGateway) GetResponseData(result GatewayResponse, data i @@ -58,6 +59,8 @@ func (gateway BaseServiceGateway) GetResponseData(result GatewayResponse, data i
58 } 59 }
59 err := json.Unmarshal(result.Data, data) 60 err := json.Unmarshal(result.Data, data)
60 if err != nil { 61 if err != nil {
  62 + log.Logger.Debug("get GetResponseData:" + string(result.Data))
  63 + log.Logger.Debug("get GetResponseData err:" + err.Error())
61 return err 64 return err
62 } 65 }
63 return nil 66 return nil