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
2f709752
Commit
2f709752
authored
Apr 29, 2020
by
gdlcf88
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the OriginalPrice an optional property of ProductSku, close #10
Fix sku updating feature
parent
e266cf93
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
2445 additions
and
11 deletions
+2445
-11
CreateUpdateProductSkuDto.cs
...EShop/Products/Products/Dtos/CreateUpdateProductSkuDto.cs
+1
-1
ProductSkuDto.cs
...cts/EasyAbp/EShop/Products/Products/Dtos/ProductSkuDto.cs
+1
-1
ProductSku.cs
...ucts.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs
+2
-2
EditModal.cshtml
...Pages/EShop/Products/Products/ProductSku/EditModal.cshtml
+1
-1
EditModal.cshtml.cs
...es/EShop/Products/Products/ProductSku/EditModal.cshtml.cs
+1
-4
CreateEditProductSkuViewModel.cs
...ts/ProductSku/ViewModels/CreateEditProductSkuViewModel.cs
+1
-1
20200429104048_MakeOriginalPriceNullable.Designer.cs
...ions/20200429104048_MakeOriginalPriceNullable.Designer.cs
+2407
-0
20200429104048_MakeOriginalPriceNullable.cs
...ns/Migrations/20200429104048_MakeOriginalPriceNullable.cs
+30
-0
EasyMallMigrationsDbContextModelSnapshot.cs
...ns/Migrations/EasyMallMigrationsDbContextModelSnapshot.cs
+1
-1
No files found.
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductSkuDto.cs
View file @
2f709752
...
@@ -10,7 +10,7 @@ namespace EasyAbp.EShop.Products.Products.Dtos
...
@@ -10,7 +10,7 @@ namespace EasyAbp.EShop.Products.Products.Dtos
public
string
Currency
{
get
;
set
;
}
public
string
Currency
{
get
;
set
;
}
[
DisplayName
(
"ProductSkuOriginalPrice"
)]
[
DisplayName
(
"ProductSkuOriginalPrice"
)]
public
decimal
OriginalPrice
{
get
;
set
;
}
public
decimal
?
OriginalPrice
{
get
;
set
;
}
[
DisplayName
(
"ProductSkuPrice"
)]
[
DisplayName
(
"ProductSkuPrice"
)]
public
decimal
Price
{
get
;
set
;
}
public
decimal
Price
{
get
;
set
;
}
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductSkuDto.cs
View file @
2f709752
...
@@ -9,7 +9,7 @@ namespace EasyAbp.EShop.Products.Products.Dtos
...
@@ -9,7 +9,7 @@ namespace EasyAbp.EShop.Products.Products.Dtos
public
string
Currency
{
get
;
set
;
}
public
string
Currency
{
get
;
set
;
}
public
decimal
OriginalPrice
{
get
;
set
;
}
public
decimal
?
OriginalPrice
{
get
;
set
;
}
public
decimal
Price
{
get
;
set
;
}
public
decimal
Price
{
get
;
set
;
}
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs
View file @
2f709752
...
@@ -12,7 +12,7 @@ namespace EasyAbp.EShop.Products.Products
...
@@ -12,7 +12,7 @@ namespace EasyAbp.EShop.Products.Products
[
NotNull
]
[
NotNull
]
public
virtual
string
Currency
{
get
;
protected
set
;
}
public
virtual
string
Currency
{
get
;
protected
set
;
}
public
virtual
decimal
OriginalPrice
{
get
;
protected
set
;
}
public
virtual
decimal
?
OriginalPrice
{
get
;
protected
set
;
}
public
virtual
decimal
Price
{
get
;
protected
set
;
}
public
virtual
decimal
Price
{
get
;
protected
set
;
}
...
@@ -30,7 +30,7 @@ namespace EasyAbp.EShop.Products.Products
...
@@ -30,7 +30,7 @@ namespace EasyAbp.EShop.Products.Products
Guid
id
,
Guid
id
,
[
NotNull
]
string
serializedAttributeOptionIds
,
[
NotNull
]
string
serializedAttributeOptionIds
,
[
NotNull
]
string
currency
,
[
NotNull
]
string
currency
,
decimal
originalPrice
,
decimal
?
originalPrice
,
decimal
price
,
decimal
price
,
int
inventory
,
int
inventory
,
int
sold
,
int
sold
,
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/ProductSku/EditModal.cshtml
View file @
2f709752
...
@@ -9,9 +9,9 @@
...
@@ -9,9 +9,9 @@
<abp-modal>
<abp-modal>
<abp-modal-header title="@L["EditProductSku"].Value"></abp-modal-header>
<abp-modal-header title="@L["EditProductSku"].Value"></abp-modal-header>
<abp-modal-body>
<abp-modal-body>
<abp-input asp-for="Id" />
<abp-input asp-for="StoreId" />
<abp-input asp-for="StoreId" />
<abp-input asp-for="ProductId" />
<abp-input asp-for="ProductId" />
<abp-input asp-for="ProductSkuId" />
<abp-form-content />
<abp-form-content />
</abp-modal-body>
</abp-modal-body>
<abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)"></abp-modal-footer>
<abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)"></abp-modal-footer>
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/ProductSku/EditModal.cshtml.cs
View file @
2f709752
...
@@ -12,10 +12,6 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.ProductSku
...
@@ -12,10 +12,6 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.ProductSku
{
{
public
class
EditModalModel
:
ProductsPageModel
public
class
EditModalModel
:
ProductsPageModel
{
{
[
HiddenInput
]
[
BindProperty
(
SupportsGet
=
true
)]
public
Guid
Id
{
get
;
set
;
}
[
HiddenInput
]
[
HiddenInput
]
[
BindProperty
(
SupportsGet
=
true
)]
[
BindProperty
(
SupportsGet
=
true
)]
public
Guid
StoreId
{
get
;
set
;
}
public
Guid
StoreId
{
get
;
set
;
}
...
@@ -24,6 +20,7 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.ProductSku
...
@@ -24,6 +20,7 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.ProductSku
[
BindProperty
(
SupportsGet
=
true
)]
[
BindProperty
(
SupportsGet
=
true
)]
public
Guid
ProductId
{
get
;
set
;
}
public
Guid
ProductId
{
get
;
set
;
}
[
HiddenInput
]
[
BindProperty
(
SupportsGet
=
true
)]
[
BindProperty
(
SupportsGet
=
true
)]
public
Guid
ProductSkuId
{
get
;
set
;
}
public
Guid
ProductSkuId
{
get
;
set
;
}
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/ProductSku/ViewModels/CreateEditProductSkuViewModel.cs
View file @
2f709752
...
@@ -15,7 +15,7 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.ProductSku.Vi
...
@@ -15,7 +15,7 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.ProductSku.Vi
public
decimal
Price
{
get
;
set
;
}
public
decimal
Price
{
get
;
set
;
}
[
Display
(
Name
=
"ProductSkuOriginalPrice"
)]
[
Display
(
Name
=
"ProductSkuOriginalPrice"
)]
public
decimal
OriginalPrice
{
get
;
set
;
}
public
decimal
?
OriginalPrice
{
get
;
set
;
}
[
Required
]
[
Required
]
[
Display
(
Name
=
"ProductSkuInventory"
)]
[
Display
(
Name
=
"ProductSkuInventory"
)]
...
...
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200429104048_MakeOriginalPriceNullable.Designer.cs
0 → 100644
View file @
2f709752
This diff is collapsed.
Click to expand it.
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200429104048_MakeOriginalPriceNullable.cs
0 → 100644
View file @
2f709752
using
Microsoft.EntityFrameworkCore.Migrations
;
namespace
EasyMall.Migrations
{
public
partial
class
MakeOriginalPriceNullable
:
Migration
{
protected
override
void
Up
(
MigrationBuilder
migrationBuilder
)
{
migrationBuilder
.
AlterColumn
<
decimal
>(
name
:
"OriginalPrice"
,
table
:
"ProductsProductSkus"
,
type
:
"decimal(18,6)"
,
nullable
:
true
,
oldClrType
:
typeof
(
decimal
),
oldType
:
"decimal(18,6)"
);
}
protected
override
void
Down
(
MigrationBuilder
migrationBuilder
)
{
migrationBuilder
.
AlterColumn
<
decimal
>(
name
:
"OriginalPrice"
,
table
:
"ProductsProductSkus"
,
type
:
"decimal(18,6)"
,
nullable
:
false
,
oldClrType
:
typeof
(
decimal
),
oldType
:
"decimal(18,6)"
,
oldNullable
:
true
);
}
}
}
samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/EasyMallMigrationsDbContextModelSnapshot.cs
View file @
2f709752
...
@@ -547,7 +547,7 @@ namespace EasyMall.Migrations
...
@@ -547,7 +547,7 @@ namespace EasyMall.Migrations
b
.
Property
<
int
>(
"OrderMinQuantity"
)
b
.
Property
<
int
>(
"OrderMinQuantity"
)
.
HasColumnType
(
"int"
);
.
HasColumnType
(
"int"
);
b
.
Property
<
decimal
>(
"OriginalPrice"
)
b
.
Property
<
decimal
?
>(
"OriginalPrice"
)
.
HasColumnType
(
"decimal(18,6)"
);
.
HasColumnType
(
"decimal(18,6)"
);
b
.
Property
<
decimal
>(
"Price"
)
b
.
Property
<
decimal
>(
"Price"
)
...
...
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