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
d13fa4b5
Commit
d13fa4b5
authored
Aug 14, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
7a9ad4e5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
94 additions
and
0 deletions
+94
-0
RB_Goods_Order_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Order_Extend.cs
+6
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+88
-0
No files found.
Mall.Model/Extend/Product/RB_Goods_Order_Extend.cs
View file @
d13fa4b5
...
...
@@ -92,6 +92,12 @@ namespace Mall.Model.Extend.Product
/// 订单返佣列表
/// </summary>
public
List
<
RB_Goods_OrderCommission_Extend
>
OrderCommissionList
{
get
;
set
;
}
/// <summary>
/// 订单返佣列表
/// </summary>
public
List
<
RB_SmallShops_Commission_Extend
>
SmallShopsCommissionOrderList
{
get
;
set
;
}
/// <summary>
/// 是否发放佣金 1是 2否
/// </summary>
...
...
Mall.Module.Product/OrderModule.cs
View file @
d13fa4b5
...
...
@@ -234,6 +234,14 @@ namespace Mall.Module.Product
/// </summary>
private
RB_Goods_OrderDetailFreeShippingRepository
orderDetailFreeShippingRepository
=
new
RB_Goods_OrderDetailFreeShippingRepository
();
/// <summary>
/// 全局包邮记录
/// </summary>
private
RB_SmallShops_CommissionRepository
smallShopsCommissionRepository
=
new
RB_SmallShops_CommissionRepository
();
#
region
购物车
/// <summary>
...
...
@@ -9433,5 +9441,85 @@ namespace Mall.Module.Product
}
#
endregion
#
region
店铺订单
/// <summary>
/// 获取分销订单
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="demodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_Order_Extend
>
GetSmallShopOrdersPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Goods_Order_Extend
demodel
)
{
var
list
=
goods_OrderRepository
.
GetSmallShopOrdersPageList
(
pageIndex
,
pageSize
,
out
count
,
demodel
);
if
(
list
.
Any
())
{
//查询订单明细
var
dlist
=
goods_OrderDetailRepository
.
GetOrderDetailList
(
new
RB_Goods_OrderDetail_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
OrderIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
OrderId
))
});
//查询图片
List
<
RB_Material_Info_Extend
>
Mlist
=
new
List
<
RB_Material_Info_Extend
>();
if
(
dlist
.
Any
())
{
foreach
(
var
item
in
dlist
)
{
item
.
CoverImagePath
=
item
.
CoverImage
;
}
}
string
areaIds1
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
Province
??
0
).
Distinct
());
string
areaIds2
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
City
??
0
).
Distinct
());
string
areaIds3
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
District
??
0
).
Distinct
());
string
areaIds
=
"0"
;
if
(!
string
.
IsNullOrEmpty
(
areaIds1
))
{
areaIds
+=
","
+
areaIds1
;
}
if
(!
string
.
IsNullOrEmpty
(
areaIds2
))
{
areaIds
+=
","
+
areaIds2
;
}
if
(!
string
.
IsNullOrEmpty
(
areaIds3
))
{
areaIds
+=
","
+
areaIds3
;
}
var
arealist
=
destinationRepository
.
GetDictvalueListForIds
(
areaIds
);
//分销情况
var
oclist
=
smallShopsCommissionRepository
.
GetListGroupByUser
(
new
RB_SmallShops_Commission_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
OrderIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
OrderId
))
});
if
(
oclist
.
Any
())
{
//获取用户
var
ulist
=
member_UserRepository
.
GetList
(
new
RB_Member_User_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
UserIds
=
string
.
Join
(
","
,
oclist
.
Select
(
x
=>
x
.
UserId
).
Distinct
())
});
//获取分销商
var
dislist
=
distributor_InfoRepository
.
GetList
(
new
RB_Distributor_Info_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
UserIds
=
string
.
Join
(
","
,
oclist
.
Select
(
x
=>
x
.
UserId
).
Distinct
())
});
foreach
(
var
item
in
oclist
)
{
var
umodel
=
ulist
.
Where
(
x
=>
x
.
Id
==
item
.
UserId
).
FirstOrDefault
();
item
.
UserName
=
umodel
?.
Name
??
""
;
item
.
Mobile
=
umodel
?.
Moblie
??
""
;
item
.
Name
=
dislist
.
Where
(
x
=>
x
.
UserId
==
item
.
UserId
).
FirstOrDefault
()?.
Name
??
""
;
}
}
foreach
(
var
item
in
list
)
{
item
.
DetailList
=
dlist
.
Where
(
x
=>
x
.
OrderId
==
item
.
OrderId
).
ToList
();
string
areaName
=
(
arealist
.
Where
(
x
=>
x
.
ID
==
item
.
Province
).
FirstOrDefault
()?.
Name
??
""
)
+
" "
+
(
arealist
.
Where
(
x
=>
x
.
ID
==
item
.
City
).
FirstOrDefault
()?.
Name
??
""
)
+
" "
+
(
arealist
.
Where
(
x
=>
x
.
ID
==
item
.
District
).
FirstOrDefault
()?.
Name
??
""
);
item
.
ShoppingAddress
=
areaName
+
" "
+
item
.
ShoppingAddress
;
item
.
SmallShopsCommissionOrderList
=
oclist
.
Where
(
x
=>
x
.
OrderId
==
item
.
OrderId
).
ToList
();
item
.
IsOrderCommission
=
2
;
if
(
item
.
SmallShopsCommissionOrderList
.
Where
(
x
=>
x
.
CommissionState
==
2
).
Any
())
{
item
.
IsOrderCommission
=
1
;
}
}
}
return
list
;
}
#
endregion
}
}
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