...
|
...
|
@@ -160,10 +160,7 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC |
|
|
|
|
|
// 校验承接人是否属于承接对象,1员工,2共创用户,4公开
|
|
|
if !utils.IsContain(createCooperationContractCommand.CooperationContractUndertakerTypes, 3) {
|
|
|
var userType int32
|
|
|
if undertakerDomain.UserType > 1024 {
|
|
|
userType = undertakerDomain.UserType - 1024
|
|
|
}
|
|
|
userType := undertakerDomain.UserType ^ 1024
|
|
|
if !utils.IsContain(createCooperationContractCommand.CooperationContractUndertakerTypes, userType) {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "承接人"+undertakerDomain.UserName+"不属于承接对象")
|
|
|
}
|
...
|
...
|
@@ -1027,10 +1024,7 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
|
|
|
// 校验:判断用户类型是否属于承接对象
|
|
|
if !utils.IsContain(cooperationContract.CooperationContractUndertakerTypes, 3) { // 非公开类型校验
|
|
|
var userType int32
|
|
|
if undertakerDomain.UserType > 1024 {
|
|
|
userType = undertakerDomain.UserType - 1024
|
|
|
}
|
|
|
userType := undertakerDomain.UserType ^ 1024
|
|
|
if !utils.IsContain(cooperationContract.CooperationContractUndertakerTypes, userType) {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "抱歉,您不属于当前项目的承接对象")
|
|
|
}
|
...
|
...
|
|