...
|
...
|
@@ -141,9 +141,10 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC |
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, "新增共创合约异常")
|
|
|
}
|
|
|
|
|
|
// 获取承接人
|
|
|
// 承接人
|
|
|
var undertakers []*domain.Undertaker
|
|
|
for _, undertaker := range createCooperationContractCommand.Undertakers {
|
|
|
// 获取承接人
|
|
|
var undertakerDomain *domain.Undertaker
|
|
|
undertakerUid, err := strconv.ParseInt(undertaker.UserId, 10, 64)
|
|
|
if err != nil {
|
...
|
...
|
@@ -156,6 +157,11 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC |
|
|
undertakerDomain = data
|
|
|
}
|
|
|
|
|
|
// 校验承接人是否属于承接对象
|
|
|
if !utils.IsContain(createCooperationContractCommand.CooperationContractUndertakerTypes, undertakerDomain.UserType) {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "承接人"+undertakerDomain.UserName+"不属于承接对象")
|
|
|
}
|
|
|
|
|
|
// 获取推荐人
|
|
|
var referrerDomain *domain.Referrer
|
|
|
referrerUid, _ := strconv.ParseInt(undertaker.ReferrerId, 10, 64)
|
...
|
...
|
|