update
This commit is contained in:
488
docs/model.ndm2
488
docs/model.ndm2
@@ -13840,290 +13840,6 @@
|
||||
"dataCompressions": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"objectType": "Table_MSSQL",
|
||||
"name": "ProductsService",
|
||||
"comment": "سرویس های توکن Otp",
|
||||
"owner": "",
|
||||
"isChangeTracking": false,
|
||||
"isTrackColumnsUpdated": false,
|
||||
"oldName": "ProductsService",
|
||||
"isSystemTable": false,
|
||||
"createTime": "",
|
||||
"modifyTime": "",
|
||||
"objectID": 3023,
|
||||
"numberOfRows": 0,
|
||||
"identityCurrent": 0,
|
||||
"dataLength": 0,
|
||||
"indexLength": 0,
|
||||
"fields": [
|
||||
{
|
||||
"objectType": "TableField_MSSQL",
|
||||
"name": "GetProducts",
|
||||
"type": "GetOneQuery",
|
||||
"size": 0,
|
||||
"isNullable": "Yes",
|
||||
"scale": 0,
|
||||
"comment": "واکشی یک توکن Otp",
|
||||
"computedExpression": "",
|
||||
"defaultValue": "",
|
||||
"defaultValueType": "None",
|
||||
"schema": "",
|
||||
"userDefinedType": "",
|
||||
"collate": "",
|
||||
"isWithValues": false,
|
||||
"isFilestream": false,
|
||||
"isColumnSet": false,
|
||||
"isPersisted": false,
|
||||
"isSparse": false,
|
||||
"isRowGUIDColumn": false,
|
||||
"oldName": "GetProducts",
|
||||
"computedBaseType": "",
|
||||
"isDefaultConstraint": false,
|
||||
"defaultConstraint": "",
|
||||
"isIdentity": false,
|
||||
"isExistingField": false,
|
||||
"identitySeed": 0,
|
||||
"identityIncrement": 0,
|
||||
"identityIsNotForReplication": false
|
||||
},
|
||||
{
|
||||
"objectType": "TableField_MSSQL",
|
||||
"name": "GetAllProductsByFilter",
|
||||
"type": "GetAllByFilterQuery",
|
||||
"size": 0,
|
||||
"isNullable": "Yes",
|
||||
"scale": 0,
|
||||
"comment": "واکشی توکن Otp ها بر مبنای فیلتر",
|
||||
"computedExpression": "",
|
||||
"defaultValue": "",
|
||||
"defaultValueType": "Others",
|
||||
"schema": "",
|
||||
"userDefinedType": "",
|
||||
"collate": "",
|
||||
"isWithValues": false,
|
||||
"isFilestream": false,
|
||||
"isColumnSet": false,
|
||||
"isPersisted": false,
|
||||
"isSparse": false,
|
||||
"isRowGUIDColumn": false,
|
||||
"oldName": "GetAllProductsByFilter",
|
||||
"computedBaseType": "",
|
||||
"isDefaultConstraint": false,
|
||||
"defaultConstraint": "",
|
||||
"isIdentity": false,
|
||||
"isExistingField": false,
|
||||
"identitySeed": 0,
|
||||
"identityIncrement": 0,
|
||||
"identityIsNotForReplication": false
|
||||
}
|
||||
],
|
||||
"indexes": [],
|
||||
"primaryKey": {
|
||||
"objectType": "PrimaryKey_MSSQL",
|
||||
"name": "_copy_25",
|
||||
"fields": [],
|
||||
"fillFactor": 0,
|
||||
"oldName": "",
|
||||
"isClustered": true,
|
||||
"isPadded": false,
|
||||
"noRecomputeStatistics": false,
|
||||
"ignoreDuplicatedKeyValues": false,
|
||||
"allowRowLocks": true,
|
||||
"allowPageLocks": true,
|
||||
"storage": {
|
||||
"objectType": "Storage_MSSQL",
|
||||
"name": "",
|
||||
"oldName": "",
|
||||
"storageType": "Default",
|
||||
"filegroup": "",
|
||||
"textImageFilegroup": "",
|
||||
"filestreamFilegroup": "",
|
||||
"partitionScheme": "",
|
||||
"partitionColumn": "",
|
||||
"filestreamPartitionScheme": "",
|
||||
"dataCompressions": []
|
||||
}
|
||||
},
|
||||
"foreignKeys": [
|
||||
{
|
||||
"objectType": "ForeignKey_MSSQL",
|
||||
"name": "fk_ProductsService_CreateNewProductsRequest_1",
|
||||
"fields": [
|
||||
"CreateNewProducts"
|
||||
],
|
||||
"referencedSchema": "CMS",
|
||||
"referencedTable": "CreateNewProductsRequest",
|
||||
"referencedFields": [
|
||||
"Title"
|
||||
],
|
||||
"onDelete": "",
|
||||
"onUpdate": "",
|
||||
"isNotForReplication": false,
|
||||
"isEnabled": false,
|
||||
"comment": "",
|
||||
"sourceCardinality": "NoneRelationship",
|
||||
"targetCardinality": "NoneRelationship",
|
||||
"oldName": ""
|
||||
},
|
||||
{
|
||||
"objectType": "ForeignKey_MSSQL",
|
||||
"name": "fk_ProductsService_CreateNewProductsResponse_1",
|
||||
"fields": [
|
||||
"CreateNewProducts"
|
||||
],
|
||||
"referencedSchema": "CMS",
|
||||
"referencedTable": "CreateNewProductsResponse",
|
||||
"referencedFields": [
|
||||
"Id"
|
||||
],
|
||||
"onDelete": "",
|
||||
"onUpdate": "",
|
||||
"isNotForReplication": false,
|
||||
"isEnabled": false,
|
||||
"comment": "",
|
||||
"sourceCardinality": "NoneRelationship",
|
||||
"targetCardinality": "NoneRelationship",
|
||||
"oldName": ""
|
||||
},
|
||||
{
|
||||
"objectType": "ForeignKey_MSSQL",
|
||||
"name": "fk_ProductsService_UpdateProductsRequest_1",
|
||||
"fields": [
|
||||
"UpdateProducts"
|
||||
],
|
||||
"referencedSchema": "CMS",
|
||||
"referencedTable": "UpdateProductsRequest",
|
||||
"referencedFields": [
|
||||
"Id"
|
||||
],
|
||||
"onDelete": "",
|
||||
"onUpdate": "",
|
||||
"isNotForReplication": false,
|
||||
"isEnabled": false,
|
||||
"comment": "",
|
||||
"sourceCardinality": "NoneRelationship",
|
||||
"targetCardinality": "NoneRelationship",
|
||||
"oldName": ""
|
||||
},
|
||||
{
|
||||
"objectType": "ForeignKey_MSSQL",
|
||||
"name": "fk_ProductsService_DeleteProductsRequest_1",
|
||||
"fields": [
|
||||
"DeleteProducts"
|
||||
],
|
||||
"referencedSchema": "CMS",
|
||||
"referencedTable": "DeleteProductsRequest",
|
||||
"referencedFields": [
|
||||
"Id"
|
||||
],
|
||||
"onDelete": "",
|
||||
"onUpdate": "",
|
||||
"isNotForReplication": false,
|
||||
"isEnabled": false,
|
||||
"comment": "",
|
||||
"sourceCardinality": "NoneRelationship",
|
||||
"targetCardinality": "NoneRelationship",
|
||||
"oldName": ""
|
||||
},
|
||||
{
|
||||
"objectType": "ForeignKey_MSSQL",
|
||||
"name": "fk_ProductsService_GetProductsResponse_1",
|
||||
"fields": [
|
||||
"GetProducts"
|
||||
],
|
||||
"referencedSchema": "FrontOffice",
|
||||
"referencedTable": "GetProductsResponse",
|
||||
"referencedFields": [
|
||||
"Id"
|
||||
],
|
||||
"onDelete": "",
|
||||
"onUpdate": "",
|
||||
"isNotForReplication": false,
|
||||
"isEnabled": true,
|
||||
"comment": "",
|
||||
"sourceCardinality": "NoneRelationship",
|
||||
"targetCardinality": "NoneRelationship",
|
||||
"oldName": ""
|
||||
},
|
||||
{
|
||||
"objectType": "ForeignKey_MSSQL",
|
||||
"name": "fk_ProductsService_GetProductsRequest_1",
|
||||
"fields": [
|
||||
"GetProducts"
|
||||
],
|
||||
"referencedSchema": "FrontOffice",
|
||||
"referencedTable": "GetProductsRequest",
|
||||
"referencedFields": [
|
||||
"Id"
|
||||
],
|
||||
"onDelete": "",
|
||||
"onUpdate": "",
|
||||
"isNotForReplication": false,
|
||||
"isEnabled": true,
|
||||
"comment": "",
|
||||
"sourceCardinality": "NoneRelationship",
|
||||
"targetCardinality": "NoneRelationship",
|
||||
"oldName": ""
|
||||
},
|
||||
{
|
||||
"objectType": "ForeignKey_MSSQL",
|
||||
"name": "fk_ProductsService_GetAllProductsByFilterResponse_1",
|
||||
"fields": [
|
||||
"GetAllProductsByFilter"
|
||||
],
|
||||
"referencedSchema": "FrontOffice",
|
||||
"referencedTable": "GetAllProductsByFilterResponse",
|
||||
"referencedFields": [
|
||||
"MetaData"
|
||||
],
|
||||
"onDelete": "",
|
||||
"onUpdate": "",
|
||||
"isNotForReplication": false,
|
||||
"isEnabled": true,
|
||||
"comment": "",
|
||||
"sourceCardinality": "NoneRelationship",
|
||||
"targetCardinality": "NoneRelationship",
|
||||
"oldName": ""
|
||||
},
|
||||
{
|
||||
"objectType": "ForeignKey_MSSQL",
|
||||
"name": "fk_ProductsService_GetAllProductsByFilterRequest_1",
|
||||
"fields": [
|
||||
"GetAllProductsByFilter"
|
||||
],
|
||||
"referencedSchema": "FrontOffice",
|
||||
"referencedTable": "GetAllProductsByFilterRequest",
|
||||
"referencedFields": [
|
||||
"PaginationState"
|
||||
],
|
||||
"onDelete": "",
|
||||
"onUpdate": "",
|
||||
"isNotForReplication": false,
|
||||
"isEnabled": true,
|
||||
"comment": "",
|
||||
"sourceCardinality": "NoneRelationship",
|
||||
"targetCardinality": "NoneRelationship",
|
||||
"oldName": ""
|
||||
}
|
||||
],
|
||||
"uniques": [],
|
||||
"checks": [],
|
||||
"triggers": [],
|
||||
"storage": {
|
||||
"objectType": "Storage_MSSQL",
|
||||
"name": "",
|
||||
"oldName": "",
|
||||
"storageType": "Default",
|
||||
"filegroup": "",
|
||||
"textImageFilegroup": "",
|
||||
"filestreamFilegroup": "",
|
||||
"partitionScheme": "",
|
||||
"partitionColumn": "",
|
||||
"filestreamPartitionScheme": "",
|
||||
"dataCompressions": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"objectType": "Table_MSSQL",
|
||||
"name": "GetProductsResponse",
|
||||
@@ -15739,6 +15455,210 @@
|
||||
"filestreamPartitionScheme": "",
|
||||
"dataCompressions": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"objectType": "Table_MSSQL",
|
||||
"name": "ProductsService",
|
||||
"comment": "سرویس محصولات ",
|
||||
"owner": "",
|
||||
"isChangeTracking": false,
|
||||
"isTrackColumnsUpdated": false,
|
||||
"oldName": "ProductsService",
|
||||
"isSystemTable": false,
|
||||
"createTime": "",
|
||||
"modifyTime": "",
|
||||
"objectID": 3023,
|
||||
"numberOfRows": 0,
|
||||
"identityCurrent": 0,
|
||||
"dataLength": 0,
|
||||
"indexLength": 0,
|
||||
"fields": [
|
||||
{
|
||||
"objectType": "TableField_MSSQL",
|
||||
"name": "GetProducts",
|
||||
"type": "GetOneQuery",
|
||||
"size": 0,
|
||||
"isNullable": "Yes",
|
||||
"scale": 0,
|
||||
"comment": "واکشی یک توکن Otp",
|
||||
"computedExpression": "",
|
||||
"defaultValue": "",
|
||||
"defaultValueType": "None",
|
||||
"schema": "",
|
||||
"userDefinedType": "",
|
||||
"collate": "",
|
||||
"isWithValues": false,
|
||||
"isFilestream": false,
|
||||
"isColumnSet": false,
|
||||
"isPersisted": false,
|
||||
"isSparse": false,
|
||||
"isRowGUIDColumn": false,
|
||||
"oldName": "GetProducts",
|
||||
"computedBaseType": "",
|
||||
"isDefaultConstraint": false,
|
||||
"defaultConstraint": "",
|
||||
"isIdentity": false,
|
||||
"isExistingField": false,
|
||||
"identitySeed": 0,
|
||||
"identityIncrement": 0,
|
||||
"identityIsNotForReplication": false
|
||||
},
|
||||
{
|
||||
"objectType": "TableField_MSSQL",
|
||||
"name": "GetAllProductsByFilter",
|
||||
"type": "GetAllByFilterQuery",
|
||||
"size": 0,
|
||||
"isNullable": "Yes",
|
||||
"scale": 0,
|
||||
"comment": "واکشی توکن Otp ها بر مبنای فیلتر",
|
||||
"computedExpression": "",
|
||||
"defaultValue": "",
|
||||
"defaultValueType": "Others",
|
||||
"schema": "",
|
||||
"userDefinedType": "",
|
||||
"collate": "",
|
||||
"isWithValues": false,
|
||||
"isFilestream": false,
|
||||
"isColumnSet": false,
|
||||
"isPersisted": false,
|
||||
"isSparse": false,
|
||||
"isRowGUIDColumn": false,
|
||||
"oldName": "GetAllProductsByFilter",
|
||||
"computedBaseType": "",
|
||||
"isDefaultConstraint": false,
|
||||
"defaultConstraint": "",
|
||||
"isIdentity": false,
|
||||
"isExistingField": false,
|
||||
"identitySeed": 0,
|
||||
"identityIncrement": 0,
|
||||
"identityIsNotForReplication": false
|
||||
}
|
||||
],
|
||||
"indexes": [],
|
||||
"primaryKey": {
|
||||
"objectType": "PrimaryKey_MSSQL",
|
||||
"name": "_copy_25",
|
||||
"fields": [],
|
||||
"fillFactor": 0,
|
||||
"oldName": "",
|
||||
"isClustered": true,
|
||||
"isPadded": false,
|
||||
"noRecomputeStatistics": false,
|
||||
"ignoreDuplicatedKeyValues": false,
|
||||
"allowRowLocks": true,
|
||||
"allowPageLocks": true,
|
||||
"storage": {
|
||||
"objectType": "Storage_MSSQL",
|
||||
"name": "",
|
||||
"oldName": "",
|
||||
"storageType": "Default",
|
||||
"filegroup": "",
|
||||
"textImageFilegroup": "",
|
||||
"filestreamFilegroup": "",
|
||||
"partitionScheme": "",
|
||||
"partitionColumn": "",
|
||||
"filestreamPartitionScheme": "",
|
||||
"dataCompressions": []
|
||||
}
|
||||
},
|
||||
"foreignKeys": [
|
||||
{
|
||||
"objectType": "ForeignKey_MSSQL",
|
||||
"name": "fk_ProductsService_GetProductsResponse_1",
|
||||
"fields": [
|
||||
"GetProducts"
|
||||
],
|
||||
"referencedSchema": "FrontOffice",
|
||||
"referencedTable": "GetProductsResponse",
|
||||
"referencedFields": [
|
||||
"Id"
|
||||
],
|
||||
"onDelete": "",
|
||||
"onUpdate": "",
|
||||
"isNotForReplication": false,
|
||||
"isEnabled": true,
|
||||
"comment": "",
|
||||
"sourceCardinality": "NoneRelationship",
|
||||
"targetCardinality": "NoneRelationship",
|
||||
"oldName": ""
|
||||
},
|
||||
{
|
||||
"objectType": "ForeignKey_MSSQL",
|
||||
"name": "fk_ProductsService_GetProductsRequest_1",
|
||||
"fields": [
|
||||
"GetProducts"
|
||||
],
|
||||
"referencedSchema": "FrontOffice",
|
||||
"referencedTable": "GetProductsRequest",
|
||||
"referencedFields": [
|
||||
"Id"
|
||||
],
|
||||
"onDelete": "",
|
||||
"onUpdate": "",
|
||||
"isNotForReplication": false,
|
||||
"isEnabled": true,
|
||||
"comment": "",
|
||||
"sourceCardinality": "NoneRelationship",
|
||||
"targetCardinality": "NoneRelationship",
|
||||
"oldName": ""
|
||||
},
|
||||
{
|
||||
"objectType": "ForeignKey_MSSQL",
|
||||
"name": "fk_ProductsService_GetAllProductsByFilterResponse_1",
|
||||
"fields": [
|
||||
"GetAllProductsByFilter"
|
||||
],
|
||||
"referencedSchema": "FrontOffice",
|
||||
"referencedTable": "GetAllProductsByFilterResponse",
|
||||
"referencedFields": [
|
||||
"MetaData"
|
||||
],
|
||||
"onDelete": "",
|
||||
"onUpdate": "",
|
||||
"isNotForReplication": false,
|
||||
"isEnabled": true,
|
||||
"comment": "",
|
||||
"sourceCardinality": "NoneRelationship",
|
||||
"targetCardinality": "NoneRelationship",
|
||||
"oldName": ""
|
||||
},
|
||||
{
|
||||
"objectType": "ForeignKey_MSSQL",
|
||||
"name": "fk_ProductsService_GetAllProductsByFilterRequest_1",
|
||||
"fields": [
|
||||
"GetAllProductsByFilter"
|
||||
],
|
||||
"referencedSchema": "FrontOffice",
|
||||
"referencedTable": "GetAllProductsByFilterRequest",
|
||||
"referencedFields": [
|
||||
"PaginationState"
|
||||
],
|
||||
"onDelete": "",
|
||||
"onUpdate": "",
|
||||
"isNotForReplication": false,
|
||||
"isEnabled": true,
|
||||
"comment": "",
|
||||
"sourceCardinality": "NoneRelationship",
|
||||
"targetCardinality": "NoneRelationship",
|
||||
"oldName": ""
|
||||
}
|
||||
],
|
||||
"uniques": [],
|
||||
"checks": [],
|
||||
"triggers": [],
|
||||
"storage": {
|
||||
"objectType": "Storage_MSSQL",
|
||||
"name": "",
|
||||
"oldName": "",
|
||||
"storageType": "Default",
|
||||
"filegroup": "",
|
||||
"textImageFilegroup": "",
|
||||
"filestreamFilegroup": "",
|
||||
"partitionScheme": "",
|
||||
"partitionColumn": "",
|
||||
"filestreamPartitionScheme": "",
|
||||
"dataCompressions": []
|
||||
}
|
||||
}
|
||||
],
|
||||
"views": []
|
||||
|
||||
@@ -13,7 +13,7 @@ public class GetAllProductsByFilterQueryHandler : IRequestHandler<GetAllProducts
|
||||
|
||||
public async Task<GetAllProductsByFilterResponseDto> Handle(GetAllProductsByFilterQuery request, CancellationToken cancellationToken)
|
||||
{
|
||||
await _context.Package.GetAllPackageByFilterAsync(request.Adapt<GetAllPackageByFilterRequest>(), cancellationToken: cancellationToken);
|
||||
return new GetAllProductsByFilterResponseDto();
|
||||
var result= await _context.Package.GetAllPackageByFilterAsync(request.Adapt<GetAllPackageByFilterRequest>(), cancellationToken: cancellationToken);
|
||||
return result.Adapt<GetAllProductsByFilterResponseDto>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
using CMSMicroservice.Protobuf.Protos.Products;
|
||||
|
||||
namespace FrontOffice.BFF.Application.ProductsCQ.Queries.GetProducts;
|
||||
public class GetProductsQueryHandler : IRequestHandler<GetProductsQuery, GetProductsResponseDto>
|
||||
{
|
||||
@@ -11,12 +13,8 @@ public class GetProductsQueryHandler : IRequestHandler<GetProductsQuery, GetProd
|
||||
public async Task<GetProductsResponseDto> Handle(GetProductsQuery request,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
var response = await _context.Productss
|
||||
.AsNoTracking()
|
||||
.Where(x => x.Id == request.Id)
|
||||
.ProjectToType<GetProductsResponseDto>()
|
||||
.FirstOrDefaultAsync(cancellationToken);
|
||||
var response = await _context.Product.GetProductsAsync(request.Adapt<GetProductsRequest>(), cancellationToken: cancellationToken);
|
||||
|
||||
return response ?? throw new NotFoundException(nameof(Products), request.Id);
|
||||
return response ==null? throw new NotFoundException(nameof(ProductsContract.ProductsContractClient), request.Id):response.Adapt<GetProductsResponseDto>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using FrontOffice.BFF.Protobuf.Protos.Products;
|
||||
using CMSMicroservice.Protobuf.Protos.Products;
|
||||
using FrontOffice.BFF.WebApi.Common.Services;
|
||||
using FrontOffice.BFF.Application.ProductsCQ.Queries.GetProducts;
|
||||
using FrontOffice.BFF.Application.ProductsCQ.Queries.GetAllProductsByFilter;
|
||||
|
||||
Reference in New Issue
Block a user