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
134fb6cd
Commit
134fb6cd
authored
Jun 28, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的团队 取消分销商条件
parent
d258fc7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
RB_Member_UserRepository.cs
Mall.Repository/User/RB_Member_UserRepository.cs
+6
-6
No files found.
Mall.Repository/User/RB_Member_UserRepository.cs
View file @
134fb6cd
...
...
@@ -349,7 +349,7 @@ WHERE u.TenantId={tenantId} and u.MallBaseId={mallBaseId} and u.SuperiorId in ({
if
(
tier
==
1
)
{
string
sql
=
$@"SELECT COUNT(0) AS ReferralsNum FROM rb_member_user u
WHERE u.TenantId=
{
tenantId
}
and u.MallBaseId=
{
mallBaseId
}
and u.SuperiorId =
{
uid
}
and u.IsDistributor=1
"
;
WHERE u.TenantId=
{
tenantId
}
and u.MallBaseId=
{
mallBaseId
}
and u.SuperiorId =
{
uid
}
"
;
var
obj
=
ExecuteScalar
(
sql
);
if
(
obj
!=
null
)
{
return
Convert
.
ToInt32
(
obj
);
}
else
{
return
0
;
}
}
...
...
@@ -357,7 +357,7 @@ WHERE u.TenantId={tenantId} and u.MallBaseId={mallBaseId} and u.SuperiorId ={uid
{
string
sql
=
$@"SELECT COUNT(0) AS ReferralsNum FROM rb_member_user u
INNER JOIN rb_member_user u1 on u.Id=u1.SuperiorId
WHERE u.TenantId=
{
tenantId
}
and u.MallBaseId=
{
mallBaseId
}
and u.SuperiorId =
{
uid
}
and u1.IsDistributor=1
"
;
WHERE u.TenantId=
{
tenantId
}
and u.MallBaseId=
{
mallBaseId
}
and u.SuperiorId =
{
uid
}
"
;
var
obj
=
ExecuteScalar
(
sql
);
if
(
obj
!=
null
)
{
return
Convert
.
ToInt32
(
obj
);
}
else
{
return
0
;
}
}
...
...
@@ -366,7 +366,7 @@ WHERE u.TenantId={tenantId} and u.MallBaseId={mallBaseId} and u.SuperiorId ={uid
string
sql
=
$@"SELECT COUNT(0) AS ReferralsNum FROM rb_member_user u
INNER JOIN rb_member_user u1 on u.Id=u1.SuperiorId
INNER JOIN rb_member_user u2 on u1.Id=u2.SuperiorId
WHERE u.TenantId=
{
tenantId
}
and u.MallBaseId=
{
mallBaseId
}
and u.SuperiorId =
{
uid
}
and u2.IsDistributor=1
"
;
WHERE u.TenantId=
{
tenantId
}
and u.MallBaseId=
{
mallBaseId
}
and u.SuperiorId =
{
uid
}
"
;
var
obj
=
ExecuteScalar
(
sql
);
if
(
obj
!=
null
)
{
return
Convert
.
ToInt32
(
obj
);
}
else
{
return
0
;
}
}
...
...
@@ -400,20 +400,20 @@ WHERE u.TenantId={tenantId} and u.MallBaseId={mallBaseId} and u.SuperiorId ={uid
if
(
demodel
.
GradeId
==
1
)
{
sql
=
$@"SELECT u.* FROM rb_member_user u
WHERE u.TenantId=
{
demodel
.
TenantId
}
and u.MallBaseId=
{
demodel
.
MallBaseId
}
and u.SuperiorId =
{
demodel
.
UserId
}
and u.IsDistributor=1
"
;
WHERE u.TenantId=
{
demodel
.
TenantId
}
and u.MallBaseId=
{
demodel
.
MallBaseId
}
and u.SuperiorId =
{
demodel
.
UserId
}
"
;
}
else
if
(
demodel
.
GradeId
==
2
)
{
sql
=
$@"SELECT u1.* FROM rb_member_user u
INNER JOIN rb_member_user u1 on u.Id=u1.SuperiorId
WHERE u.TenantId=
{
demodel
.
TenantId
}
and u.MallBaseId=
{
demodel
.
MallBaseId
}
and u.SuperiorId =
{
demodel
.
UserId
}
and u1.IsDistributor=1
"
;
WHERE u.TenantId=
{
demodel
.
TenantId
}
and u.MallBaseId=
{
demodel
.
MallBaseId
}
and u.SuperiorId =
{
demodel
.
UserId
}
"
;
}
else
if
(
demodel
.
GradeId
==
3
)
{
sql
=
$@"SELECT u2.* FROM rb_member_user u
INNER JOIN rb_member_user u1 on u.Id=u1.SuperiorId
INNER JOIN rb_member_user u2 on u1.Id=u2.SuperiorId
WHERE u.TenantId=
{
demodel
.
TenantId
}
and u.MallBaseId=
{
demodel
.
MallBaseId
}
and u.SuperiorId =
{
demodel
.
UserId
}
and u2.IsDistributor=1
"
;
WHERE u.TenantId=
{
demodel
.
TenantId
}
and u.MallBaseId=
{
demodel
.
MallBaseId
}
and u.SuperiorId =
{
demodel
.
UserId
}
"
;
}
return
GetPage
<
RB_Member_User_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
...
...
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