Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
黄奎
mall.oytour.com
Commits
cc483f04
Commit
cc483f04
authored
Feb 05, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
c01b360e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
WeChatNotifyController.cs
...WebApi/Controllers/AppletWeChat/WeChatNotifyController.cs
+10
-13
No files found.
Mall.WebApi/Controllers/AppletWeChat/WeChatNotifyController.cs
View file @
cc483f04
...
...
@@ -24,14 +24,11 @@ namespace Mall.WebApi.Controllers.AppletWeChat
[
EnableCors
(
"AllowCors"
)]
public
class
WeChatNotifyController
:
Controller
{
private
static
object
_lock
=
new
object
();
UserCommonModule
userCommonModule
=
new
UserCommonModule
();
//public UserModule userModule = new UserModule();
Module
.
MarketingCenter
.
RechargeModule
rechargeModule
=
new
Module
.
MarketingCenter
.
RechargeModule
();
Module
.
Education
.
PointModule
pointModule
=
new
Module
.
Education
.
PointModule
();
private
IHttpContextAccessor
_accessor
;
private
readonly
object
_lock
=
new
object
();
readonly
UserCommonModule
userCommonModule
=
new
UserCommonModule
();
readonly
Module
.
MarketingCenter
.
RechargeModule
rechargeModule
=
new
Module
.
MarketingCenter
.
RechargeModule
();
readonly
Module
.
Education
.
PointModule
pointModule
=
new
Module
.
Education
.
PointModule
();
private
readonly
IHttpContextAccessor
_accessor
;
/// <summary>
/// 构造函数
...
...
@@ -185,8 +182,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
#
region
新增订单支付信息
// pointModule.UpdatePointOrder(UserId, OrderId, sOrderNo, TransactionId, Common.Enum.Goods.OrderPayTypeEnum.WeChatPay, PayType, dPaid, PayDate);
pointModule
.
UpdatePointOrder
(
new
Model
.
Extend
.
Point
.
RB_Point_Order_Extend
{
ID
=
OrderId
,
OrderNo
=
sOrderNo
,
Income
=
dPaid
,
MerchantsNo
=
TransactionId
,
PaymentTime
=
PayDate
});
// pointModule.UpdatePointOrder(UserId, OrderId, sOrderNo, TransactionId, Common.Enum.Goods.OrderPayTypeEnum.WeChatPay, PayType, dPaid, PayDate);
pointModule
.
UpdatePointOrder
(
new
Model
.
Extend
.
Point
.
RB_Point_Order_Extend
{
ID
=
OrderId
,
OrderNo
=
sOrderNo
,
Income
=
dPaid
,
MerchantsNo
=
TransactionId
,
PaymentTime
=
PayDate
});
#
endregion
}
...
...
@@ -221,10 +218,10 @@ namespace Mall.WebApi.Controllers.AppletWeChat
var
req
=
new
RequestHandler
();
App_Code
.
PayUtil
PayUtil
=
new
App_Code
.
PayUtil
();
var
result
=
PayUtil
.
NotifyZhouTian
(
_accessor
);
LogHelper
.
WriteInfo
(
"NotifyZhouTian返回信息进来了"
);
LogHelper
.
WriteInfo
(
"NotifyZhouTian返回信息进来了"
);
if
(
result
.
IsSuccess
)
{
LogHelper
.
WriteInfo
(
"NotifyZhouTian回调成功:"
+
result
.
ToString
());
LogHelper
.
WriteInfo
(
"NotifyZhouTian回调成功:"
+
result
.
ToString
());
var
dic
=
((
Dictionary
<
string
,
string
>)
result
.
Data
);
//开始回写订单状态
lock
(
_lock
)
...
...
@@ -240,7 +237,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
DateTime
PayDate
=
DateTime
.
ParseExact
(
dic
[
"PayDate"
],
"yyyyMMddHHmmss"
,
System
.
Globalization
.
CultureInfo
.
CurrentCulture
);
//转换时间// Convert.ToDateTime(dic["PayDate"]);
#
region
新增订单支付信息
LogHelper
.
WriteInfo
(
"NotifyZhouTian订单信息"
);
LogHelper
.
WriteInfo
(
"NotifyZhouTian订单信息"
);
userCommonModule
.
InsertOrderPayInfo
(
UserId
,
OrderId
,
sOrderNo
,
TransactionId
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
.
WeChatPay
,
PayType
,
dPaid
,
PayDate
,
0
);
...
...
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