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
e6c049f0
Commit
e6c049f0
authored
Jun 12, 2020
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
8a2486b1
81740e10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
370 additions
and
128 deletions
+370
-128
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+169
-5
ERPOrderCommissionController.cs
...ebApi/Controllers/Finance/ERPOrderCommissionController.cs
+22
-10
MallController.cs
Mall.WebApi/Controllers/Mall/MallController.cs
+41
-41
MallHelper.cs
Mall.WebApi/Controllers/Mall/MallHelper.cs
+39
-41
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 @
e6c049f0
This diff is collapsed.
Click to expand it.
Mall.WebApi/Controllers/Finance/ERPOrderCommissionController.cs
View file @
e6c049f0
...
...
@@ -157,6 +157,9 @@ namespace Mall.WebApi.Controllers.Finance
}
//执行发放金额
if
(
model
.
WithdrawalWay
==
DistrbutorWithdrawWayEnum
.
ZDDK
)
{
int
IsNormalServer
=
Convert
.
ToInt32
(
new
ConfigurationBuilder
().
Add
(
new
JsonConfigurationSource
{
Path
=
"appsettings.json"
}).
Build
().
GetSection
(
"IsNormalServer"
).
Value
);
if
(
IsNormalServer
==
1
)
{
var
mallModel
=
userModule
.
GetMiniProgramExtend
(
MallBaseId
);
var
umodel
=
userModule
.
GetMemberUserInfo
(
model
.
UserId
??
0
);
...
...
@@ -176,6 +179,15 @@ namespace Mall.WebApi.Controllers.Finance
return
ApiResult
.
Failed
(
"支付失败"
);
}
}
else
{
string
msg1
=
userModule
.
SetDistributorRemitAudit
(
RemitId
,
2
,
Remark
,
TenantId
.
ToString
(),
MallBaseId
);
if
(
msg1
!=
""
)
{
return
ApiResult
.
Failed
(
"提现:"
+
RemitId
+
",失败"
);
}
return
ApiResult
.
Success
();
}
}
else
{
return
ApiResult
.
Failed
(
"暂不支持该类型打款"
);
...
...
Mall.WebApi/Controllers/Mall/MallController.cs
View file @
e6c049f0
...
...
@@ -94,12 +94,6 @@ namespace Mall.WebApi.Controllers.MallBase
Common
.
Plugin
.
LogHelper
.
Error
(
"MallController_GetHome"
,
ex
);
}
//获取小程序信息
var
miniProgram
=
new
RB_MiniProgram_Extend
();
if
(
MiniAppId
!=
null
&&
!
string
.
IsNullOrEmpty
(
MiniAppId
))
{
miniProgram
=
programModule
.
GetMiniProgramModule
(
new
Model
.
Extend
.
User
.
RB_MiniProgram_Extend
()
{
MiniAppId
=
MiniAppId
},
isGetHomeData
:
true
,
isGetNav
:
1
);
}
int
page_id
=
parms
.
GetInt
(
"page_id"
);
//首页数据
var
homePage
=
new
object
();
...
...
@@ -119,6 +113,20 @@ namespace Mall.WebApi.Controllers.MallBase
var
user_info
=
new
object
();
//小程序
var
mall
=
new
object
();
//获取小程序信息
var
miniProgram
=
new
RB_MiniProgram_Extend
();
if
(
MiniAppId
!=
null
&&
!
string
.
IsNullOrEmpty
(
MiniAppId
))
{
miniProgram
=
programModule
.
GetMiniProgramModule
(
new
Model
.
Extend
.
User
.
RB_MiniProgram_Extend
()
{
MiniAppId
=
MiniAppId
},
isGetHomeData
:
true
,
isGetNav
:
1
);
//基础配置
setting
=
MallHelper
.
GetBasicSetting
(
miniProgram
);
//分销基础信息
share_setting
=
MallHelper
.
GetDistributorBasicsInfo
(
miniProgram
);
//分销商设置
share_setting_custom
=
MallHelper
.
GetDistributorCustomInfo
(
miniProgram
);
}
if
(
page_id
>
0
)
{
var
targetPage
=
miniprogramPageTemplModule
.
GetMiniprogramPageTemplModule
(
new
RB_Miniprogram_Page_Templ_Extend
()
...
...
@@ -342,14 +350,14 @@ namespace Mall.WebApi.Controllers.MallBase
};
}
}
//基础配置
setting
=
MallHelper
.
GetBasicSetting
(
miniProgram
);
//分销基础信息
share_setting
=
MallHelper
.
GetDistributorBasicsInfo
(
miniProgram
);
//分销商设置
share_setting_custom
=
MallHelper
.
GetDistributorCustomInfo
(
miniProgram
);
}
if
(
RequestParm
.
OpenId
!=
null
&&
!
string
.
IsNullOrWhiteSpace
(
RequestParm
.
OpenId
))
{
var
memberModel
=
userModule
.
GetAppletUserCenterStatistics
(
RequestParm
.
OpenId
);
user_info
=
memberModel
;
}
}
#
region
商品分类样式
var
productCategoryStyle
=
productModule
.
GetProductCategoryStyleInfo
(
miniProgram
.
TenantId
??
0
,
miniProgram
.
MallBaseId
);
cat_style
=
new
...
...
@@ -377,14 +385,6 @@ namespace Mall.WebApi.Controllers.MallBase
option
=
new
List
<
object
>(),
setting
,
};
}
if
(
RequestParm
.
OpenId
!=
null
&&
!
string
.
IsNullOrWhiteSpace
(
RequestParm
.
OpenId
))
{
var
memberModel
=
userModule
.
GetAppletUserCenterStatistics
(
RequestParm
.
OpenId
);
user_info
=
memberModel
;
}
}
var
miniPageList
=
programPageModule
.
GetMiniprogram_Page_ListExtModule
(
new
RB_MiniProgram_Page_Extend
()
{
MallBaseId
=
RequestParm
.
MallBaseId
});
var
objResult
=
new
...
...
Mall.WebApi/Controllers/Mall/MallHelper.cs
View file @
e6c049f0
...
...
@@ -1594,8 +1594,7 @@ namespace Mall.WebApi.Controllers
}
//商城风格
var
mallStyle
=
new
object
();
if
(
miniProgram
?.
MallShopStyle
>
0
)
{
ResultMallShopStyle
resultMallShopStyle
=
new
ResultMallShopStyle
();
switch
(
miniProgram
.
MallShopStyle
)
{
...
...
@@ -1635,7 +1634,6 @@ namespace Mall.WebApi.Controllers
resultMallShopStyle
?.
main
,
resultMallShopStyle
?.
secondary
,
};
}
var
setting
=
new
{
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
e6c049f0
...
...
@@ -17,6 +17,8 @@ using Mall.Common;
using
Mall.Module.Product
;
using
Mall.Common.Enum.Goods
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.Extensions.Configuration
;
using
Microsoft.Extensions.Configuration.Json
;
namespace
Mall.WebApi.Controllers.MallBase
{
...
...
@@ -665,16 +667,50 @@ namespace Mall.WebApi.Controllers.MallBase
if
(
omodel
.
IsApplyForCancel
!=
1
)
{
return
ApiResult
.
Failed
(
"该订单未申请取消该订单"
);
}
int
IsNormalServer
=
Convert
.
ToInt32
(
new
ConfigurationBuilder
().
Add
(
new
JsonConfigurationSource
{
Path
=
"appsettings.json"
}).
Build
().
GetSection
(
"IsNormalServer"
).
Value
);
if
(
Type
==
1
&&
IsNormalServer
==
1
)
{
//获取小程序信息
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
{
bool
flag
=
orderModule
.
SetOrderApplyForCancelAudit
(
omodel
,
Type
,
Remark
,
req
.
TenantId
,
req
.
MallBaseId
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
}
/// <summary>
/// 清空回收站
...
...
@@ -1418,6 +1454,9 @@ namespace Mall.WebApi.Controllers.MallBase
if
(
orderModel
==
null
)
{
return
ApiResult
.
Failed
(
"未查询到订单信息"
);
}
int
IsNormalServer
=
Convert
.
ToInt32
(
new
ConfigurationBuilder
().
Add
(
new
JsonConfigurationSource
{
Path
=
"appsettings.json"
}).
Build
().
GetSection
(
"IsNormalServer"
).
Value
);
if
(
IsNormalServer
==
1
)
{
//获取小程序信息
var
mallModel
=
orderModule
.
GetMiniProgramExtend
(
req
.
MallBaseId
);
int
RefundNum
=
orderModule
.
GetOrderRefundOnlineTradeNum
(
ReModel
.
OrderId
??
0
,
req
.
TenantId
,
req
.
MallBaseId
);
...
...
@@ -1430,9 +1469,11 @@ namespace Mall.WebApi.Controllers.MallBase
RefundNumber
=
RefundOrderNo
};
var
Robj
=
new
App_Code
.
PayUtil
().
Refund
(
pram
,
mallModel
,
_accessor
);
if
(
Robj
.
IsSuccess
)
{
if
(
Robj
.
IsSuccess
)
{
bool
flag
=
orderModule
.
SetOrderAfterSaleForRefunds
(
ReOrderId
,
Refund
,
req
.
TenantId
,
req
.
MallBaseId
);
if
(
flag
==
false
)
{
if
(
flag
==
false
)
{
//日志记录
LogHelper
.
Write
(
"售后订单:"
+
ReOrderId
+
",金额:"
+
Refund
+
" 退款记录失败"
);
}
...
...
@@ -1440,6 +1481,17 @@ namespace Mall.WebApi.Controllers.MallBase
}
return
ApiResult
.
Failed
();
}
else
{
bool
flag
=
orderModule
.
SetOrderAfterSaleForRefunds
(
ReOrderId
,
Refund
,
req
.
TenantId
,
req
.
MallBaseId
);
if
(
flag
)
{
return
ApiResult
.
Success
(
""
);
}
else
{
return
ApiResult
.
Failed
();
}
}
}
...
...
Mall.WebApi/Controllers/User/UserController.cs
View file @
e6c049f0
...
...
@@ -16,6 +16,8 @@ using Newtonsoft.Json.Linq;
using
Mall.Common
;
using
Microsoft.AspNetCore.Authorization
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.Extensions.Configuration
;
using
Microsoft.Extensions.Configuration.Json
;
namespace
Mall.WebApi.Controllers.User
{
...
...
@@ -1812,6 +1814,9 @@ namespace Mall.WebApi.Controllers.User
}
//执行发放金额
if
(
model
.
WithdrawalWay
==
DistrbutorWithdrawWayEnum
.
ZDDK
)
{
int
IsNormalServer
=
Convert
.
ToInt32
(
new
ConfigurationBuilder
().
Add
(
new
JsonConfigurationSource
{
Path
=
"appsettings.json"
}).
Build
().
GetSection
(
"IsNormalServer"
).
Value
);
if
(
IsNormalServer
==
1
)
{
var
mallModel
=
userModule
.
GetMiniProgramExtend
(
re
.
MallBaseId
);
var
umodel
=
userModule
.
GetMemberUserInfo
(
model
.
UserId
??
0
);
...
...
@@ -1825,10 +1830,20 @@ namespace Mall.WebApi.Controllers.User
}
return
ApiResult
.
Success
();
}
else
{
else
{
return
ApiResult
.
Failed
(
"支付失败"
);
}
}
else
{
string
msg1
=
userModule
.
SetDistributorRemitAudit
(
RemitId
,
Type
,
Remark
,
re
.
uid
,
re
.
MallBaseId
);
if
(
msg1
!=
""
)
{
return
ApiResult
.
Failed
(
"提现:"
+
RemitId
+
",失败"
);
}
return
ApiResult
.
Success
();
}
}
else
{
return
ApiResult
.
Failed
(
"暂不支持该类型打款"
);
...
...
Mall.WebApi/appsettings.json
View file @
e6c049f0
...
...
@@ -41,6 +41,7 @@
},
"VirtualDirectory"
:
"WebFile"
,
"FileService"
:
"2"
,
"IsNormalServer"
:
2
,
"FinanceSetting"
:
{
"TenantId"
:
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