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
9b9a7d1c
Commit
9b9a7d1c
authored
Jan 13, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
353824aa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
26 deletions
+10
-26
RB_Education_FollowTeacherRepository.cs
...ository/Education/RB_Education_FollowTeacherRepository.cs
+1
-1
Rb_Education_DynamicRepository.cs
Mall.Repository/Education/Rb_Education_DynamicRepository.cs
+1
-1
AppletEducationController.cs
...WebApi/Controllers/Education/AppletEducationController.cs
+6
-6
AppletSchoolController.cs
Mall.WebApi/Controllers/Education/AppletSchoolController.cs
+2
-18
No files found.
Mall.Repository/Education/RB_Education_FollowTeacherRepository.cs
View file @
9b9a7d1c
...
...
@@ -105,7 +105,7 @@ on a.TeacherId=b.ID WHERE a.{nameof(RB_Education_FollowTeacher_Extend.Status)}=
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
@
$" SELECT a.*,b.OpenId FROM rb_education_followteacher as a LEFT JOIN rb_member_user as b
on
a
.
UserId
=
b
.
ID
WHERE
a
.{
nameof
(
RB_Education_FollowTeacher_Extend
.
Status
)}=
0
and
b
.{
nameof
(
RB_Education_Teacher_Extend
.
TeacherStatus
)}=
1
");
on
a
.
UserId
=
b
.
ID
WHERE
a
.{
nameof
(
RB_Education_FollowTeacher_Extend
.
Status
)}=
0
");
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
...
...
Mall.Repository/Education/Rb_Education_DynamicRepository.cs
View file @
9b9a7d1c
...
...
@@ -199,7 +199,7 @@ union all SELECT a.TenantId,a.MallBaseId,a.CreateBy,a.id,a.UserTeacher,a.Content
}
if
(
model
.
CreateBy
>
0
)
{
where
+=
$@" and a.CreateBy =
{
model
.
CreateBy
}
"
;
//
where += $@" and a.CreateBy = {model.CreateBy} ";
likeWhere
+=
$@" and l.UserId =
{
model
.
CreateBy
}
"
;
}
}
...
...
Mall.WebApi/Controllers/Education/AppletEducationController.cs
View file @
9b9a7d1c
...
...
@@ -1370,12 +1370,12 @@ namespace Mall.WebApi.Controllers.Education
article
.
Status
=
0
;
if
(
dynamicModule
.
PublishDynamic
(
article
))
{
//
var oldList = educationModule.GetFollowUserList(new RB_Education_FollowTeacher_Extend { TeacherId = userInfo.UserTeacher, MallBaseId = userInfo.MallBaseId, TenantId = userInfo.TenantId });
//
if (oldList != null && oldList.Any())//有关注的人
//
{
//
List<string> openIds = oldList.Select(x => x.OpenId).ToList();
//
new MiniProgramMsgModule().SendEducationDynamicMsg(userInfo.TenantId, userInfo.MallBaseId, openIds, "您关注的老师又有新动态了", teacherModel.Name, article.CreateTime.Value.ToString("yyyy年MM月dd日"));
//
}
var
oldList
=
educationModule
.
GetFollowUserList
(
new
RB_Education_FollowTeacher_Extend
{
TeacherId
=
userInfo
.
UserTeacher
,
MallBaseId
=
userInfo
.
MallBaseId
,
TenantId
=
userInfo
.
TenantId
});
if
(
oldList
!=
null
&&
oldList
.
Any
())
//有关注的人
{
List
<
string
>
openIds
=
oldList
.
Select
(
x
=>
x
.
OpenId
).
ToList
();
new
MiniProgramMsgModule
().
SendEducationDynamicMsg
(
userInfo
.
TenantId
,
userInfo
.
MallBaseId
,
openIds
,
"您关注的老师又有新动态了"
,
teacherModel
.
Name
,
article
.
CreateTime
.
Value
.
ToString
(
"yyyy年MM月dd日"
));
}
return
ApiResult
.
Success
(
"发布成功"
);
}
else
...
...
Mall.WebApi/Controllers/Education/AppletSchoolController.cs
View file @
9b9a7d1c
...
...
@@ -451,22 +451,6 @@ namespace Mall.WebApi.Controllers.Education
myArticleList
=
openList
;
DynamicStatus
=
4
;
//关注查看更多
}
//if (myArticleList == null || !myArticleList.Any())//没关注没公开动态查看是否有必须关注的动态
//{
// if (myArticleList == null || !myArticleList.Any())
// {
// DynamicStatus = 3;//暂无动态
// }
// else
// {
// DynamicStatus = 4;//关注查看更多
// }
//}
//else
//{
// DynamicStatus = 2;//查看更多
//}
}
List
<
object
>
list
=
new
List
<
object
>();
foreach
(
var
item
in
myArticleList
)
...
...
@@ -597,10 +581,10 @@ namespace Mall.WebApi.Controllers.Education
List
<
string
>
fileList
=
new
List
<
string
>();
if
(!
string
.
IsNullOrEmpty
(
article
.
Files
))
{
fileList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
article
.
Files
);
fileList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
article
.
Files
);
}
//StringHelper.UrlEncode(StringHelper.FromUnicodeString(article.Content))
var
resultData
=
new
{
id
=
article
.
Id
,
createEmpId
=
article
.
CreateBy
,
createEmName
=
article
.
CreateByName
,
crearteEmPhoto
=
article
.
CrearteByPhoto
,
createTime
=
article
.
CreateTime
.
HasValue
?
StringHelper
.
DateFormatToString
(
article
.
CreateTime
.
Value
)
:
""
,
content
=
StringHelper
.
FromUnicodeString
(
article
.
Content
),
coverPhoto
=
article
.
CoverPhoto
,
fileType
=
article
.
FileType
,
latAndLong
=
article
.
LatAndLong
,
address
=
article
.
Address
,
files
=
fileList
,
hasLike
=
article
.
HasLike
,
likeList
=
article
.
LikeList
.
Select
(
t
=>
new
{
empId
=
t
.
UserId
,
empName
=
t
.
EmName
,
t
.
Id
}),
commentList
=
article
.
CommentList
.
Select
(
t
=>
new
{
commentId
=
t
.
Id
,
empId
=
t
.
UserId
,
empName
=
t
.
UserName
,
byReplayEmpId
=
t
.
ByReplyEmpId
,
byReplayEmpName
=
t
.
ByReplyEmName
,
content
=
StringHelper
.
FromUnicodeString
(
t
.
Content
)
})
};
var
resultData
=
new
{
id
=
article
.
Id
,
createEmpId
=
article
.
CreateBy
,
createEmName
=
article
.
CreateByName
,
crearteEmPhoto
=
article
.
CrearteByPhoto
,
YearTime
=
article
.
CreateTime
.
HasValue
?
(
article
.
CreateTime
.
Value
.
Year
==
System
.
DateTime
.
Now
.
Year
?
""
:
article
.
CreateTime
.
Value
.
ToString
(
"yyyy"
))
:
""
,
MonthTime
=
article
.
CreateTime
.
HasValue
?
article
.
CreateTime
.
Value
.
ToString
(
"MM"
)
:
""
,
DayTime
=
article
.
CreateTime
.
HasValue
?
article
.
CreateTime
.
Value
.
ToString
(
"dd"
)
:
""
,
createTime
=
article
.
CreateTime
.
HasValue
?
StringHelper
.
DateFormatToString
(
article
.
CreateTime
.
Value
)
:
""
,
content
=
StringHelper
.
FromUnicodeString
(
article
.
Content
),
coverPhoto
=
article
.
CoverPhoto
,
fileType
=
article
.
FileType
,
latAndLong
=
article
.
LatAndLong
,
address
=
article
.
Address
,
files
=
fileList
,
hasLike
=
article
.
HasLike
,
likeList
=
article
.
LikeList
.
Select
(
t
=>
new
{
empId
=
t
.
UserId
,
empName
=
t
.
EmName
,
t
.
Id
}),
commentList
=
article
.
CommentList
.
Select
(
t
=>
new
{
commentId
=
t
.
Id
,
empId
=
t
.
UserId
,
empName
=
t
.
UserName
,
byReplayEmpId
=
t
.
ByReplyEmpId
,
byReplayEmpName
=
t
.
ByReplyEmName
,
content
=
StringHelper
.
FromUnicodeString
(
t
.
Content
)
})
};
return
resultData
;
}
...
...
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