作者 tangxuhui

修复程序错误

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