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
01839bcb
Commit
01839bcb
authored
Mar 04, 2021
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'sdzq-ld' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
into sdzq
parents
376c0356
bcda054a
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 @
01839bcb
...
...
@@ -203,6 +203,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
,
...
...
@@ -218,7 +220,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
};
}
...
...
@@ -557,8 +559,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