|
@@ -981,10 +981,10 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
@@ -981,10 +981,10 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
981
|
}
|
981
|
}
|
982
|
|
982
|
|
983
|
// 获取待更新的共创合约
|
983
|
// 获取待更新的共创合约
|
984
|
- cooperationContract, err8 := cooperationContractRepository.FindOne(map[string]interface{}{
|
984
|
+ cooperationContract, err9 := cooperationContractRepository.FindOne(map[string]interface{}{
|
985
|
"cooperationContractId": updateCooperationContractCommand.CooperationContractId,
|
985
|
"cooperationContractId": updateCooperationContractCommand.CooperationContractId,
|
986
|
})
|
986
|
})
|
987
|
- if err8 != nil {
|
987
|
+ if err9 != nil {
|
988
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "共创合约不存在")
|
988
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "共创合约不存在")
|
989
|
}
|
989
|
}
|
990
|
if cooperationContract == nil {
|
990
|
if cooperationContract == nil {
|
|
@@ -992,8 +992,8 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
@@ -992,8 +992,8 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
992
|
}
|
992
|
}
|
993
|
|
993
|
|
994
|
// 更新合约基础信息
|
994
|
// 更新合约基础信息
|
995
|
- if err9 := cooperationContract.Update(tool_funs.SimpleStructToMap(updateCooperationContractCommand)); err9 != nil {
|
|
|
996
|
- return nil, application.ThrowError(application.BUSINESS_ERROR, err9.Error())
|
995
|
+ if err10 := cooperationContract.Update(tool_funs.SimpleStructToMap(updateCooperationContractCommand)); err10 != nil {
|
|
|
996
|
+ return nil, application.ThrowError(application.BUSINESS_ERROR, err10.Error())
|
997
|
}
|
997
|
}
|
998
|
|
998
|
|
999
|
// 更新发起人
|
999
|
// 更新发起人
|
|
@@ -1357,7 +1357,7 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
@@ -1357,7 +1357,7 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
1357
|
var moneyIncentivesRuleOriginal string
|
1357
|
var moneyIncentivesRuleOriginal string
|
1358
|
for _, moneyIncentivesRule := range cooperationContractFound.MoneyIncentivesRules {
|
1358
|
for _, moneyIncentivesRule := range cooperationContractFound.MoneyIncentivesRules {
|
1359
|
moneyIncentivesRuleOriginal = moneyIncentivesRuleOriginal + moneyIncentivesRule.MoneyIncentivesStageCN +
|
1359
|
moneyIncentivesRuleOriginal = moneyIncentivesRuleOriginal + moneyIncentivesRule.MoneyIncentivesStageCN +
|
1360
|
- ":" +
|
1360
|
+ ":" + fmt.Sprint(moneyIncentivesRule.MoneyIncentivesAmount) +
|
1361
|
"," + moneyIncentivesRule.MoneyIncentivesTime.Format("2006-01-02") +
|
1361
|
"," + moneyIncentivesRule.MoneyIncentivesTime.Format("2006-01-02") +
|
1362
|
"," + fmt.Sprint(moneyIncentivesRule.ReferrerPercentage) +
|
1362
|
"," + fmt.Sprint(moneyIncentivesRule.ReferrerPercentage) +
|
1363
|
"," + fmt.Sprint(moneyIncentivesRule.SalesmanPercentage) + ";"
|
1363
|
"," + fmt.Sprint(moneyIncentivesRule.SalesmanPercentage) + ";"
|
|
@@ -1367,7 +1367,7 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
@@ -1367,7 +1367,7 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
1367
|
var moneyIncentivesRuleChanged string
|
1367
|
var moneyIncentivesRuleChanged string
|
1368
|
for _, moneyIncentivesRule := range cooperationContract.MoneyIncentivesRules {
|
1368
|
for _, moneyIncentivesRule := range cooperationContract.MoneyIncentivesRules {
|
1369
|
moneyIncentivesRuleChanged = moneyIncentivesRuleChanged + moneyIncentivesRule.MoneyIncentivesStageCN +
|
1369
|
moneyIncentivesRuleChanged = moneyIncentivesRuleChanged + moneyIncentivesRule.MoneyIncentivesStageCN +
|
1370
|
- ":" +
|
1370
|
+ ":" + fmt.Sprint(moneyIncentivesRule.MoneyIncentivesAmount) +
|
1371
|
"," + moneyIncentivesRule.MoneyIncentivesTime.Format("2006-01-02") +
|
1371
|
"," + moneyIncentivesRule.MoneyIncentivesTime.Format("2006-01-02") +
|
1372
|
"," + fmt.Sprint(moneyIncentivesRule.ReferrerPercentage) +
|
1372
|
"," + fmt.Sprint(moneyIncentivesRule.ReferrerPercentage) +
|
1373
|
"," + fmt.Sprint(moneyIncentivesRule.SalesmanPercentage) + ";"
|
1373
|
"," + fmt.Sprint(moneyIncentivesRule.SalesmanPercentage) + ";"
|