|
|
@@ -1,3 +1,5 @@
|
|
|
+using System.ComponentModel;
|
|
|
+using System.Runtime.CompilerServices;
|
|
|
/*
|
|
|
* 运营中心
|
|
|
*/
|
|
|
@@ -61,7 +63,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
/// 运营中心列表
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public JsonResult IndexData(SysAdmin data, string OpCode, string MakerCode, string MakerName, string UserType, string CreateDateData, int page = 1, int limit = 30)
|
|
|
+ public JsonResult IndexData(SysAdmin data, string OpCode, string MakerCode, string MakerName, string UserType, string ExpiredStatus, string CreateDateData, string ExpiredDateData, int page = 1, int limit = 30)
|
|
|
{
|
|
|
|
|
|
Dictionary<string, string> Fields = new Dictionary<string, string>();
|
|
|
@@ -113,6 +115,22 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
string end = datelist[1];
|
|
|
condition += " and CreateDate>='" + start + " 00:00:00' and CreateDate<='" + end + " 23:59:59'";
|
|
|
}
|
|
|
+ //是否过期
|
|
|
+ if (!string.IsNullOrEmpty(ExpiredStatus))
|
|
|
+ {
|
|
|
+ var status = int.Parse(ExpiredStatus);
|
|
|
+ var time = DateTime.Now.ToString("yyyy-MM-dd Hh:mm:ss");
|
|
|
+ if (status == 0) condition += " and ExpiredDate>'" + time + "'";
|
|
|
+ if (status == 1) condition += " and ExpiredDate<='" + time + "'";
|
|
|
+ }
|
|
|
+ //过期时间
|
|
|
+ if (!string.IsNullOrEmpty(ExpiredDateData))
|
|
|
+ {
|
|
|
+ string[] datelist = ExpiredDateData.Split(new string[] { " - " }, StringSplitOptions.None);
|
|
|
+ string start = datelist[0];
|
|
|
+ string end = datelist[1];
|
|
|
+ condition += " and ExpiredDate>='" + start + " 00:00:00' and ExpiredDate<='" + end + " 23:59:59'";
|
|
|
+ }
|
|
|
|
|
|
Dictionary<string, object> obj = new AdminContentByConn(_accessor.HttpContext, PublicFunction.OpTables, OpConn).IndexData("SysAdmin", Fields, "Id desc", "0", page, limit, condition);
|
|
|
List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
|
|
|
@@ -121,6 +139,11 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
//所属人信息
|
|
|
int Id = int.Parse(dic["Id"].ToString());
|
|
|
SysAdmin sysAdmin = opdb.SysAdmin.FirstOrDefault(m => m.Id == Id) ?? new SysAdmin();
|
|
|
+ dic["ExpiredStatus"] = "未过期"; // 是否过期(0 未过期 1 已过期)
|
|
|
+ if (sysAdmin.ExpireDate < DateTime.Now)
|
|
|
+ {
|
|
|
+ dic["ExpiredStatus"] = "已过期";
|
|
|
+ }
|
|
|
var userInfo = db.Users.FirstOrDefault(m => m.Id == sysAdmin.UserId) ?? new Models.Users();
|
|
|
if (userInfo.UserType == 0) dic["Kind"] = "";
|
|
|
if (userInfo.UserType == 1) dic["Kind"] = "运营中心";
|
|
|
@@ -682,7 +705,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
|
|
|
RedisDbconn.Instance.AddList("OperateAmountRecordServiceQueue", opAmountItem);
|
|
|
AddSysLog(data.Id.ToString(), "SysAdmin", "EditAmt");
|
|
|
-
|
|
|
+
|
|
|
if (Kind == 2 && ReturnFlag == 1)
|
|
|
{
|
|
|
RedisDbconn.Instance.AddList("OperateAddServiceQueue", sysAdmin.Id.ToString());
|