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
f38115e4
Commit
f38115e4
authored
May 09, 2020
by
gdlcf88
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix unit of work
parent
98d5f474
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
14 additions
and
11 deletions
+14
-11
common.props
modules/EasyAbp.EShop.Baskets/common.props
+1
-1
common.props
modules/EasyAbp.EShop.Orders/common.props
+1
-1
common.props
modules/EasyAbp.EShop.Payments.WeChatPay/common.props
+1
-1
common.props
modules/EasyAbp.EShop.Payments/common.props
+1
-1
common.props
modules/EasyAbp.EShop.Products/common.props
+1
-1
ProductDetailHistoryRecorder.cs
...ts/ProductDetailHistories/ProductDetailHistoryRecorder.cs
+3
-1
ProductHistoryRecorder.cs
...EShop/Products/ProductHistories/ProductHistoryRecorder.cs
+3
-1
OrderCreatedEventHandler.cs
...syAbp/EShop/Products/Products/OrderCreatedEventHandler.cs
+2
-3
common.props
modules/EasyAbp.EShop.Stores/common.props
+1
-1
No files found.
modules/EasyAbp.EShop.Baskets/common.props
View file @
f38115e4
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>0.1.
1
</Version>
<Version>0.1.
2
</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>EasyAbp Team</Authors>
...
...
modules/EasyAbp.EShop.Orders/common.props
View file @
f38115e4
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>0.1.
1
</Version>
<Version>0.1.
2
</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>EasyAbp Team</Authors>
...
...
modules/EasyAbp.EShop.Payments.WeChatPay/common.props
View file @
f38115e4
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>0.1.
1
</Version>
<Version>0.1.
2
</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
...
...
modules/EasyAbp.EShop.Payments/common.props
View file @
f38115e4
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>0.1.
1
</Version>
<Version>0.1.
2
</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>EasyAbp Team</Authors>
...
...
modules/EasyAbp.EShop.Products/common.props
View file @
f38115e4
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>0.1.
1
</Version>
<Version>0.1.
2
</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>EasyAbp Team</Authors>
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductDetailHistories/ProductDetailHistoryRecorder.cs
View file @
f38115e4
...
...
@@ -8,6 +8,7 @@ using Volo.Abp.EventBus;
using
Volo.Abp.Guids
;
using
Volo.Abp.Json
;
using
Volo.Abp.ObjectMapping
;
using
Volo.Abp.Uow
;
namespace
EasyAbp.EShop.Products.ProductDetailHistories
{
...
...
@@ -30,7 +31,8 @@ namespace EasyAbp.EShop.Products.ProductDetailHistories
_productDetailHistoryRepository
=
productDetailHistoryRepository
;
}
public
async
Task
HandleEventAsync
(
EntityChangedEventData
<
ProductDetail
>
eventData
)
[
UnitOfWork
(
true
)]
public
virtual
async
Task
HandleEventAsync
(
EntityChangedEventData
<
ProductDetail
>
eventData
)
{
var
modificationTime
=
eventData
.
Entity
.
LastModificationTime
??
eventData
.
Entity
.
CreationTime
;
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductHistories/ProductHistoryRecorder.cs
View file @
f38115e4
...
...
@@ -7,6 +7,7 @@ using Volo.Abp.EventBus;
using
Volo.Abp.Guids
;
using
Volo.Abp.Json
;
using
Volo.Abp.ObjectMapping
;
using
Volo.Abp.Uow
;
namespace
EasyAbp.EShop.Products.ProductHistories
{
...
...
@@ -29,7 +30,8 @@ namespace EasyAbp.EShop.Products.ProductHistories
_productHistoryRepository
=
productHistoryRepository
;
}
public
async
Task
HandleEventAsync
(
EntityChangedEventData
<
Product
>
eventData
)
[
UnitOfWork
(
true
)]
public
virtual
async
Task
HandleEventAsync
(
EntityChangedEventData
<
Product
>
eventData
)
{
var
modificationTime
=
eventData
.
Entity
.
LastModificationTime
??
eventData
.
Entity
.
CreationTime
;
...
...
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/OrderCreatedEventHandler.cs
View file @
f38115e4
...
...
@@ -31,12 +31,12 @@ namespace EasyAbp.EShop.Products.Products
_productManager
=
productManager
;
}
[
UnitOfWork
(
true
)]
public
virtual
async
Task
HandleEventAsync
(
EntityCreatedEto
<
OrderEto
>
eventData
)
{
var
uow
=
_unitOfWorkManager
.
Current
;
using
(
_currentTenant
.
Change
(
eventData
.
Entity
.
TenantId
))
{
using
var
uow
=
_unitOfWorkManager
.
Begin
(
true
,
true
);
foreach
(
var
orderLine
in
eventData
.
Entity
.
OrderLines
)
{
var
product
=
await
_productRepository
.
FindAsync
(
orderLine
.
ProductId
);
...
...
@@ -69,7 +69,6 @@ namespace EasyAbp.EShop.Products.Products
}
}
await
uow
.
CompleteAsync
();
await
_distributedEventBus
.
PublishAsync
(
new
ProductInventoryReductionAfterOrderPlacedResultEto
{
OrderId
=
eventData
.
Entity
.
Id
,
IsSuccess
=
true
});
}
...
...
modules/EasyAbp.EShop.Stores/common.props
View file @
f38115e4
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>0.1.
1
</Version>
<Version>0.1.
2
</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>EasyAbp Team</Authors>
...
...
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