Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
EShop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
EShop
Commits
2737922c
Commit
2737922c
authored
Apr 28, 2020
by
gdlcf88
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed CategoryIds form ProductDto
parent
f1a00bac
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
14 deletions
+1
-14
ProductDto.cs
...tracts/EasyAbp/EShop/Products/Products/Dtos/ProductDto.cs
+0
-2
ProductAppService.cs
...tion/EasyAbp/EShop/Products/Products/ProductAppService.cs
+0
-10
ProductsApplicationAutoMapperProfile.cs
...bp/EShop/Products/ProductsApplicationAutoMapperProfile.cs
+1
-2
No files found.
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductDto.cs
View file @
2737922c
...
@@ -10,8 +10,6 @@ namespace EasyAbp.EShop.Products.Products.Dtos
...
@@ -10,8 +10,6 @@ namespace EasyAbp.EShop.Products.Products.Dtos
public
Guid
ProductTypeId
{
get
;
set
;
}
public
Guid
ProductTypeId
{
get
;
set
;
}
public
ICollection
<
Guid
>
CategoryIds
{
get
;
set
;
}
public
string
DisplayName
{
get
;
set
;
}
public
string
DisplayName
{
get
;
set
;
}
public
InventoryStrategy
InventoryStrategy
{
get
;
set
;
}
public
InventoryStrategy
InventoryStrategy
{
get
;
set
;
}
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductAppService.cs
View file @
2737922c
...
@@ -129,16 +129,6 @@ namespace EasyAbp.EShop.Products.Products
...
@@ -129,16 +129,6 @@ namespace EasyAbp.EShop.Products.Products
await
base
.
DeleteAsync
(
id
);
await
base
.
DeleteAsync
(
id
);
}
}
public
override
async
Task
<
ProductDto
>
GetAsync
(
Guid
id
)
{
var
dto
=
await
base
.
GetAsync
(
id
);
dto
.
CategoryIds
=
(
await
_productCategoryRepository
.
GetListByProductId
(
dto
.
Id
,
dto
.
StoreId
))
.
Select
(
x
=>
x
.
CategoryId
).
ToList
();
return
dto
;
}
protected
virtual
async
Task
UpdateProductCategoriesAsync
(
Guid
productId
,
Guid
storeId
,
IEnumerable
<
Guid
>
categoryIds
)
protected
virtual
async
Task
UpdateProductCategoriesAsync
(
Guid
productId
,
Guid
storeId
,
IEnumerable
<
Guid
>
categoryIds
)
{
{
await
_productCategoryRepository
.
DeleteAsync
(
x
=>
x
.
ProductId
.
Equals
(
productId
));
await
_productCategoryRepository
.
DeleteAsync
(
x
=>
x
.
ProductId
.
Equals
(
productId
));
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductsApplicationAutoMapperProfile.cs
View file @
2737922c
...
@@ -18,8 +18,7 @@ namespace EasyAbp.EShop.Products
...
@@ -18,8 +18,7 @@ namespace EasyAbp.EShop.Products
/* You can configure your AutoMapper mapping configuration here.
/* You can configure your AutoMapper mapping configuration here.
* Alternatively, you can split your mapping configurations
* Alternatively, you can split your mapping configurations
* into multiple profile classes for a better organization. */
* into multiple profile classes for a better organization. */
CreateMap
<
Product
,
ProductDto
>()
CreateMap
<
Product
,
ProductDto
>();
.
Ignore
(
dto
=>
dto
.
CategoryIds
);
CreateMap
<
ProductDetail
,
ProductDetailDto
>();
CreateMap
<
ProductDetail
,
ProductDetailDto
>();
CreateMap
<
ProductAttribute
,
ProductAttributeDto
>();
CreateMap
<
ProductAttribute
,
ProductAttributeDto
>();
CreateMap
<
ProductAttributeOption
,
ProductAttributeOptionDto
>();
CreateMap
<
ProductAttributeOption
,
ProductAttributeOptionDto
>();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment