...
|
...
|
@@ -219,3 +219,36 @@ func (srv CooperationProjectService) PersonSearchCooperationProjectShareInfo(pro |
|
|
}
|
|
|
return result, nil
|
|
|
}
|
|
|
|
|
|
// PersonSearchCooperationProject 共创用户获取共创项目列表
|
|
|
func (srv CooperationProjectService) PersonSearchCooperationProjectStarred(projectQuery *command.PersonSearchCooperationProjectQuery) (int, interface{}, error) {
|
|
|
//extQueries := extQuires(projectQuery.Operator)
|
|
|
if projectQuery.Operator.UserBaseId == 0 {
|
|
|
return 0, []struct{}{}, nil
|
|
|
}
|
|
|
creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(projectQuery.Operator)
|
|
|
userInfo, err := creationUserGateway.AuthUserBaseInfo(allied_creation_user.ReqAuthUserBase{
|
|
|
UserBaseId: projectQuery.Operator.UserBaseId,
|
|
|
})
|
|
|
if err != nil {
|
|
|
return 0, nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
|
|
}
|
|
|
if len(userInfo.FavoriteOrg()) == 0 {
|
|
|
return 0, []struct{}{}, nil
|
|
|
}
|
|
|
|
|
|
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
|
|
|
projectQuery.Operator)
|
|
|
result, err := creationCooperationGateway.CooperationProjectsSearch(allied_creation_cooperation.ReqCooperationProjectSearch{
|
|
|
PageNumber: projectQuery.PageNumber + 1, //手机序号从0开始的
|
|
|
PageSize: projectQuery.PageSize,
|
|
|
Status: 1, //搜索状态为“招标中”项目
|
|
|
Keyword: projectQuery.Keyword,
|
|
|
OrgIds: userInfo.FavoriteOrg(),
|
|
|
IsSkipFetchProjectModel: true,
|
|
|
})
|
|
|
if err != nil {
|
|
|
return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
return int(result.Total), result.List, nil
|
|
|
} |
...
|
...
|
|