作者 tangxuhui

修复程序错误

... ... @@ -45,7 +45,7 @@ func ToCooperationContractItem(param *allied_creation_cooperation.CooperationCon
} else if len(param.MoneyIncentivesRules) > 0 {
data.IncentivesType = "金额激励"
}
return nil
return &data
}
type MoneyIncentivesRule struct {
... ...
... ... @@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"strconv"
"strings"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
... ... @@ -29,7 +30,7 @@ func (gateway HttplibAlliedCreationCooperation) CooperationContractAdd(param Req
return nil, fmt.Errorf("获取创建共创合约失败:%w", err)
}
log.Logger.Debug("获取业务模块请求数据:创建共创合约。", map[string]interface{}{
"result": string(byteResult),
"result": strings.ReplaceAll(string(byteResult), "\n", ""),
})
var result service_gateway.GatewayResponse
err = json.Unmarshal(byteResult, &result)
... ...
... ... @@ -54,7 +54,7 @@ type CooperationContract struct {
MoneyIncentivesRules []MoneyIncentivesRule `json:"moneyIncentivesRules"` // 金额激励规则
Undertakers []struct {
ContractAttachment []domain.Attachment `json:"contractAttachment"`
UserId int `json:"userId"`
UserId int `json:"userId,string"`
UserInfo struct {
UserAvatar string `json:"userAvatar"` // 用户头像
UserEmail string `json:"userEmail"` // 用户邮箱
... ...