作者 tangxuhui

修复数据解析异常

... ... @@ -38,7 +38,7 @@ type CreateCooperationContractCommand struct {
// 分红规则激励百分点
DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"`
// 分红规则激励阶段,
DividendsIncentivesStage int64 `json:"dividendsIncentivesStage,string,"`
DividendsIncentivesStage int `json:"dividendsIncentivesStage,string,"`
// 分红规则激励阶段结束
DividendsIncentivesStageEnd int `json:"dividendsIncentivesStageEnd"`
// 分红规则激励阶段开始
... ...
... ... @@ -40,7 +40,7 @@ type UpdateCooperationContractCommand struct {
// 分红规则激励百分点
DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"`
// 分红规则激励阶段,
DividendsIncentivesStage int64 `json:"dividendsIncentivesStage,string,"`
DividendsIncentivesStage int `json:"dividendsIncentivesStage,string,"`
// 分红规则激励阶段结束
DividendsIncentivesStageEnd int `json:"dividendsIncentivesStageEnd"`
// 分红规则激励阶段开始
... ...
... ... @@ -64,7 +64,7 @@ type DividendsIncentivesRule struct {
ReferrerPercentage float64 `json:"referrerPercentage"` // 推荐人抽成比例
SalesmanPercentage float64 `json:"salesmanPercentage"` // 业务员抽成比例
DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"` // 分红规则激励百分点
DividendsIncentivesStage int64 `json:"dividendsIncentivesStage,string"` // 分红规则激励阶段,
DividendsIncentivesStage int `json:"dividendsIncentivesStage,string"` // 分红规则激励阶段,
DividendsIncentivesStageEnd int64 `json:"dividendsIncentivesStageEnd"` // 分红规则激励阶段结束
DividendsIncentivesStageStart int64 `json:"dividendsIncentivesStageStart"` // 分红规则激励阶段开始
}
... ...
... ... @@ -14,11 +14,11 @@ type CooperationContract struct {
CooperationProjectNumber string `json:"cooperationProjectNumber"`
CooperationContractUndertakerTypes []int `json:"cooperationContractUndertakerType"` // 共创合约承接对象,1员工,2共创用户,3公开
Department struct {
DepartmentId int `json:"departmentId"`
DepartmentId int `json:"departmentId,string"`
DepartmentName string `json:"departmentName"`
} `jsopn:"department" json:"department"` //发起部门
CooperationContractSponsor struct {
UserId int `json:"userId"` //id
UserId int `json:"userId,string"` //id
UserInfo struct {
UserAvatar string `json:"userAvatar"` // 用户头像
UserEmail string `json:"userEmail"` // 用户邮箱
... ... @@ -75,7 +75,7 @@ type CooperationContract struct {
UserName string `json:"userName"`
UserPhone string `json:"userPhone"`
Referrer struct {
UserId int `json:"userId"`
UserId int `json:"userId,string"`
UserInfo struct {
UserAvatar string `json:"userAvatar"` // 用户头像
UserEmail string `json:"userEmail"` // 用户邮箱
... ... @@ -85,7 +85,7 @@ type CooperationContract struct {
} `json:"userInfo"`
} `json:"referrer"`
Salesman struct {
UserId int `json:"userId"`
UserId int `json:"userId,string"`
UserInfo struct {
UserAvatar string `json:"userAvatar"` // 用户头像
UserEmail string `json:"userEmail"` // 用户邮箱
... ... @@ -120,12 +120,12 @@ type CooperationContract struct {
type (
//分红激励规则
DividendsIncentivesRule struct {
DividendsIncentivesRuleId int `json:"dividendsIncentivesRuleId"`
DividendsIncentivesRuleId int `json:"dividendsIncentivesRuleId,string"`
CooperationContractNumber string `json:"cooperationContractNumber"` // 关联的项目合约编号
ReferrerPercentage float64 `json:"referrerPercentage"` // 推荐人抽成比例
SalesmanPercentage float64 `json:"salesmanPercentage"` // 业务员抽成比例
DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"` // 分红规则激励百分点
DividendsIncentivesStage int64 `json:"dividendsIncentivesStage,string,"` // 分红规则激励阶段,
DividendsIncentivesStage int `json:"dividendsIncentivesStage"` // 分红规则激励阶段,
DividendsIncentivesStageEnd time.Time `json:"dividendsIncentivesStageEnd"` // 分红规则激励阶段结束
DividendsIncentivesStageStart time.Time `json:"dividendsIncentivesStageStart"` // 分红规则激励阶段开始
}
... ...
... ... @@ -7,6 +7,7 @@ import (
"time"
"github.com/beego/beego/v2/client/httplib"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
)
type MessageCode struct {
... ... @@ -58,6 +59,8 @@ func (gateway BaseServiceGateway) GetResponseData(result GatewayResponse, data i
}
err := json.Unmarshal(result.Data, data)
if err != nil {
log.Logger.Debug("get GetResponseData:" + string(result.Data))
log.Logger.Debug("get GetResponseData err:" + err.Error())
return err
}
return nil
... ...