...
|
...
|
@@ -981,10 +981,10 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
}
|
|
|
|
|
|
// 获取待更新的共创合约
|
|
|
cooperationContract, err8 := cooperationContractRepository.FindOne(map[string]interface{}{
|
|
|
cooperationContract, err9 := cooperationContractRepository.FindOne(map[string]interface{}{
|
|
|
"cooperationContractId": updateCooperationContractCommand.CooperationContractId,
|
|
|
})
|
|
|
if err8 != nil {
|
|
|
if err9 != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "共创合约不存在")
|
|
|
}
|
|
|
if cooperationContract == nil {
|
...
|
...
|
@@ -992,8 +992,8 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
}
|
|
|
|
|
|
// 更新合约基础信息
|
|
|
if err9 := cooperationContract.Update(tool_funs.SimpleStructToMap(updateCooperationContractCommand)); err9 != nil {
|
|
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err9.Error())
|
|
|
if err10 := cooperationContract.Update(tool_funs.SimpleStructToMap(updateCooperationContractCommand)); err10 != nil {
|
|
|
return nil, application.ThrowError(application.BUSINESS_ERROR, err10.Error())
|
|
|
}
|
|
|
|
|
|
// 更新发起人
|
...
|
...
|
@@ -1357,7 +1357,7 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
var moneyIncentivesRuleOriginal string
|
|
|
for _, moneyIncentivesRule := range cooperationContractFound.MoneyIncentivesRules {
|
|
|
moneyIncentivesRuleOriginal = moneyIncentivesRuleOriginal + moneyIncentivesRule.MoneyIncentivesStageCN +
|
|
|
":" +
|
|
|
":" + fmt.Sprint(moneyIncentivesRule.MoneyIncentivesAmount) +
|
|
|
"," + moneyIncentivesRule.MoneyIncentivesTime.Format("2006-01-02") +
|
|
|
"," + fmt.Sprint(moneyIncentivesRule.ReferrerPercentage) +
|
|
|
"," + fmt.Sprint(moneyIncentivesRule.SalesmanPercentage) + ";"
|
...
|
...
|
@@ -1367,7 +1367,7 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
var moneyIncentivesRuleChanged string
|
|
|
for _, moneyIncentivesRule := range cooperationContract.MoneyIncentivesRules {
|
|
|
moneyIncentivesRuleChanged = moneyIncentivesRuleChanged + moneyIncentivesRule.MoneyIncentivesStageCN +
|
|
|
":" +
|
|
|
":" + fmt.Sprint(moneyIncentivesRule.MoneyIncentivesAmount) +
|
|
|
"," + moneyIncentivesRule.MoneyIncentivesTime.Format("2006-01-02") +
|
|
|
"," + fmt.Sprint(moneyIncentivesRule.ReferrerPercentage) +
|
|
|
"," + fmt.Sprint(moneyIncentivesRule.SalesmanPercentage) + ";"
|
...
|
...
|
|