From d793309bb59d605f95bd85e6fa5d2d94622259ad Mon Sep 17 00:00:00 2001 From: "DESKTOP-CLI22EN\\HogenWang" Date: Mon, 23 Apr 2018 00:56:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=90=8E=E5=8F=B0=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E6=97=A5=E5=BF=97=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AdminCP/Controllers/MemberController.cs | 58 ++++++- .../Views/Guestbook/EditGuestbook.cshtml | 2 +- .../Views/Guestbook/GuestbookList.cshtml | 2 +- .../Views/Member/AdminCPLogList.cshtml | 163 ++++++++++++++++++ .../Views/Member/ViewAdminLogDetail.cshtml | 71 ++++++++ 5 files changed, 293 insertions(+), 3 deletions(-) create mode 100644 COMCMS.Web/Areas/AdminCP/Views/Member/AdminCPLogList.cshtml create mode 100644 COMCMS.Web/Areas/AdminCP/Views/Member/ViewAdminLogDetail.cshtml diff --git a/COMCMS.Web/Areas/AdminCP/Controllers/MemberController.cs b/COMCMS.Web/Areas/AdminCP/Controllers/MemberController.cs index a98e09c..7655eba 100644 --- a/COMCMS.Web/Areas/AdminCP/Controllers/MemberController.cs +++ b/COMCMS.Web/Areas/AdminCP/Controllers/MemberController.cs @@ -962,7 +962,7 @@ namespace COMCMS.Web.Areas.AdminCP.Controllers string IsVerifySellers = Request.Form["IsVerifySellers"]; entity.UserName = model.UserName; entity.Email = model.Email; - entity.Tel = model.UserName; + entity.Tel = model.Tel; entity.Parent = model.Parent; entity.Grandfather = model.Grandfather; entity.RoleId = model.RoleId; @@ -1009,5 +1009,61 @@ namespace COMCMS.Web.Areas.AdminCP.Controllers return Json(tip); } #endregion + + #region 后台管理日志列表 + [MyAuthorize("viewlist", "admincplog")] + public IActionResult AdminCPLogList() + { + return View(); + } + [MyAuthorize("viewlist", "admincplog")] + public IActionResult GetAdminCPLogList(string keyword, int page = 1, int limit = 20) + { + int numPerPage, currentPage, startRowIndex; + + numPerPage = limit; + currentPage = page; + startRowIndex = (currentPage - 1) * numPerPage; + Expression ex = AdminLog._.Id > 0; + + if (!string.IsNullOrWhiteSpace(keyword)) + { + if (Utils.IsInt(keyword)) + { + ex &= (AdminLog._.Id == int.Parse(keyword) | AdminLog._.UserName.Contains(keyword)); + } + else + { + ex &= AdminLog._.UserName.Contains(keyword); + } + } + string kid = Request.Query["kid"]; + //if (Utils.IsInt(kid) && int.Parse(kid) > 0) + //{ + // ex &= AdminLog._.KId == int.Parse(kid); + //} + IList list = AdminLog.FindAll(ex, AdminLog._.Id.Desc(), null, startRowIndex, numPerPage); + long totalCount = AdminLog.FindCount(ex, AdminLog._.Id.Desc(), null, startRowIndex, numPerPage); + Core.Admin.WriteLogActions("后台管理日志留言列表(page:" + page + ");"); + return Content(Newtonsoft.Json.JsonConvert.SerializeObject(new { total = totalCount, rows = list }), "text/plain"); + } + + #endregion + + #region 查看管理日志详情 + [MyAuthorize("view", "admincplog")] + public IActionResult ViewAdminLogDetail(int id) + { + AdminLog entity = AdminLog.Find(AdminLog._.Id == id); + if (entity == null) + { + return EchoTipPage("系统找不到本记录!"); + } + + Core.Admin.WriteLogActions("查看管理日志详情(" + id + ");"); + + return View(entity); + } + #endregion } } \ No newline at end of file diff --git a/COMCMS.Web/Areas/AdminCP/Views/Guestbook/EditGuestbook.cshtml b/COMCMS.Web/Areas/AdminCP/Views/Guestbook/EditGuestbook.cshtml index 5b68071..c63c424 100644 --- a/COMCMS.Web/Areas/AdminCP/Views/Guestbook/EditGuestbook.cshtml +++ b/COMCMS.Web/Areas/AdminCP/Views/Guestbook/EditGuestbook.cshtml @@ -3,7 +3,7 @@ ViewBag.title = "编辑/审核留言详情"; } -
+
@ViewBag.title
diff --git a/COMCMS.Web/Areas/AdminCP/Views/Guestbook/GuestbookList.cshtml b/COMCMS.Web/Areas/AdminCP/Views/Guestbook/GuestbookList.cshtml index 12673a2..2208c3e 100644 --- a/COMCMS.Web/Areas/AdminCP/Views/Guestbook/GuestbookList.cshtml +++ b/COMCMS.Web/Areas/AdminCP/Views/Guestbook/GuestbookList.cshtml @@ -2,7 +2,7 @@ @{ ViewBag.title = "留言管理"; } -
+
@ViewBag.title
diff --git a/COMCMS.Web/Areas/AdminCP/Views/Member/AdminCPLogList.cshtml b/COMCMS.Web/Areas/AdminCP/Views/Member/AdminCPLogList.cshtml new file mode 100644 index 0000000..316d7b9 --- /dev/null +++ b/COMCMS.Web/Areas/AdminCP/Views/Member/AdminCPLogList.cshtml @@ -0,0 +1,163 @@ + +@{ + ViewBag.title = "后台管理日志"; +} +
+
+
+
@ViewBag.title
+
+
+
+
+
+
筛选条件
+
+
+
+ @* + + *@ + + + +
+
+
+
+
+ + +
+
+ + +
+ diff --git a/COMCMS.Web/Areas/AdminCP/Views/Member/ViewAdminLogDetail.cshtml b/COMCMS.Web/Areas/AdminCP/Views/Member/ViewAdminLogDetail.cshtml new file mode 100644 index 0000000..ce9d49b --- /dev/null +++ b/COMCMS.Web/Areas/AdminCP/Views/Member/ViewAdminLogDetail.cshtml @@ -0,0 +1,71 @@ +@model COMCMS.Core.AdminLog +@{ + ViewBag.title = "查看管理日志详情"; +} + +
+
+
+
@ViewBag.title
+
+
+
+
+ @using (Html.BeginForm(null, null, FormMethod.Post, new { id = "editGuestbookForm", @class = "form-horizontal m-t" })) + { +
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+
+ +
+
+} +
+
+ + +
\ No newline at end of file