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
5bf7c754
Commit
5bf7c754
authored
Aug 28, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
b4299caf
38130ae7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
6 deletions
+32
-6
UserModule.cs
Mall.Module.User/UserModule.cs
+11
-1
RB_GoodsRepository.cs
Mall.Repository/Product/RB_GoodsRepository.cs
+11
-5
AppletUserController.cs
Mall.WebApi/Controllers/User/AppletUserController.cs
+10
-0
No files found.
Mall.Module.User/UserModule.cs
View file @
5bf7c754
...
...
@@ -3420,6 +3420,16 @@ namespace Mall.Module.User
};
}
/// <summary>
/// 获取用户列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Member_User_Extend
>
GetUserListExtModule
(
RB_Member_User_Extend
dmodel
)
{
return
member_UserRepository
.
GetListExtRepository
(
dmodel
);
}
/// <summary>
/// 获取团队成员详情
/// </summary>
...
...
@@ -3427,7 +3437,7 @@ namespace Mall.Module.User
/// <returns></returns>
public
object
GetTeamUserInfoModule
(
int
UserId
)
{
var
extModel
=
member_UserRepository
.
GetListExtRepository
(
new
RB_Member_User_Extend
()
{
UserIds
=
UserId
.
ToString
()
})?.
FirstOrDefault
();
var
extModel
=
GetUserListExtModule
(
new
RB_Member_User_Extend
()
{
UserIds
=
UserId
.
ToString
()
})?.
FirstOrDefault
();
List
<
RB_Member_User_Extend
>
totalList
=
new
List
<
RB_Member_User_Extend
>();
//本月佣金
List
<
RB_Member_User_Extend
>
currentMonthList
=
new
List
<
RB_Member_User_Extend
>();
...
...
Mall.Repository/Product/RB_GoodsRepository.cs
View file @
5bf7c754
...
...
@@ -436,12 +436,12 @@ WHERE {where} group by g.Id order by g.CreateDate desc";
//销量高=>低【降序】
else
if
(
dmodel
.
OrderBy
==
4
)
{
orderBy
=
$" order by
g.
{
nameof
(
RB_Goods_Extend
.
SalesNum
)}
DESC "
;
orderBy
=
$" order by
(g.SalesNum+IFNULL(tempOrder.OrderNum,0))
DESC "
;
}
//销量低=>高【升序】
else
if
(
dmodel
.
OrderBy
==
6
)
{
orderBy
=
$" order by
g.
{
nameof
(
RB_Goods_Extend
.
SalesNum
)}
ASC "
;
orderBy
=
$" order by
(g.SalesNum+IFNULL(tempOrder.OrderNum,0))
ASC "
;
}
//综合【降序】
else
if
(
dmodel
.
OrderBy
==
7
)
...
...
@@ -467,9 +467,15 @@ WHERE {where} group by g.Id order by g.CreateDate desc";
}
}
string
sql
=
$@"select g.* from RB_Goods g
inner join rb_goods_category c on g.Id=c.GoodsId
where
{
where
}
group by g.Id
{
orderBy
}
"
;
string
sql
=
$@"
SELECT g.*
FROM RB_Goods g INNER JOIN rb_goods_category c on g.Id=c.GoodsId
LEFT JOIN (
SELECT od.GoodsId ,SUM(od.Number) as OrderNum FROM rb_goods_order o
INNER JOIN rb_goods_orderdetail od on o.OrderId=od.OrderId
WHERE 1=1 and o.`Status`=0 and o.OrderStatus <> 7 group by od.GoodsId
) AS tempOrder ON g.Id=tempOrder.GoodsId
WHERE
{
where
}
group by g.Id
{
orderBy
}
"
;
return
GetPage
<
RB_Goods_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
...
...
Mall.WebApi/Controllers/User/AppletUserController.cs
View file @
5bf7c754
...
...
@@ -1713,7 +1713,16 @@ namespace Mall.WebApi.Controllers.User
{
demodel
.
UserId
=
parms
.
GetInt
(
"NewUserId"
);
}
List
<
RB_Member_User_Extend
>
memberList
=
new
List
<
RB_Member_User_Extend
>();
var
list
=
userModule
.
GetOrderIntroductionPageList
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
var
userIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
UserId
));
if
(!
string
.
IsNullOrWhiteSpace
(
userIds
))
{
memberList
=
userModule
.
GetUserListExtModule
(
new
RB_Member_User_Extend
()
{
UserIds
=
userIds
});
}
}
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
.
Select
(
x
=>
new
{
...
...
@@ -1732,6 +1741,7 @@ namespace Mall.WebApi.Controllers.User
y
.
Number
}),
x
.
UserId
,
Icon
=
memberList
?.
Where
(
qitem
=>
qitem
.
Id
==
x
.
UserId
)?.
FirstOrDefault
()?.
Icon
??
""
,
x
.
UserName
,
x
.
Photo
,
x
.
Mobile
,
...
...
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