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
2550c954
Commit
2550c954
authored
Sep 22, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
156ff503
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
1 deletion
+67
-1
ConvertHelper.cs
Edu.Common/Plugin/ConvertHelper.cs
+22
-0
RB_School_ViewModel.cs
Edu.Model/ViewModel/User/RB_School_ViewModel.cs
+32
-0
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+13
-1
No files found.
Edu.Common/Plugin/ConvertHelper.cs
View file @
2550c954
...
...
@@ -114,5 +114,27 @@ namespace Edu.Common
}
return
result
;
}
/// <summary>
/// 格式化时间【yyyy-MM-dd HH:mm:ss】
/// </summary>
/// <param name="time"></param>
/// <returns></returns>
public
static
string
FormatTime
(
object
time
)
{
string
timeStr
=
""
;
if
(
time
!=
null
)
{
try
{
timeStr
=
Convert
.
ToDateTime
(
time
.
ToString
()).
ToString
(
"yyyy-MM-dd HH:mm:ss"
);
}
catch
{
}
}
return
timeStr
;
}
}
}
\ No newline at end of file
Edu.Model/ViewModel/User/RB_School_ViewModel.cs
View file @
2550c954
...
...
@@ -14,5 +14,37 @@ namespace Edu.Model.ViewModel.User
/// 集团名称
/// </summary>
public
string
GroupName
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
string
CreateByName
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
string
CreateTimeStr
{
get
{
return
Common
.
ConvertHelper
.
FormatTime
(
this
.
CreateTime
);
}
}
/// <summary>
/// 修改人
/// </summary>
public
string
UpdateByName
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
public
string
UpdateTimeStr
{
get
{
return
Common
.
ConvertHelper
.
FormatTime
(
this
.
UpdateTime
);
}
}
}
}
Edu.WebApi/Controllers/User/UserController.cs
View file @
2550c954
...
...
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Edu.AOP
;
using
Edu.Cache.User
;
using
Edu.Common.API
;
using
Edu.Common.Plugin
;
using
Edu.Model.ViewModel.User
;
...
...
@@ -149,9 +150,20 @@ namespace Edu.WebApi.Controllers.User
var
query
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_School_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
var
list
=
schoolModule
.
GetSchoolPageListModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
foreach
(
var
item
in
list
)
{
if
(
item
.
CreateBy
>
0
)
{
item
.
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
CreateBy
)?.
AccountName
??
""
;
}
if
(
item
.
UpdateBy
>
0
)
{
item
.
UpdateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
UpdateBy
)?.
AccountName
??
""
;
}
}
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
list
;
return
ApiResult
.
Success
(
data
:
list
);
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
...
...
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