|
@@ -63,6 +63,16 @@ namespace WingMongoDBModule.Service
|
|
|
filter = filter & builder.Where(x => x.BelongUserCode == request.UserCode || x.UserCodes.Contains(request.UserCode));
|
|
|
}
|
|
|
var dataList = await _researchProjectDBRepository.FindAllAsync(filter);
|
|
|
+ if (dataList?.Count > 0)
|
|
|
+ {
|
|
|
+ foreach(var item in dataList)
|
|
|
+ {
|
|
|
+ if (!item.UserCodes.Contains(request.UserCode))
|
|
|
+ {
|
|
|
+ ThrowCustomerException(CustomerRpcCode.NotExistCurrentProjectAuthority, "Not exist current project authority");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
return dataList.MappingTo<List<ResearchProjectBaseDTO>>();
|
|
|
}
|
|
|
}
|