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
610a5491
Commit
610a5491
authored
Jun 12, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加正式服务掉退款接口控制
parent
b22dc6fe
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
287 additions
and
46 deletions
+287
-46
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+166
-5
ERPOrderCommissionController.cs
...ebApi/Controllers/Finance/ERPOrderCommissionController.cs
+22
-10
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+75
-23
UserController.cs
Mall.WebApi/Controllers/User/UserController.cs
+23
-8
appsettings.json
Mall.WebApi/appsettings.json
+1
-0
No files found.
Mall.Module.Product/OrderModule.cs
View file @
610a5491
...
@@ -1510,6 +1510,8 @@ namespace Mall.Module.Product
...
@@ -1510,6 +1510,8 @@ namespace Mall.Module.Product
}
}
#
endregion
#
endregion
Total_integral_price
+=
(
item
.
IntegralMoney
??
0
);
Total_use_integral
+=
(
item
.
IntegralNumber
??
0
);
TotalGoodsMoney
+=
item
.
Final_Price
??
0
;
TotalGoodsMoney
+=
item
.
Final_Price
??
0
;
TotalGoodsOriginalMoney
+=
(
gmodel
.
OriginalPrice
??
0
)
*
(
item
.
Number
??
0
);
TotalGoodsOriginalMoney
+=
(
gmodel
.
OriginalPrice
??
0
)
*
(
item
.
Number
??
0
);
TotalGoodsSellMoney
+=
gmodel
.
MemberPrice
*
(
item
.
Number
??
0
);
TotalGoodsSellMoney
+=
gmodel
.
MemberPrice
*
(
item
.
Number
??
0
);
...
@@ -1519,8 +1521,6 @@ namespace Mall.Module.Product
...
@@ -1519,8 +1521,6 @@ namespace Mall.Module.Product
item
.
IntegralNumber
=
use_integral
;
item
.
IntegralNumber
=
use_integral
;
item
.
Attr_list
=
attr_list
;
item
.
Attr_list
=
attr_list
;
item
.
Discounts
=
discounts
;
item
.
Discounts
=
discounts
;
Total_integral_price
+=
integral_price
;
Total_use_integral
+=
use_integral
;
item
.
CategoryIdList
=
categoryList
.
Select
(
x
=>
x
.
CategoryId
??
0
).
ToList
();
item
.
CategoryIdList
=
categoryList
.
Select
(
x
=>
x
.
CategoryId
??
0
).
ToList
();
}
}
...
@@ -5243,6 +5243,7 @@ namespace Mall.Module.Product
...
@@ -5243,6 +5243,7 @@ namespace Mall.Module.Product
{
{
if
(
type
==
1
)
if
(
type
==
1
)
{
{
int
TotalIntegralNumber
=
0
;
//回滚商品库存
//回滚商品库存
var
detailList
=
goods_OrderDetailRepository
.
GetOrderDetailList
(
new
RB_Goods_OrderDetail_Extend
()
{
GoodsId
=
omodel
.
OrderId
,
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
});
var
detailList
=
goods_OrderDetailRepository
.
GetOrderDetailList
(
new
RB_Goods_OrderDetail_Extend
()
{
GoodsId
=
omodel
.
OrderId
,
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
});
if
(
detailList
.
Any
())
if
(
detailList
.
Any
())
...
@@ -5301,7 +5302,7 @@ namespace Mall.Module.Product
...
@@ -5301,7 +5302,7 @@ namespace Mall.Module.Product
}
}
};
};
goodsRepository
.
Update
(
keyValues1
,
wheres1
,
trans
);
goodsRepository
.
Update
(
keyValues1
,
wheres1
,
trans
);
Task
.
Run
(()
=>
goods_LogRepository
.
Insert
(
new
RB_Goods_Log
()
goods_LogRepository
.
Insert
(
new
RB_Goods_Log
()
{
{
Id
=
0
,
Id
=
0
,
Type
=
2
,
Type
=
2
,
...
@@ -5310,12 +5311,54 @@ namespace Mall.Module.Product
...
@@ -5310,12 +5311,54 @@ namespace Mall.Module.Product
CreateDate
=
DateTime
.
Now
,
CreateDate
=
DateTime
.
Now
,
MallBaseId
=
mallBaseId
,
MallBaseId
=
mallBaseId
,
TenantId
=
tenantId
TenantId
=
tenantId
}));
});
if
(
item
.
IntegralNumber
>
0
)
{
TotalIntegralNumber
+=
(
item
.
IntegralNumber
??
0
);
}
}
}
}
}
//同意 需原路退款
var
umodel
=
member_UserRepository
.
GetEntity
(
omodel
.
UserId
);
//积分抵扣回滚
if
(
TotalIntegralNumber
>
0
)
{
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Member_User_Extend
.
Integral
),
umodel
.
Integral
+
TotalIntegralNumber
}
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Member_User_Extend
.
Id
),
FiledValue
=
umodel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
member_UserRepository
.
Update
(
keyValues1
,
wheres1
,
trans
);
}
//优惠券回滚
if
(!
string
.
IsNullOrEmpty
(
omodel
.
CouponsIds
))
{
var
cList
=
member_CouponRepository
.
GetList
(
new
RB_Member_DiscountCoupon_Extend
()
{
UseState
=
1
,
Ids
=
omodel
.
CouponsIds
,
UserId
=
omodel
.
UserId
,
TenantId
=
omodel
.
TenantId
,
MallBaseId
=
omodel
.
MallBaseId
});
foreach
(
var
item
in
cList
)
{
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
UseState
),
0
}
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Member_DiscountCoupon_Extend
.
Id
),
FiledValue
=
item
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
member_CouponRepository
.
Update
(
keyValues1
,
wheres1
,
trans
);
}
}
//余额支付回滚
//同意 创建财务单据
OrderRefundFinanceModule
(
omodel
);
}
}
//记录日志
//记录日志
string
Content
=
$"客人申请取消订单,审核:
{(
type
==
1
?
"同意"
:
"拒绝"
)}
"
;
string
Content
=
$"客人申请取消订单,审核:
{(
type
==
1
?
"同意"
:
"拒绝"
)}
"
;
...
@@ -5345,6 +5388,124 @@ namespace Mall.Module.Product
...
@@ -5345,6 +5388,124 @@ namespace Mall.Module.Product
}
}
}
}
/// <summary>
/// 生成退款单据
/// </summary>
/// <param name="omodel"></param>
/// <returns></returns>
public
bool
OrderRefundFinanceModule
(
RB_Goods_Order_Extend
omodel
)
{
var
flag
=
false
;
try
{
decimal
Money
=
omodel
.
Income
??
0
;
//查询用户
var
umodel
=
member_UserRepository
.
GetEntity
(
omodel
.
UserId
);
if
(
umodel
==
null
)
{
return
false
;
}
//先查询规则
var
financeConfigurineList
=
financeConfigurineRepository
.
GetList
(
new
Model
.
Extend
.
Finance
.
RB_Finance_Configurine_Extend
{
Type
=
3
});
string
dstr
=
"客人付款:"
+
(
omodel
.
Income
??
0
)
+
"金额,退款:"
+
(
omodel
.
Refund
??
0
);
if
(
financeConfigurineList
!=
null
&&
financeConfigurineList
.
Any
())
{
var
item
=
financeConfigurineList
.
FirstOrDefault
();
var
detailList
=
new
List
<
object
>()
{
new
{
CostTypeId
=
item
.
RemitCostTypeId
,
Number
=
1
,
OriginalMoney
=
Money
,
UnitPrice
=
Money
,
Remark
=
"订单号:"
+
omodel
.
OrderNo
+
" "
+
dstr
}
};
item
.
IsPublic
=
8
;
//默认原路退款
var
financeObj
=
new
{
CreateBy
=
Config
.
NetworkDirector
,
item
.
IsPublic
,
ClientType
=
0
,
ClientID
=
0
,
item
.
CurrencyId
,
WBMoney
=
Money
,
PayDate
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
),
Config
.
RB_Branch_Id
,
TemplateId
=
item
.
WorkFlowId
,
OrderSource
=
16
,
OtherType
=
14
,
ReFinanceId
=
omodel
.
OrderId
,
Remark
=
"名称:"
+
umodel
.
Name
+
"("
+
umodel
.
Id
+
")"
+
" "
+
System
.
DateTime
.
Now
.
ToString
(
"yyyy年MM月dd日"
)
+
"自动生成财务单据"
,
detailList
};
string
sign
=
EncryptionHelper
.
AesEncrypt
(
JsonHelper
.
Serialize
(
financeObj
),
Config
.
FinanceKey
);
var
resultInfo
=
new
{
msg
=
sign
};
string
apiResult
=
Mall
.
Common
.
Plugin
.
HttpHelper
.
HttpPost
(
Config
.
PaymentFinanceApi
,
JsonHelper
.
Serialize
(
resultInfo
),
""
);
var
apir
=
JsonConvert
.
DeserializeObject
<
ApiResult
>(
apiResult
);
if
(
apir
.
resultCode
==
1
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods_Order_Extend
.
Remark
),
omodel
.
Remark
+
" 自动生成财务退款单据:"
+
apir
.
data
.
ToString
()}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_Order_Extend
.
OrderId
),
FiledValue
=
omodel
.
OrderId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_Order_Extend
.
TenantId
),
FiledValue
=
omodel
.
TenantId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_Order_Extend
.
MallBaseId
),
FiledValue
=
omodel
.
MallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
goods_OrderRepository
.
Update
(
keyValues
,
wheres
);
}
else
{
//记录自动生成失败,需手动新增财务单据
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods_Order_Extend
.
Remark
),
omodel
.
Remark
+
" 财务单据新增失败,请手动增加"
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_Order_Extend
.
OrderId
),
FiledValue
=
omodel
.
OrderId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_Order_Extend
.
TenantId
),
FiledValue
=
omodel
.
TenantId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_Order_Extend
.
MallBaseId
),
FiledValue
=
omodel
.
MallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
goods_OrderRepository
.
Update
(
keyValues
,
wheres
);
}
}
}
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
);
}
return
flag
;
}
/// <summary>
/// <summary>
/// 修改订单收货地址
/// 修改订单收货地址
/// </summary>
/// </summary>
...
...
Mall.WebApi/Controllers/Finance/ERPOrderCommissionController.cs
View file @
610a5491
...
@@ -158,23 +158,35 @@ namespace Mall.WebApi.Controllers.Finance
...
@@ -158,23 +158,35 @@ namespace Mall.WebApi.Controllers.Finance
//执行发放金额
//执行发放金额
if
(
model
.
WithdrawalWay
==
DistrbutorWithdrawWayEnum
.
ZDDK
)
if
(
model
.
WithdrawalWay
==
DistrbutorWithdrawWayEnum
.
ZDDK
)
{
{
var
mallModel
=
userModule
.
GetMiniProgramExtend
(
MallBaseId
);
int
IsNormalServer
=
Convert
.
ToInt32
(
new
ConfigurationBuilder
().
Add
(
new
JsonConfigurationSource
{
Path
=
"appsettings.json"
}).
Build
().
GetSection
(
"IsNormalServer"
).
Value
);
var
umodel
=
userModule
.
GetMemberUserInfo
(
model
.
UserId
??
0
);
if
(
IsNormalServer
==
1
)
var
flag
=
App_Code
.
PayUtil
.
GetTransfersOrder
(
model
.
OrderNum
,
model
.
RemitMoney
??
0
,
(
model
.
UserId
??
0
).
ToString
(),
umodel
.
OpenId
,
mallModel
,
_accessor
);
if
(
flag
)
{
{
var
mallModel
=
userModule
.
GetMiniProgramExtend
(
MallBaseId
);
var
umodel
=
userModule
.
GetMemberUserInfo
(
model
.
UserId
??
0
);
var
flag
=
App_Code
.
PayUtil
.
GetTransfersOrder
(
model
.
OrderNum
,
model
.
RemitMoney
??
0
,
(
model
.
UserId
??
0
).
ToString
(),
umodel
.
OpenId
,
mallModel
,
_accessor
);
if
(
flag
)
{
string
msg1
=
userModule
.
SetDistributorRemitAudit
(
RemitId
,
2
,
Remark
,
TenantId
.
ToString
(),
MallBaseId
);
if
(
msg1
!=
""
)
{
LogHelper
.
Write
(
"提现:"
+
RemitId
+
",失败"
);
}
return
ApiResult
.
Success
();
}
else
{
userModule
.
SetDistributorRemitRemark
(
RemitId
,
"ERP打款失败,请手动操作打款"
);
return
ApiResult
.
Failed
(
"支付失败"
);
}
}
else
{
string
msg1
=
userModule
.
SetDistributorRemitAudit
(
RemitId
,
2
,
Remark
,
TenantId
.
ToString
(),
MallBaseId
);
string
msg1
=
userModule
.
SetDistributorRemitAudit
(
RemitId
,
2
,
Remark
,
TenantId
.
ToString
(),
MallBaseId
);
if
(
msg1
!=
""
)
if
(
msg1
!=
""
)
{
{
LogHelper
.
Write
(
"提现:"
+
RemitId
+
",失败"
);
return
ApiResult
.
Failed
(
"提现:"
+
RemitId
+
",失败"
);
}
}
return
ApiResult
.
Success
();
return
ApiResult
.
Success
();
}
}
else
{
userModule
.
SetDistributorRemitRemark
(
RemitId
,
"ERP打款失败,请手动操作打款"
);
return
ApiResult
.
Failed
(
"支付失败"
);
}
}
}
else
else
{
{
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
610a5491
...
@@ -17,6 +17,8 @@ using Mall.Common;
...
@@ -17,6 +17,8 @@ using Mall.Common;
using
Mall.Module.Product
;
using
Mall.Module.Product
;
using
Mall.Common.Enum.Goods
;
using
Mall.Common.Enum.Goods
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.Extensions.Configuration
;
using
Microsoft.Extensions.Configuration.Json
;
namespace
Mall.WebApi.Controllers.MallBase
namespace
Mall.WebApi.Controllers.MallBase
{
{
...
@@ -665,14 +667,48 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -665,14 +667,48 @@ namespace Mall.WebApi.Controllers.MallBase
if
(
omodel
.
IsApplyForCancel
!=
1
)
{
if
(
omodel
.
IsApplyForCancel
!=
1
)
{
return
ApiResult
.
Failed
(
"该订单未申请取消该订单"
);
return
ApiResult
.
Failed
(
"该订单未申请取消该订单"
);
}
}
int
IsNormalServer
=
Convert
.
ToInt32
(
new
ConfigurationBuilder
().
Add
(
new
JsonConfigurationSource
{
Path
=
"appsettings.json"
}).
Build
().
GetSection
(
"IsNormalServer"
).
Value
);
bool
flag
=
orderModule
.
SetOrderApplyForCancelAudit
(
omodel
,
Type
,
Remark
,
req
.
TenantId
,
req
.
MallBaseId
);
if
(
Type
==
1
&&
IsNormalServer
==
1
)
if
(
flag
)
{
{
return
ApiResult
.
Success
();
//获取小程序信息
var
mallModel
=
orderModule
.
GetMiniProgramExtend
(
req
.
MallBaseId
);
int
RefundNum
=
orderModule
.
GetOrderRefundOnlineTradeNum
(
OrderId
,
req
.
TenantId
,
req
.
MallBaseId
);
string
RefundOrderNo
=
omodel
.
OrderNo
+
(
RefundNum
+
1
);
var
pram
=
new
Common
.
Pay
.
WeChatPat
.
PayParam
()
{
TotalFee
=
Convert
.
ToInt32
((
omodel
.
Income
??
0
)
*
100
),
RefundFee
=
(
omodel
.
Income
??
0
),
OrderNumber
=
omodel
.
MerchantsNo
,
RefundNumber
=
RefundOrderNo
};
var
Robj
=
new
App_Code
.
PayUtil
().
Refund
(
pram
,
mallModel
,
_accessor
);
if
(
Robj
.
IsSuccess
)
{
bool
flag
=
orderModule
.
SetOrderApplyForCancelAudit
(
omodel
,
Type
,
Remark
,
req
.
TenantId
,
req
.
MallBaseId
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
else
{
return
ApiResult
.
Failed
();
}
}
}
else
{
else
return
ApiResult
.
Failed
();
{
bool
flag
=
orderModule
.
SetOrderApplyForCancelAudit
(
omodel
,
Type
,
Remark
,
req
.
TenantId
,
req
.
MallBaseId
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
}
}
}
...
@@ -1418,27 +1454,43 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -1418,27 +1454,43 @@ namespace Mall.WebApi.Controllers.MallBase
if
(
orderModel
==
null
)
{
if
(
orderModel
==
null
)
{
return
ApiResult
.
Failed
(
"未查询到订单信息"
);
return
ApiResult
.
Failed
(
"未查询到订单信息"
);
}
}
//获取小程序信息
int
IsNormalServer
=
Convert
.
ToInt32
(
new
ConfigurationBuilder
().
Add
(
new
JsonConfigurationSource
{
Path
=
"appsettings.json"
}).
Build
().
GetSection
(
"IsNormalServer"
).
Value
);
var
mallModel
=
orderModule
.
GetMiniProgramExtend
(
req
.
MallBaseId
);
if
(
IsNormalServer
==
1
)
int
RefundNum
=
orderModule
.
GetOrderRefundOnlineTradeNum
(
ReModel
.
OrderId
??
0
,
req
.
TenantId
,
req
.
MallBaseId
);
string
RefundOrderNo
=
orderModel
.
OrderNo
+
(
RefundNum
+
1
);
var
pram
=
new
Common
.
Pay
.
WeChatPat
.
PayParam
()
{
{
TotalFee
=
Convert
.
ToInt32
(
Refund
*
100
),
//获取小程序信息
RefundFee
=
Refund
,
var
mallModel
=
orderModule
.
GetMiniProgramExtend
(
req
.
MallBaseId
);
OrderNumber
=
orderModel
.
MerchantsNo
,
int
RefundNum
=
orderModule
.
GetOrderRefundOnlineTradeNum
(
ReModel
.
OrderId
??
0
,
req
.
TenantId
,
req
.
MallBaseId
);
RefundNumber
=
RefundOrderNo
string
RefundOrderNo
=
orderModel
.
OrderNo
+
(
RefundNum
+
1
);
};
var
pram
=
new
Common
.
Pay
.
WeChatPat
.
PayParam
()
var
Robj
=
new
App_Code
.
PayUtil
().
Refund
(
pram
,
mallModel
,
_accessor
);
{
if
(
Robj
.
IsSuccess
)
{
TotalFee
=
Convert
.
ToInt32
(
Refund
*
100
),
RefundFee
=
Refund
,
OrderNumber
=
orderModel
.
MerchantsNo
,
RefundNumber
=
RefundOrderNo
};
var
Robj
=
new
App_Code
.
PayUtil
().
Refund
(
pram
,
mallModel
,
_accessor
);
if
(
Robj
.
IsSuccess
)
{
bool
flag
=
orderModule
.
SetOrderAfterSaleForRefunds
(
ReOrderId
,
Refund
,
req
.
TenantId
,
req
.
MallBaseId
);
if
(
flag
==
false
)
{
//日志记录
LogHelper
.
Write
(
"售后订单:"
+
ReOrderId
+
",金额:"
+
Refund
+
" 退款记录失败"
);
}
return
ApiResult
.
Success
(
""
);
}
return
ApiResult
.
Failed
();
}
else
{
bool
flag
=
orderModule
.
SetOrderAfterSaleForRefunds
(
ReOrderId
,
Refund
,
req
.
TenantId
,
req
.
MallBaseId
);
bool
flag
=
orderModule
.
SetOrderAfterSaleForRefunds
(
ReOrderId
,
Refund
,
req
.
TenantId
,
req
.
MallBaseId
);
if
(
flag
==
false
)
{
if
(
flag
)
//日志记录
{
LogHelper
.
Write
(
"售后订单:"
+
ReOrderId
+
",金额:"
+
Refund
+
" 退款记录失败"
);
return
ApiResult
.
Success
(
""
);
}
else
{
return
ApiResult
.
Failed
();
}
}
return
ApiResult
.
Success
(
""
);
}
}
return
ApiResult
.
Failed
();
}
}
...
...
Mall.WebApi/Controllers/User/UserController.cs
View file @
610a5491
...
@@ -16,6 +16,8 @@ using Newtonsoft.Json.Linq;
...
@@ -16,6 +16,8 @@ using Newtonsoft.Json.Linq;
using
Mall.Common
;
using
Mall.Common
;
using
Microsoft.AspNetCore.Authorization
;
using
Microsoft.AspNetCore.Authorization
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.Extensions.Configuration
;
using
Microsoft.Extensions.Configuration.Json
;
namespace
Mall.WebApi.Controllers.User
namespace
Mall.WebApi.Controllers.User
{
{
...
@@ -1813,21 +1815,34 @@ namespace Mall.WebApi.Controllers.User
...
@@ -1813,21 +1815,34 @@ namespace Mall.WebApi.Controllers.User
//执行发放金额
//执行发放金额
if
(
model
.
WithdrawalWay
==
DistrbutorWithdrawWayEnum
.
ZDDK
)
if
(
model
.
WithdrawalWay
==
DistrbutorWithdrawWayEnum
.
ZDDK
)
{
{
var
mallModel
=
userModule
.
GetMiniProgramExtend
(
re
.
MallBaseId
);
int
IsNormalServer
=
Convert
.
ToInt32
(
new
ConfigurationBuilder
().
Add
(
new
JsonConfigurationSource
{
Path
=
"appsettings.json"
}).
Build
().
GetSection
(
"IsNormalServer"
).
Value
);
var
umodel
=
userModule
.
GetMemberUserInfo
(
model
.
UserId
??
0
);
if
(
IsNormalServer
==
1
)
var
flag
=
App_Code
.
PayUtil
.
GetTransfersOrder
(
model
.
OrderNum
,
model
.
RemitMoney
??
0
,
(
model
.
UserId
??
0
).
ToString
(),
umodel
.
OpenId
,
mallModel
,
_accessor
);
if
(
flag
)
{
{
var
mallModel
=
userModule
.
GetMiniProgramExtend
(
re
.
MallBaseId
);
var
umodel
=
userModule
.
GetMemberUserInfo
(
model
.
UserId
??
0
);
var
flag
=
App_Code
.
PayUtil
.
GetTransfersOrder
(
model
.
OrderNum
,
model
.
RemitMoney
??
0
,
(
model
.
UserId
??
0
).
ToString
(),
umodel
.
OpenId
,
mallModel
,
_accessor
);
if
(
flag
)
{
string
msg1
=
userModule
.
SetDistributorRemitAudit
(
RemitId
,
Type
,
Remark
,
re
.
uid
,
re
.
MallBaseId
);
if
(
msg1
!=
""
)
{
LogHelper
.
Write
(
"提现:"
+
RemitId
+
",失败"
);
}
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
(
"支付失败"
);
}
}
else
{
string
msg1
=
userModule
.
SetDistributorRemitAudit
(
RemitId
,
Type
,
Remark
,
re
.
uid
,
re
.
MallBaseId
);
string
msg1
=
userModule
.
SetDistributorRemitAudit
(
RemitId
,
Type
,
Remark
,
re
.
uid
,
re
.
MallBaseId
);
if
(
msg1
!=
""
)
if
(
msg1
!=
""
)
{
{
LogHelper
.
Write
(
"提现:"
+
RemitId
+
",失败"
);
return
ApiResult
.
Failed
(
"提现:"
+
RemitId
+
",失败"
);
}
}
return
ApiResult
.
Success
();
return
ApiResult
.
Success
();
}
}
else
{
return
ApiResult
.
Failed
(
"支付失败"
);
}
}
}
else
else
{
{
...
...
Mall.WebApi/appsettings.json
View file @
610a5491
...
@@ -41,6 +41,7 @@
...
@@ -41,6 +41,7 @@
},
},
"VirtualDirectory"
:
"WebFile"
,
"VirtualDirectory"
:
"WebFile"
,
"FileService"
:
"2"
,
"FileService"
:
"2"
,
"IsNormalServer"
:
2
,
"FinanceSetting"
:
{
"FinanceSetting"
:
{
"TenantId"
:
1
,
"TenantId"
:
1
,
"MallBaseId"
:
1
,
"MallBaseId"
:
1
,
...
...
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