作者 陈志颖

合并分支 'dev' 到 'test'

fix:审核校验



查看合并请求 !7
... ... @@ -178,7 +178,7 @@ func (cooperationApplicationService *CooperationApplicationService) ApplyForCoop
"cooperationProjectNumber": cooperationProject.CooperationProjectNumber,
})
if applicationExist {
return nil, application.ThrowError(application.TRANSACTION_ERROR, "抱歉,您已经申请过该项目")
return nil, application.ThrowError(application.TRANSACTION_ERROR, "当前项目申请已提交")
}
// 校验:判断用户类型是否属于承接对象
... ...
... ... @@ -33,6 +33,8 @@ func (dao *CooperationApplicationDao) CheckApplicationExist(queryOptions map[str
if applicantBaseId, ok := queryOptions["applicantBaseId"]; ok && applicantBaseId.(int64) != 0 {
query = query.Where(`cooperation_application.cooperation_application_applicant @>'{"userBaseId":"?"}'`, applicantBaseId)
}
query.Where("cooperation_application.cooperation_application_status <> 3")
query.Where("cooperation_application.is_canceled <> 2")
ok, err := query.Exists()
return ok, err
}
... ...