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
38c97629
Commit
38c97629
authored
Dec 09, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
60c1b9c3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
6 deletions
+58
-6
ConvertHelper.cs
Edu.Common/Plugin/ConvertHelper.cs
+30
-0
RB_Student_LogRepository.cs
Edu.Repository/Customer/RB_Student_LogRepository.cs
+1
-1
CustomerStudentController.cs
Edu.WebApi/Controllers/Customer/CustomerStudentController.cs
+27
-5
No files found.
Edu.Common/Plugin/ConvertHelper.cs
View file @
38c97629
...
...
@@ -63,6 +63,36 @@ namespace Edu.Common
return
timeStr
;
}
/// <summary>
/// 获取时间格式yyyy-MM-dd HH:mm
/// </summary>
/// <param name="time"></param>
/// <returns></returns>
public
static
string
FormatTimeStr2
(
this
object
time
)
{
string
timeStr
=
""
;
if
(
time
!=
null
)
{
try
{
var
newTime
=
Convert
.
ToDateTime
(
time
.
ToString
());
if
(
newTime
.
Year
==
DateTime
.
Now
.
Year
)
{
timeStr
=
Convert
.
ToDateTime
(
time
.
ToString
()).
ToString
(
"MM-dd HH:mm"
);
}
else
{
timeStr
=
Convert
.
ToDateTime
(
time
.
ToString
()).
ToString
(
"yyyy-MM-dd HH:mm"
);
}
}
catch
{
}
}
return
timeStr
;
}
/// <summary>
/// 获取时间格式
/// </summary>
...
...
Edu.Repository/Customer/RB_Student_LogRepository.cs
View file @
38c97629
...
...
@@ -34,7 +34,7 @@ WHERE 1=1
{
if
(
query
.
StuId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Student_Log_Extend
.
StuId
),
query
.
StuId
);
//
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Log_Extend.StuId), query.StuId);
}
}
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Student_Log_Extend
.
LogId
));
...
...
Edu.WebApi/Controllers/Customer/CustomerStudentController.cs
View file @
38c97629
using
Edu.Common.API
;
using
Edu.Cache.User
;
using
Edu.Common.API
;
using
Edu.Common.Plugin
;
using
Edu.Model.ViewModel.Customer
;
using
Edu.Module.Customer
;
...
...
@@ -263,13 +264,34 @@ namespace Edu.WebApi.Controllers.Customer
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
),
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
var
list
=
customerStudentModule
.
GetStudentLogPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
foreach
(
var
item
in
list
)
var
data
=
customerStudentModule
.
GetStudentLogPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
List
<
object
>
list
=
new
List
<
object
>();
foreach
(
var
item
in
data
)
{
if
(
item
.
CreateBy
>
0
)
string
CreateByName
=
""
;
if
(
item
.
CreateType
>
1
)
{
// item.CreateByName = UserReidsCache.GetUserLoginInfo(item.CreateBy)?.AccountName ?? "";
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
CreateBy
)?.
AccountName
??
""
;
}
else
{
CreateByName
=
UserReidsCache
.
GetAppletCustomerLoginInfo
(
item
.
CreateBy
)?.
CustomerName
??
""
;
}
list
.
Add
(
new
{
item
.
LogId
,
item
.
StuId
,
item
.
LogType
,
LogTypeName
=
item
.
LogType
.
ToName
(),
item
.
LogTitle
,
item
.
LogContent
,
item
.
CreateType
,
CreateTypeStr
=
item
.
CreateType
==
1
?
"系统用户"
:
"同业用户"
,
CreateTimeStr
=
Common
.
ConvertHelper
.
FormatTimeStr2
(
item
.
CreateTime
),
CreateByName
});
}
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
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