Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
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
黄奎
Education
Commits
c9a11038
Commit
c9a11038
authored
Apr 15, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
e943afc0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
7 deletions
+17
-7
RB_Notice_ViewModel.cs
Edu.Model/ViewModel/User/RB_Notice_ViewModel.cs
+5
-0
RB_NoticeRepository.cs
Edu.Repository/User/RB_NoticeRepository.cs
+10
-3
UserCenterController.cs
Edu.WebApi/Controllers/User/UserCenterController.cs
+2
-4
No files found.
Edu.Model/ViewModel/User/RB_Notice_ViewModel.cs
View file @
c9a11038
...
...
@@ -29,5 +29,10 @@ namespace Edu.Model.ViewModel.User
/// 部门id
/// </summary>
public
int
DeptId
{
get
;
set
;
}
/// <summary>
/// 查看时间
/// </summary>
public
string
LookTime
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Repository/User/RB_NoticeRepository.cs
View file @
c9a11038
...
...
@@ -158,6 +158,10 @@ namespace Edu.Repository.User
if
(!
string
.
IsNullOrEmpty
(
demodel
.
To
))
{
where
+=
$@" and (FIND_IN_SET(d.DeptId,'
{
demodel
.
To
}
') or d.DeptId =-1)"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
LookTime
))
{
where
+=
$@" and n.
{
nameof
(
RB_Notice
.
UpdateTime
)}
>='
{
demodel
.
LookTime
}
'"
;
}
string
OrderBy
=
" n.Id desc"
;
if
(
demodel
.
OrderBy
==
1
)
...
...
@@ -169,9 +173,12 @@ namespace Edu.Repository.User
OrderBy
=
" n.Is_Top asc,n.UpdateTime desc"
;
}
string
sql
=
$@" select n.* from RB_Notice n
left join rb_notice_dept d on n.Id = d.NoticeId
where
{
where
}
group by n.Id order by
{
OrderBy
}
"
;
string
sql
=
$@"
SELECT n.*
FROM RB_Notice n LEFT JOIN rb_notice_dept d on n.Id = d.NoticeId
WHERE
{
where
}
GROUP BY n.Id
ORDER BY
{
OrderBy
}
"
;
return
GetPage
<
RB_Notice_ViewModel
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
}
...
...
Edu.WebApi/Controllers/User/UserCenterController.cs
View file @
c9a11038
...
...
@@ -220,10 +220,9 @@ namespace Edu.WebApi.Controllers.User
demodel
.
FileList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
FileModel
>>(
base
.
ParmJObj
.
GetStringValue
(
"FileList"
));
}
catch
(
Exception
ex
)
{
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SetNoticeInfo_FileList"
);
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
From
))
{
return
ApiResult
.
ParamIsNull
(
"请传递来源"
);
...
...
@@ -232,7 +231,6 @@ namespace Edu.WebApi.Controllers.User
{
return
ApiResult
.
ParamIsNull
(
"请传递发送部门"
);
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
Title
))
{
return
ApiResult
.
ParamIsNull
(
"请输入标题"
);
...
...
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