Commit c9a11038 authored by 黄奎's avatar 黄奎

页面修改

parent e943afc0
......@@ -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
......@@ -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();
}
}
......
......@@ -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("请输入标题");
......
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