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
b1cafb67
Commit
b1cafb67
authored
Jul 02, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
28f4937d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
195 additions
and
40 deletions
+195
-40
RB_Goods_Online_Trade.cs
Mall.Model/Entity/Product/RB_Goods_Online_Trade.cs
+5
-0
RechargeModule.cs
Mall.Module.MarketingCenter/RechargeModule.cs
+31
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+132
-27
PayUtil.cs
Mall.WebApi/App_Code/PayUtil.cs
+10
-3
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+17
-10
No files found.
Mall.Model/Entity/Product/RB_Goods_Online_Trade.cs
View file @
b1cafb67
...
...
@@ -142,6 +142,11 @@ namespace Mall.Model.Entity.Product
get
;
set
;
}
/// <summary>
/// 微信退款订单id
/// </summary>
public
string
Refund_Id
{
get
;
set
;
}
/// <summary>
/// 退款时间
/// </summary>
...
...
Mall.Module.MarketingCenter/RechargeModule.cs
View file @
b1cafb67
...
...
@@ -5,6 +5,7 @@ using Mall.Model.Extend.MarketingCenter;
using
Mall.Model.Extend.User
;
using
Mall.Repository
;
using
Mall.Repository.MarketingCenter
;
using
Mall.Repository.Product
;
using
Mall.Repository.User
;
using
NPOI.SS.Formula.Functions
;
using
System
;
...
...
@@ -29,6 +30,11 @@ namespace Mall.Module.MarketingCenter
/// </summary>
private
readonly
RB_Member_UserRepository
member_UserRepository
=
new
RB_Member_UserRepository
();
/// <summary>
/// 支付信息
/// </summary>
private
readonly
RB_Goods_Online_TradeRepository
goods_Online_TradeRepository
=
new
RB_Goods_Online_TradeRepository
();
#
region
充值规则信息
/// <summary>
/// 充值信息列表
...
...
@@ -332,6 +338,31 @@ namespace Mall.Module.MarketingCenter
memberIntegralModel
.
OrderId
=
0
;
integralRepository
.
Insert
(
memberIntegralModel
,
trans
);
}
goods_Online_TradeRepository
.
Insert
(
new
Model
.
Entity
.
Product
.
RB_Goods_Online_Trade
()
{
Id
=
0
,
User_Id
=
UserId
,
FinanceId
=
0
,
CreateDate
=
DateTime
.
Now
,
IsRefund
=
2
,
MallBaseId
=
umodel
.
MallBaseId
,
Money
=
Money
,
OrderId
=
OrderId
,
Out_Trade_No
=
Out_Trade_No
,
PayType
=
PayType
,
PayWay
=
PayWay
,
Pay_Date
=
Time_End
,
Pay_Result
=
0
,
RefundMoney
=
0
,
RefundStatus
=
0
,
RefundTrade_Order
=
""
,
Remarks
=
umodel
.
Name
+
"(id:"
+
UserId
+
")"
,
TenantId
=
umodel
.
TenantId
,
Transaction_Id
=
Transaction_Id
,
Type
=
3
})
;
balanceRechargeRepository
.
DBSession
.
Commit
();
}
catch
(
Exception
ex
)
...
...
Mall.Module.Product/OrderModule.cs
View file @
b1cafb67
This diff is collapsed.
Click to expand it.
Mall.WebApi/App_Code/PayUtil.cs
View file @
b1cafb67
...
...
@@ -348,17 +348,24 @@ namespace Mall.WebApi.App_Code
if
(
resultCode
.
Equals
(
"SUCCESS"
))
{
var
outTradeNo
=
xe
.
GetElement
(
"out_trade_no"
).
Value
;
var
transactionId
=
xe
.
GetElement
(
"transaction_id"
).
Value
;
var
outRefundNo
=
xe
.
GetElement
(
"out_refund_no"
).
Value
;
var
refundid
=
xe
.
GetElement
(
"refund_id"
).
Value
;
var
totalFee
=
xe
.
GetElement
(
"refund_fee"
).
Value
;
//在外面回写订单
return
new
BaseResult
()
{
IsSuccess
=
true
,
Data
=
new
Dictionary
<
string
,
string
>
{
{
"OrderNumber"
,
outTradeNo
}
{
"sOrderNo"
,
outTradeNo
},
//商户订单号
{
"sTradeNo"
,
transactionId
},
//微信订单号
{
"refundid"
,
refundid
},
//微信退款单号
{
"outRefundNo"
,
outRefundNo
},
//商户退款单号
{
"dPrice"
,
totalFee
}
//退款金额
}
};
}
}
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
b1cafb67
...
...
@@ -210,7 +210,7 @@ namespace Mall.WebApi.Controllers.MallBase
case
11
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
Mobile
)
{
});
break
;
case
12
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
(
item
.
DistrictAddress
??
""
)+
" "
+(
item
.
ShoppingAddress
??
""
))
{
});
break
;
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
(
item
.
DistrictAddress
??
""
)
+
" "
+
(
item
.
ShoppingAddress
??
""
))
{
});
break
;
case
13
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
(
item
.
PreferPrice
??
0
).
ToString
())
{
});
break
;
case
14
:
...
...
@@ -644,8 +644,8 @@ namespace Mall.WebApi.Controllers.MallBase
{
miniProgramMsgModule
.
SendOrderRefundMsg
(
mallModel
.
TenantId
.
Value
,
mallModel
.
MallBaseId
,
userModel
.
OpenId
,
"已退款,请注意查收"
,
omodel
.
OrderNo
,
(
omodel
.
Income
??
0
).
ToString
(),
goodsName
);
}
bool
flag
=
orderModule
.
SetOrderForcedToCancel
(
omodel
,
RefundOrderNo
,
req
.
TenantId
,
req
.
MallBaseId
);
var
dic
=
((
Dictionary
<
string
,
string
>)
Robj
.
Data
);
bool
flag
=
orderModule
.
SetOrderForcedToCancel
(
omodel
,
RefundOrderNo
,
req
.
TenantId
,
req
.
MallBaseId
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
.
WeChatPay
,
dic
[
"dPrice"
],
dic
[
"sOrderNo"
],
dic
[
"sTradeNo"
],
dic
[
"refundid"
]
);
if
(
flag
)
{
return
ApiResult
.
Success
();
...
...
@@ -663,7 +663,7 @@ namespace Mall.WebApi.Controllers.MallBase
}
else
{
bool
flag
=
orderModule
.
SetOrderForcedToCancel
(
omodel
,
""
,
req
.
TenantId
,
req
.
MallBaseId
);
bool
flag
=
orderModule
.
SetOrderForcedToCancel
(
omodel
,
""
,
req
.
TenantId
,
req
.
MallBaseId
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
.
WeChatPay
,
""
,
""
,
""
,
""
);
if
(
flag
)
{
return
ApiResult
.
Success
();
...
...
@@ -862,7 +862,10 @@ namespace Mall.WebApi.Controllers.MallBase
{
miniProgramMsgModule
.
SendOrderRefundMsg
(
mallModel
.
TenantId
.
Value
,
mallModel
.
MallBaseId
,
userModel
.
OpenId
,
"已退款,请注意查收"
,
omodel
.
OrderNo
,
(
omodel
.
Income
??
0
).
ToString
(),
goodsName
);
}
bool
flag
=
orderModule
.
SetOrderApplyForCancelAudit
(
omodel
,
Type
,
Remark
,
RefundOrderNo
,
req
.
TenantId
,
req
.
MallBaseId
);
var
dic
=
((
Dictionary
<
string
,
string
>)
Robj
.
Data
);
bool
flag
=
orderModule
.
SetOrderApplyForCancelAudit
(
omodel
,
Type
,
Remark
,
RefundOrderNo
,
req
.
TenantId
,
req
.
MallBaseId
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
.
WeChatPay
,
dic
[
"dPrice"
],
dic
[
"sOrderNo"
],
dic
[
"sTradeNo"
],
dic
[
"refundid"
]);
if
(
flag
)
{
return
ApiResult
.
Success
();
...
...
@@ -880,7 +883,7 @@ namespace Mall.WebApi.Controllers.MallBase
}
else
{
bool
flag
=
orderModule
.
SetOrderApplyForCancelAudit
(
omodel
,
Type
,
Remark
,
""
,
req
.
TenantId
,
req
.
MallBaseId
);
bool
flag
=
orderModule
.
SetOrderApplyForCancelAudit
(
omodel
,
Type
,
Remark
,
""
,
req
.
TenantId
,
req
.
MallBaseId
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
.
WeChatPay
,
""
,
""
,
""
,
""
);
if
(
flag
)
{
return
ApiResult
.
Success
();
...
...
@@ -1687,6 +1690,8 @@ namespace Mall.WebApi.Controllers.MallBase
{
return
ApiResult
.
Failed
(
"未查询到订单信息"
);
}
var
omodel
=
orderModule
.
GetOrderInfo
(
ReModel
.
OrderId
??
0
);
int
IsNormalServer
=
Convert
.
ToInt32
(
new
ConfigurationBuilder
().
Add
(
new
JsonConfigurationSource
{
Path
=
"appsettings.json"
}).
Build
().
GetSection
(
"IsNormalServer"
).
Value
);
if
(
IsNormalServer
==
1
)
{
...
...
@@ -1705,7 +1710,8 @@ namespace Mall.WebApi.Controllers.MallBase
var
Robj
=
new
App_Code
.
PayUtil
().
Refund
(
pram
,
mallModel
,
_accessor
);
if
(
Robj
.
IsSuccess
)
{
bool
flag
=
orderModule
.
SetOrderAfterSaleForRefunds
(
ReOrderId
,
Refund
,
RefundOrderNo
,
req
.
TenantId
,
req
.
MallBaseId
);
var
dic
=
((
Dictionary
<
string
,
string
>)
Robj
.
Data
);
bool
flag
=
orderModule
.
SetOrderAfterSaleForRefunds
(
omodel
,
ReOrderId
,
Refund
,
RefundOrderNo
,
req
.
TenantId
,
req
.
MallBaseId
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
.
WeChatPay
,
dic
[
"dPrice"
],
dic
[
"sOrderNo"
],
dic
[
"sTradeNo"
],
dic
[
"refundid"
]);
if
(
flag
==
false
)
{
//日志记录
...
...
@@ -1733,7 +1739,7 @@ namespace Mall.WebApi.Controllers.MallBase
}
else
{
bool
flag
=
orderModule
.
SetOrderAfterSaleForRefunds
(
ReOrderId
,
Refund
,
""
,
req
.
TenantId
,
req
.
MallBaseId
);
bool
flag
=
orderModule
.
SetOrderAfterSaleForRefunds
(
omodel
,
ReOrderId
,
Refund
,
""
,
req
.
TenantId
,
req
.
MallBaseId
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
.
WeChatPay
,
""
,
""
,
""
,
""
);
if
(
flag
)
{
return
ApiResult
.
Success
(
""
);
...
...
@@ -1833,7 +1839,8 @@ namespace Mall.WebApi.Controllers.MallBase
{
miniProgramMsgModule
.
SendOrderRefundMsg
(
mallModel
.
TenantId
.
Value
,
mallModel
.
MallBaseId
,
userModel
.
OpenId
,
"已退款,请注意查收"
,
orderModel
.
OrderNo
,
(
orderModel
.
Income
??
0
).
ToString
(),
goodsName
);
}
bool
flag
=
orderModule
.
SetOrderAfterSaleForRefunds
(
ReOrderId
,
Refund
,
RefundOrderNo
,
req
.
TenantId
,
req
.
MallBaseId
);
var
dic
=
((
Dictionary
<
string
,
string
>)
Robj
.
Data
);
bool
flag
=
orderModule
.
SetOrderAfterSaleForRefunds
(
orderModel
,
ReOrderId
,
Refund
,
RefundOrderNo
,
req
.
TenantId
,
req
.
MallBaseId
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
.
WeChatPay
,
dic
[
"dPrice"
],
dic
[
"sOrderNo"
],
dic
[
"sTradeNo"
],
dic
[
"refundid"
]);
if
(
flag
==
false
)
{
//日志记录
...
...
@@ -1845,7 +1852,7 @@ namespace Mall.WebApi.Controllers.MallBase
}
else
{
bool
flag
=
orderModule
.
SetOrderAfterSaleForRefunds
(
ReOrderId
,
Refund
,
""
,
req
.
TenantId
,
req
.
MallBaseId
);
bool
flag
=
orderModule
.
SetOrderAfterSaleForRefunds
(
orderModel
,
ReOrderId
,
Refund
,
""
,
req
.
TenantId
,
req
.
MallBaseId
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
.
WeChatPay
,
""
,
""
,
""
,
""
);
if
(
flag
==
false
)
{
//日志记录
...
...
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