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
bcda054a
Commit
bcda054a
authored
Mar 04, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
9e8478ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
MiaiModule.cs
Mall.Module.Miai/MiaiModule.cs
+9
-2
No files found.
Mall.Module.Miai/MiaiModule.cs
View file @
bcda054a
...
...
@@ -185,6 +185,8 @@ namespace Mall.Module.Miai
int
Sex
=
miai_BaseInfoRepository
.
GetBaseInfoList
(
new
RB_MiAi_BaseInfo_Extend
()
{
TenantId
=
userInfo
.
TenantId
,
UserId
=
model
.
UserId
}).
FirstOrDefault
()?.
Sex
??
0
;
//查询当前用户是否已关注
bool
IsFocus
=
miai_FollowMemberRepository
.
GetFollowMemberList
(
new
RB_MiAi_FollowMember_Extend
()
{
TenantId
=
userInfo
.
TenantId
,
UserId
=
model
.
UserId
,
CreateBy
=
userInfo
.
UserId
}).
Any
();
//查询是否已关注我
bool
IsFocus2
=
miai_FollowMemberRepository
.
GetFollowMemberList
(
new
RB_MiAi_FollowMember_Extend
()
{
TenantId
=
userInfo
.
TenantId
,
UserId
=
userInfo
.
UserId
,
CreateBy
=
model
.
UserId
}).
Any
();
return
new
{
model
.
Id
,
...
...
@@ -200,7 +202,7 @@ namespace Mall.Module.Miai
CreateDate
=
model
.
CreateDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
PeopleNum
,
IsEnroll
,
IsFocus
,
IsFocus
=
IsFocus
==
true
&&
IsFocus2
==
true
?
2
:
IsFocus
==
true
?
1
:
0
,
ReplyNum
=
rlist
.
FirstOrDefault
()?.
ReplyNum
??
0
};
}
...
...
@@ -539,8 +541,13 @@ namespace Mall.Module.Miai
string
UserIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
UserId
).
Distinct
());
//查询当前用户是否已关注
var
flist
=
miai_FollowMemberRepository
.
GetFollowMemberList
(
new
RB_MiAi_FollowMember_Extend
()
{
TenantId
=
userInfo
.
TenantId
,
UserIds
=
UserIds
,
CreateBy
=
userInfo
.
UserId
});
//查询是否已关注我
var
flist2
=
miai_FollowMemberRepository
.
GetFollowMemberList
(
new
RB_MiAi_FollowMember_Extend
()
{
TenantId
=
userInfo
.
TenantId
,
UserId
=
userInfo
.
UserId
,
CreateByIds
=
UserIds
});
foreach
(
var
item
in
list
)
{
item
.
IsFocus
=
flist
.
Where
(
x
=>
x
.
UserId
==
item
.
UserId
).
Any
()
?
1
:
2
;
item
.
IsFocus
=
flist
.
Where
(
x
=>
x
.
UserId
==
item
.
UserId
).
Any
()
?
1
:
0
;
if
(
flist2
.
Where
(
x
=>
x
.
CreateBy
==
item
.
UserId
).
Any
()
&&
item
.
IsFocus
==
1
)
{
item
.
IsFocus
=
2
;
}
}
}
return
list
;
...
...
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