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
56fae379
Commit
56fae379
authored
Feb 05, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
c9662f95
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
39 deletions
+28
-39
WeChatPayController.cs
Mall.WebApi/Controllers/AppletWeChat/WeChatPayController.cs
+2
-21
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+26
-18
No files found.
Mall.WebApi/Controllers/AppletWeChat/WeChatPayController.cs
View file @
56fae379
...
...
@@ -501,8 +501,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
public
ApiResult
TestReturn
()
{
RB_MiniProgram_Extend
miniProgram
=
new
RB_MiniProgram_Extend
();
//2020年5月26号新增
miniProgram
=
new
RB_MiniProgram_Extend
{
MiniAppId
=
"wx1bf3a7c76b10bb6d"
,
WeChatApiSecret
=
"1e54ed9de09f99d87970aaf798cbc936"
,
WeChatPayMerchants
=
"1554826431"
};
// programModule.GetMiniProgramModule(new RB_MiniProgram_Extend { MallBaseId = 1, TenantId =1 });
RB_MiniProgram_Extend
miniProgram
=
new
RB_MiniProgram_Extend
{
MiniAppId
=
"wx1bf3a7c76b10bb6d"
,
WeChatApiSecret
=
"1e54ed9de09f99d87970aaf798cbc936"
,
WeChatPayMerchants
=
"1554826431"
};
string
RefundOrderNo
=
"2020052916044326411"
;
var
pram
=
new
Common
.
Pay
.
WeChatPat
.
PayParam
()
{
...
...
@@ -545,10 +544,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
public
ApiResult
TestTransfersOrder
()
{
RB_MiniProgram_Extend
miniProgram
=
new
RB_MiniProgram_Extend
();
//2020年5月26号新增
miniProgram
=
new
RB_MiniProgram_Extend
{
MiniAppId
=
"wxacd9f8cc3480d29e"
,
WeChatApiSecret
=
"936110e2c2214340b9829a3608bde6b0"
,
WeChatPayMerchants
=
"1562277941"
};
// programModule.GetMiniProgramModule(new RB_MiniProgram_Extend { MallBaseId = 1, TenantId =1 });
RB_MiniProgram_Extend
miniProgram
=
new
RB_MiniProgram_Extend
{
MiniAppId
=
"wxacd9f8cc3480d29e"
,
WeChatApiSecret
=
"936110e2c2214340b9829a3608bde6b0"
,
WeChatPayMerchants
=
"1562277941"
};
string
RefundOrderNo
=
"20200529160443264111"
;
var
Robj
=
App_Code
.
PayUtil
.
GetTransfersOrder
(
RefundOrderNo
,
Convert
.
ToDecimal
(
"0.01"
),
"21233"
,
"ow_7I5XC1-RGwwk8QANBmWKYKmOc"
,
miniProgram
,
_accessor
);
;
return
ApiResult
.
Success
(
""
,
Robj
);
}
...
...
@@ -568,10 +565,6 @@ namespace Mall.WebApi.Controllers.AppletWeChat
public
ApiResult
TestVIPBuyPayOrder
()
{
RB_MiniProgram_Extend
miniProgram
=
new
RB_MiniProgram_Extend
();
//2020年5月26号新增
miniProgram
=
new
RB_MiniProgram_Extend
{
MiniAppId
=
"wxacd9f8cc3480d29e"
,
WeChatApiSecret
=
"936110e2c2214340b9829a3608bde6b0"
,
WeChatPayMerchants
=
"1562277941"
};
// programModule.GetMiniProgramModule(new RB_MiniProgram_Extend { MallBaseId = 1, TenantId =1 });
string
RefundOrderNo
=
System
.
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmssfff"
);
// var parmsInfo = RequestParm;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
string
orderNo
=
parms
.
GetStringValue
(
"orderNo"
);
int
orderId
=
parms
.
GetInt
(
"orderId"
);
...
...
@@ -583,30 +576,18 @@ namespace Mall.WebApi.Controllers.AppletWeChat
public
ApiResult
InsertOrderPayInfo
()
{
var
request
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
RB_Goods_Order_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_Order_Extend
>(
request
.
msg
.
ToString
());
userCommonModule
.
InsertOrderPayInfo
(
demodel
.
UserId
??
0
,
demodel
.
OrderId
,
demodel
.
OrderNo
,
"s1111111111111"
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
.
WeChatPay
,
"test"
,
(
demodel
.
Income
??
0
),
System
.
DateTime
.
Now
,
0
);
return
ApiResult
.
Success
(
""
);
}
public
ApiResult
TestUpdatePointOrder
()
{
var
request
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
RB_Point_Order_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Point_Order_Extend
>(
request
.
msg
.
ToString
());
//ID = OrderId, OrderNo = sOrderNo, Income = dPaid, MerchantsNo = TransactionId, PaymentTime = PayDate
pointModule
.
UpdatePointOrder
(
demodel
);
return
ApiResult
.
Success
(
""
);
}
#
endregion
}
}
\ No newline at end of file
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
56fae379
...
...
@@ -1030,10 +1030,12 @@ namespace Mall.WebApi.Controllers.MallBase
TransactionPriceInfo
transactionPriceInfo
=
CacheManager
.
User
.
UserReidsCache
.
GetTransactionPriceInfo
(
omodel
.
MallBaseId
);
if
(
transactionPriceInfo
==
null
)
{
transactionPriceInfo
=
new
TransactionPriceInfo
();
transactionPriceInfo
.
TenantId
=
omodel
.
TenantId
;
transactionPriceInfo
.
MallBaseId
=
omodel
.
MallBaseId
;
transactionPriceInfo
.
TotalPrice
=
(
omodel
.
Income
??
0
)
*
-
1
;
transactionPriceInfo
=
new
TransactionPriceInfo
{
TenantId
=
omodel
.
TenantId
,
MallBaseId
=
omodel
.
MallBaseId
,
TotalPrice
=
(
omodel
.
Income
??
0
)
*
-
1
};
}
else
{
...
...
@@ -1300,10 +1302,12 @@ namespace Mall.WebApi.Controllers.MallBase
TransactionPriceInfo
transactionPriceInfo
=
CacheManager
.
User
.
UserReidsCache
.
GetTransactionPriceInfo
(
omodel
.
MallBaseId
);
if
(
transactionPriceInfo
==
null
)
{
transactionPriceInfo
=
new
TransactionPriceInfo
();
transactionPriceInfo
.
TenantId
=
omodel
.
TenantId
;
transactionPriceInfo
.
MallBaseId
=
omodel
.
MallBaseId
;
transactionPriceInfo
.
TotalPrice
=
(
omodel
.
Income
??
0
)
*
-
1
;
transactionPriceInfo
=
new
TransactionPriceInfo
{
TenantId
=
omodel
.
TenantId
,
MallBaseId
=
omodel
.
MallBaseId
,
TotalPrice
=
(
omodel
.
Income
??
0
)
*
-
1
};
}
else
{
...
...
@@ -2977,7 +2981,7 @@ namespace Mall.WebApi.Controllers.MallBase
Name
=
y
.
OrderIntroduction
?.
Name
??
""
,
Commission
=
y
.
OrderIntroduction
?.
Commission
??
0
,
CommissionState
=
y
.
OrderIntroduction
?.
CommissionState
??
1
,
Remark
=
y
.
OrderIntroduction
?.
Remark
,
y
.
OrderIntroduction
?.
Remark
,
}
}),
x
.
Consignee
,
...
...
@@ -3216,7 +3220,7 @@ namespace Mall.WebApi.Controllers.MallBase
Name
=
y
.
SmallShopsCommission
?.
Name
??
""
,
Commission
=
y
.
SmallShopsCommission
?.
Commission
??
0
,
CommissionState
=
y
.
SmallShopsCommission
?.
CommissionState
??
1
,
Remark
=
y
.
SmallShopsCommission
?.
Remark
,
y
.
SmallShopsCommission
?.
Remark
,
}
}),
x
.
Consignee
,
...
...
@@ -3816,10 +3820,12 @@ namespace Mall.WebApi.Controllers.MallBase
TransactionPriceInfo
transactionPriceInfo
=
CacheManager
.
User
.
UserReidsCache
.
GetTransactionPriceInfo
(
detailModel
.
MallBaseId
);
if
(
transactionPriceInfo
==
null
)
{
transactionPriceInfo
=
new
TransactionPriceInfo
();
transactionPriceInfo
.
TenantId
=
orderModel
.
TenantId
;
transactionPriceInfo
.
MallBaseId
=
orderModel
.
MallBaseId
;
transactionPriceInfo
.
TotalPrice
=
Refund
*
-
1
;
transactionPriceInfo
=
new
TransactionPriceInfo
{
TenantId
=
orderModel
.
TenantId
,
MallBaseId
=
orderModel
.
MallBaseId
,
TotalPrice
=
Refund
*
-
1
};
}
else
{
...
...
@@ -4004,10 +4010,12 @@ namespace Mall.WebApi.Controllers.MallBase
TransactionPriceInfo
transactionPriceInfo
=
CacheManager
.
User
.
UserReidsCache
.
GetTransactionPriceInfo
(
orderModel
.
MallBaseId
);
if
(
transactionPriceInfo
==
null
)
{
transactionPriceInfo
=
new
TransactionPriceInfo
();
transactionPriceInfo
.
TenantId
=
orderModel
.
TenantId
;
transactionPriceInfo
.
MallBaseId
=
orderModel
.
MallBaseId
;
transactionPriceInfo
.
TotalPrice
=
Refund
*
-
1
;
transactionPriceInfo
=
new
TransactionPriceInfo
{
TenantId
=
orderModel
.
TenantId
,
MallBaseId
=
orderModel
.
MallBaseId
,
TotalPrice
=
Refund
*
-
1
};
}
else
{
...
...
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