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
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
...
...
@@ -711,11 +711,13 @@ namespace Mall.Module.Product
}
dModel
.
CoverImagePath
=
dModel
.
CoverImage
;
var
omodel
=
goods_OrderRepository
.
GetEntity
(
dModel
.
OrderId
);
if
(
omodel
==
null
)
{
if
(
omodel
==
null
)
{
return
ApiResult
.
Failed
(
"未查询到订单信息"
);
}
decimal
Final_Price
=
dModel
.
Final_Price
??
0
;
if
(
omodel
.
Income
<
dModel
.
Final_Price
)
{
if
(
omodel
.
Income
<
dModel
.
Final_Price
)
{
Final_Price
=
omodel
.
Income
??
0
;
}
//获取订阅消息
...
...
@@ -1717,7 +1719,7 @@ namespace Mall.Module.Product
goods_id
=
gmodel
.
Id
,
sign_id
=
item
.
SpecificationSort
,
stock
=
gmodel
.
InventoryNum
,
price
=
item
.
Unit_Price
??
0
,
price
=
item
.
Unit_Price
??
0
,
original_price
=
item
.
Original_Price
??
0
,
no
=
gmodel
.
GoodsNumbers
,
weight
=
item
.
GoodsWeight
,
...
...
@@ -2956,7 +2958,7 @@ namespace Mall.Module.Product
/// <param name="orderId"></param>
/// <param name="userId"></param>
/// <returns></returns>
public
bool
SetAppletOrderCommissionInitialize
(
int
orderId
,
int
userId
=
0
)
public
bool
SetAppletOrderCommissionInitialize
(
int
orderId
,
int
userId
=
0
)
{
var
demodel
=
goods_OrderRepository
.
GetEntity
<
RB_Goods_Order_Extend
>(
orderId
);
if
(
demodel
==
null
)
...
...
@@ -2969,12 +2971,13 @@ namespace Mall.Module.Product
{
return
false
;
}
var
detList
=
goods_OrderDetailRepository
.
GetOrderDetailList
(
new
RB_Goods_OrderDetail_Extend
()
{
OrderId
=
orderId
});
demodel
.
DetailList
=
detList
;
string
GoodsIds
=
""
;
if
(
demodel
.
DetailList
.
Any
())
{
if
(
demodel
.
DetailList
.
Any
())
{
GoodsIds
=
string
.
Join
(
","
,
demodel
.
DetailList
.
Select
(
x
=>
x
.
GoodsId
));
var
gList
=
goodsRepository
.
GetList
(
new
RB_Goods_Extend
()
{
GoodsIds
=
GoodsIds
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
foreach
(
var
item
in
demodel
.
DetailList
)
...
...
@@ -3230,10 +3233,12 @@ namespace Mall.Module.Product
if
(
OneUserId
>
0
)
{
#
region
临时处理
if
(
TwoUserId
>
0
&&
TwoUserId
<
20
)
{
if
(
TwoUserId
>
0
&&
TwoUserId
<
20
)
{
TwoUserId
=
0
;
}
if
(
ThreeUserId
>
0
&&
ThreeUserId
<
20
)
{
if
(
ThreeUserId
>
0
&&
ThreeUserId
<
20
)
{
ThreeUserId
=
0
;
}
#
endregion
...
...
@@ -3966,7 +3971,7 @@ namespace Mall.Module.Product
/// <param name="TenantId"></param>
/// <param name="MallBaseId"></param>
/// <returns></returns>
public
Model
.
Extend
.
BaseSetUp
.
RB_MallBase_Extend
GetMallBaseInfo
(
int
TenantId
,
int
MallBaseId
)
public
Model
.
Extend
.
BaseSetUp
.
RB_MallBase_Extend
GetMallBaseInfo
(
int
TenantId
,
int
MallBaseId
)
{
var
mallbaseModel
=
mallBaseRepository
.
GetListRepository
(
new
Model
.
Extend
.
BaseSetUp
.
RB_MallBase_Extend
()
{
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
}).
FirstOrDefault
();
return
mallbaseModel
;
...
...
@@ -4762,9 +4767,11 @@ namespace Mall.Module.Product
/// </summary>
/// <param name="OrderDetailId"></param>
/// <returns></returns>
public
bool
GetOrderCommissionIsSend
(
int
OrderDetailId
)
{
public
bool
GetOrderCommissionIsSend
(
int
OrderDetailId
)
{
var
list
=
goods_OrderCommissionRepository
.
GetOrderHaveCommissionList
(
OrderDetailId
.
ToString
());
if
(
list
.
Any
())
{
if
(
list
.
Any
())
{
return
true
;
}
return
false
;
...
...
@@ -4775,7 +4782,8 @@ namespace Mall.Module.Product
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
public
RB_Member_User_Extend
GetMemberUserInfo
(
int
userId
)
{
public
RB_Member_User_Extend
GetMemberUserInfo
(
int
userId
)
{
return
member_UserRepository
.
GetEntity
(
userId
).
RefMapperTo
<
RB_Member_User_Extend
>();
}
...
...
@@ -5042,7 +5050,7 @@ namespace Mall.Module.Product
//先查询规则
var
financeConfigurineList
=
financeConfigurineRepository
.
GetList
(
new
Model
.
Extend
.
Finance
.
RB_Finance_Configurine_Extend
{
Type
=
3
});
string
dstr
=
"已收货,客人付款:"
+
(
dmodel
.
Income
??
0
)
+
"金额,申请退款:"
+
(
dmodel
.
Refund
??
0
)
+
",手续费:"
+
Fee
;
string
dstr
=
"已收货,客人付款:"
+
(
dmodel
.
Income
??
0
)
+
"金额,申请退款:"
+
(
dmodel
.
Refund
??
0
)
+
",手续费:"
+
Fee
;
if
(
financeConfigurineList
!=
null
&&
financeConfigurineList
.
Any
())
{
var
item
=
financeConfigurineList
.
FirstOrDefault
();
...
...
@@ -5067,7 +5075,7 @@ namespace Mall.Module.Product
item
.
CurrencyId
,
WBMoney
=
Money
,
PayDate
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
),
RB_Branch_Id
=
Config
.
ExpendBranchId
,
RB_Branch_Id
=
Config
.
ExpendBranchId
,
TemplateId
=
item
.
WorkFlowId
,
OrderSource
=
16
,
OtherType
=
12
,
...
...
@@ -5204,7 +5212,7 @@ namespace Mall.Module.Product
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
bool
SetOrderAfterSaleForRefunds
(
int
reOrderId
,
decimal
refund
,
string
RefundOrderNo
,
int
tenantId
,
int
mallBaseI
d
)
public
bool
SetOrderAfterSaleForRefunds
(
RB_Goods_Order_Extend
omodel
,
int
reOrderId
,
decimal
refund
,
string
RefundOrderNo
,
int
tenantId
,
int
mallBaseId
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
payType
,
string
dPrice
,
string
outTradeNo
,
string
transactionId
,
string
refundi
d
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
...
...
@@ -5240,6 +5248,35 @@ namespace Mall.Module.Product
//string RefundOrderNo = OrderModel.OrderNo + Num;
#
endregion
if
(!
string
.
IsNullOrWhiteSpace
(
dPrice
)
&&
!
string
.
IsNullOrWhiteSpace
(
outTradeNo
)
&&
!
string
.
IsNullOrWhiteSpace
(
transactionId
)
&&
!
string
.
IsNullOrWhiteSpace
(
refundid
))
{
goods_Online_TradeRepository
.
Insert
(
new
Model
.
Entity
.
Product
.
RB_Goods_Online_Trade
()
{
Id
=
0
,
User_Id
=
omodel
.
UserId
,
FinanceId
=
0
,
CreateDate
=
DateTime
.
Now
,
IsRefund
=
2
,
MallBaseId
=
omodel
.
MallBaseId
,
Money
=
omodel
.
Income
,
OrderId
=
omodel
.
OrderId
,
Out_Trade_No
=
outTradeNo
,
PayType
=
""
,
PayWay
=
payType
,
Pay_Date
=
System
.
DateTime
.
Now
,
Pay_Result
=
0
,
RefundMoney
=
string
.
IsNullOrWhiteSpace
(
dPrice
)
?
0
:
Convert
.
ToDecimal
(
dPrice
),
RefundStatus
=
2
,
RefundTrade_Order
=
RefundOrderNo
,
Refund_Date
=
DateTime
.
Now
,
Refund_Id
=
refundid
,
Remarks
=
omodel
.
UserName
+
"(id:"
+
omodel
.
UserId
+
")"
,
TenantId
=
omodel
.
TenantId
,
Transaction_Id
=
transactionId
,
Type
=
2
});
}
goods_OrderAfterSaleLogRepository
.
Insert
(
new
RB_Goods_OrderAfterSaleLog
()
{
Id
=
0
,
...
...
@@ -5464,7 +5501,8 @@ namespace Mall.Module.Product
}
goodsName
+=
"等"
+
dlist
.
Count
+
"件"
;
}
else
{
else
{
if
(
goodsName
.
Length
>
10
)
{
goodsName
=
goodsName
.
Substring
(
0
,
10
);
...
...
@@ -5475,7 +5513,8 @@ namespace Mall.Module.Product
var
exModel
=
logistics_ExpressRepository
.
GetEntity
(
demodel
.
ExpressId
);
new
MiniProgramMsgModule
().
SendOrderDeliverMsg
(
demodel
.
TenantId
,
demodel
.
MallBaseId
,
umodel
.
OpenId
,
"商品已发货,注意查收!"
,
demodel
.
ExpressNumber
,
exModel
.
Name
??
"其他"
,
goodsName
);
}
else
{
else
{
//new MiniProgramMsgModule().SendOrderDeliverMsg(demodel.TenantId, demodel.MallBaseId, umodel.OpenId, demodel.Remark ?? "", "", "其他方式", goodsName);
}
}
...
...
@@ -5512,8 +5551,11 @@ namespace Mall.Module.Product
/// <param name="remark"></param>
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <param name="outTradeNo">商户订单号</param>
/// <param name="transactionId">微信订单号</param>
/// <param name="refundid">微信退款单号</param>
/// <returns></returns>
public
bool
SetOrderApplyForCancelAudit
(
RB_Goods_Order_Extend
omodel
,
int
type
,
string
remark
,
string
RefundOrderNo
,
int
tenantId
,
int
mallBaseId
)
public
bool
SetOrderApplyForCancelAudit
(
RB_Goods_Order_Extend
omodel
,
int
type
,
string
remark
,
string
RefundOrderNo
,
int
tenantId
,
int
mallBaseId
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
payType
,
string
dPrice
,
string
outTradeNo
,
string
transactionId
,
string
refundid
)
{
var
trans
=
goods_OrderRepository
.
DbTransaction
;
try
...
...
@@ -5712,6 +5754,34 @@ namespace Mall.Module.Product
{
Content
+=
",拒绝理由:"
+
remark
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
dPrice
)
&&
!
string
.
IsNullOrWhiteSpace
(
outTradeNo
)
&&
!
string
.
IsNullOrWhiteSpace
(
transactionId
)
&&
!
string
.
IsNullOrWhiteSpace
(
refundid
))
{
goods_Online_TradeRepository
.
Insert
(
new
Model
.
Entity
.
Product
.
RB_Goods_Online_Trade
()
{
Id
=
0
,
User_Id
=
omodel
.
UserId
,
FinanceId
=
0
,
CreateDate
=
DateTime
.
Now
,
IsRefund
=
2
,
MallBaseId
=
omodel
.
MallBaseId
,
Money
=
omodel
.
Income
,
OrderId
=
omodel
.
OrderId
,
Out_Trade_No
=
outTradeNo
,
PayType
=
""
,
PayWay
=
payType
,
Pay_Date
=
System
.
DateTime
.
Now
,
Pay_Result
=
0
,
RefundMoney
=
string
.
IsNullOrWhiteSpace
(
dPrice
)
?
0
:
Convert
.
ToDecimal
(
dPrice
),
RefundStatus
=
2
,
RefundTrade_Order
=
RefundOrderNo
,
Refund_Date
=
DateTime
.
Now
,
Refund_Id
=
refundid
,
Remarks
=
omodel
.
UserName
+
"(id:"
+
omodel
.
UserId
+
")"
,
TenantId
=
omodel
.
TenantId
,
Transaction_Id
=
transactionId
,
Type
=
2
});
}
goods_LogRepository
.
Insert
(
new
RB_Goods_Log
()
{
Content
=
Content
,
...
...
@@ -5724,7 +5794,8 @@ namespace Mall.Module.Product
});
}
goods_OrderRepository
.
DBSession
.
Commit
();
if
(
flag
&&
type
==
1
&&
tenantId
==
1
)
{
if
(
flag
&&
type
==
1
&&
tenantId
==
1
)
{
//同意 创建财务单据
OrderRefundFinanceModule
(
omodel
);
}
...
...
@@ -5746,8 +5817,11 @@ namespace Mall.Module.Product
/// <param name="remark"></param>
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <param name="outTradeNo">商户订单号</param>
/// <param name="transactionId">微信订单号</param>
/// <param name="refundid">微信退款单号</param>
/// <returns></returns>
public
bool
SetOrderForcedToCancel
(
RB_Goods_Order_Extend
omodel
,
string
RefundOrderNo
,
int
tenantId
,
int
mallBaseId
)
public
bool
SetOrderForcedToCancel
(
RB_Goods_Order_Extend
omodel
,
string
RefundOrderNo
,
int
tenantId
,
int
mallBaseId
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
payType
,
string
dPrice
,
string
outTradeNo
,
string
transactionId
,
string
refundid
)
{
var
trans
=
goods_OrderRepository
.
DbTransaction
;
try
...
...
@@ -5944,6 +6018,34 @@ namespace Mall.Module.Product
TenantId
=
tenantId
,
Type
=
1
});
if
(!
string
.
IsNullOrWhiteSpace
(
dPrice
)&&
!
string
.
IsNullOrWhiteSpace
(
outTradeNo
)
&&
!
string
.
IsNullOrWhiteSpace
(
transactionId
)
&&
!
string
.
IsNullOrWhiteSpace
(
refundid
))
{
goods_Online_TradeRepository
.
Insert
(
new
Model
.
Entity
.
Product
.
RB_Goods_Online_Trade
()
{
Id
=
0
,
User_Id
=
omodel
.
UserId
,
FinanceId
=
0
,
CreateDate
=
DateTime
.
Now
,
IsRefund
=
2
,
MallBaseId
=
umodel
.
MallBaseId
,
Money
=
omodel
.
Income
,
OrderId
=
omodel
.
OrderId
,
Out_Trade_No
=
outTradeNo
,
PayType
=
""
,
PayWay
=
payType
,
Pay_Date
=
System
.
DateTime
.
Now
,
Pay_Result
=
0
,
RefundMoney
=
string
.
IsNullOrWhiteSpace
(
dPrice
)
?
0
:
Convert
.
ToDecimal
(
dPrice
),
RefundStatus
=
2
,
RefundTrade_Order
=
RefundOrderNo
,
Refund_Date
=
DateTime
.
Now
,
Refund_Id
=
refundid
,
Remarks
=
omodel
.
UserName
+
"(id:"
+
omodel
.
UserId
+
")"
,
TenantId
=
umodel
.
TenantId
,
Transaction_Id
=
transactionId
,
Type
=
2
});
}
}
goods_OrderRepository
.
DBSession
.
Commit
();
if
(
flag
&&
tenantId
==
1
)
...
...
@@ -5974,7 +6076,8 @@ namespace Mall.Module.Product
decimal
Rate
=
Convert
.
ToDecimal
(
Config
.
SettlementRate
);
decimal
Money
=
omodel
.
Income
??
0
;
decimal
Fee
=
0
;
if
(
Rate
>
0
)
{
if
(
Rate
>
0
)
{
Fee
=
Math
.
Round
(
Money
*
Rate
/
1000
,
2
,
MidpointRounding
.
AwayFromZero
);
Money
-=
Fee
;
}
...
...
@@ -6001,7 +6104,8 @@ namespace Mall.Module.Product
item
.
IsPublic
=
8
;
//默认原路退款
string
Remark
=
"名称:"
+
umodel
.
Name
+
"("
+
umodel
.
Id
+
")"
+
" "
+
System
.
DateTime
.
Now
.
ToString
(
"yyyy年MM月dd日"
)
+
" 自动生成财务单据"
;
if
(
IsForcedToCancel
)
{
if
(
IsForcedToCancel
)
{
Remark
=
"后台强制取消该订单,用户名称:"
+
umodel
.
Name
+
"("
+
umodel
.
Id
+
")"
+
" "
+
System
.
DateTime
.
Now
.
ToString
(
"yyyy年MM月dd日"
)
+
" 自动生成财务单据"
;
}
var
financeObj
=
new
...
...
@@ -6013,7 +6117,7 @@ namespace Mall.Module.Product
item
.
CurrencyId
,
WBMoney
=
Money
,
PayDate
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
),
RB_Branch_Id
=
Config
.
ExpendBranchId
,
RB_Branch_Id
=
Config
.
ExpendBranchId
,
TemplateId
=
item
.
WorkFlowId
,
OrderSource
=
16
,
OtherType
=
14
,
...
...
@@ -6239,7 +6343,7 @@ namespace Mall.Module.Product
{
bool
IsUpdateCommission
=
true
;
var
mallModel
=
mallBaseRepository
.
GetEntity
(
mallBaseId
);
if
(
mallModel
!=
null
&&
mallModel
.
AfterTime
>
0
)
if
(
mallModel
!=
null
&&
mallModel
.
AfterTime
>
0
)
{
var
OrderM
=
goods_OrderRepository
.
GetEntity
(
orderModel
.
OrderId
);
if
(
OrderM
!=
null
&&
OrderM
.
ReceivingTime
.
HasValue
&&
OrderM
.
ReceivingTime
.
Value
.
AddDays
(
mallModel
.
AfterTime
)
>
DateTime
.
Now
)
...
...
@@ -6348,7 +6452,8 @@ namespace Mall.Module.Product
//强制取消 (作废 使用新方法)
}
else
if
(
type
==
5
)
{
else
if
(
type
==
5
)
{
//收货 自动确认订单
SetOrderOperation
(
orderModel
,
6
,
""
,
0
,
""
,
tenantId
,
mallBaseId
);
}
...
...
@@ -7835,6 +7940,6 @@ namespace Mall.Module.Product
{
return
goods_OrderDetailRepository
.
GetOrderDetailList
(
dmodel
);
}
#
endregion
}
#
endregion
}
}
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