Commit 38c97629 authored by 黄奎's avatar 黄奎

页面修改

parent 60c1b9c3
......@@ -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>
......
......@@ -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));
......
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment