Просмотр исходного кода

Merge branch 'feature-dgy-运营中心过期' into feature-dgy-后台测试

# Conflicts:
#	.DS_Store
#	Startup.cs
#	wwwroot/admin/images/ABackground-logo.png
#	wwwroot/layuiadmin/modules_main/PreCardAmountRecord_Admin.js
#	wwwroot/layuiadmin/modules_main/StoreHouseCardAmountRecord_Admin.js
#	wwwroot/layuiadmin/modules_main/Users_Admin.js
#	wwwroot/layuiadmin/modules_operate/AmountRecord_Admin.js
#	wwwroot/layuiadmin/modules_operate/SysAdminOperate_Admin.js
#	wwwroot/other/mybjq/asp.net/upload_json.ashx.cs
#	wwwroot/other/oss/upload-min-oss.js
DuGuYang 2 лет назад
Родитель
Сommit
f718f1f9ea

+ 3 - 1
AppStart/Helper/SycnProfitServiceV3.cs

@@ -40,6 +40,7 @@ namespace MySystem
                         {
                             DoTradeProfit(BrandId, date, SysUserName);
                             DoSubsidyProfit(BrandId, date);
+                            RedisDbconn.Instance.Set("ProfitFlag:" + date, 1);
                         }
                         else if (OpType == 1)
                         {
@@ -49,7 +50,8 @@ namespace MySystem
                             {
                                 DoUserProfit(date);
                                 DoUserServiceFee();
-                                //扣过期机具费
+                                RedisDbconn.Instance.Set("ProfitFlag:" + date, 0);
+                                RedisDbconn.Instance.SetExpire("ProfitFlag:" + date, 1);
                             }
                         }
                         function.WriteLog(DateTime.Now.ToString() + "\r\n\r\n", "同步分润数据");

+ 3 - 3
AppStart/OssHelper.cs

@@ -12,11 +12,11 @@ namespace MySystem
 {
     public class OssHelper
     {
-        string key = "LTAI5tAp9ASZtq4wYzuXfeer"; //阿里云AccessKey ID
-        string secret = "N0o6TwowU8r4aeNWoefMnnus9Q2saW";  //阿里云Access Key Secret
+        string key = "LTAI5tJsPaNzqCSMCPwb8zfz"; //阿里云AccessKey ID
+        string secret = "efM31Up75fQcgZ32U6xvAciagceQae";  //阿里云Access Key Secret
         public string PathName = ConfigurationManager.AppSettings["Database"].ToString();
         public string endpoint = "oss-cn-chengdu.aliyuncs.com";  //endpoint
-        public string bucketName = "kexiaoshuang";
+        public string bucketName = "kexiaoshuang-oss";
         public string SourceHost = ConfigurationManager.AppSettings["OssHost"].ToString();
         public bool OssStatus = true;
         public readonly static OssHelper Instance = new OssHelper();

+ 181 - 23
Areas/Admin/Controllers/OperateServer/AmountRecordOperateController.cs

@@ -29,13 +29,129 @@ namespace MySystem.Areas.Admin.Controllers
             OtherMySqlConn.connstr = ConfigurationManager.AppSettings["OpSqlConnStr"].ToString();
         }
 
-        #region 运营中心额度变动明细记录列表
+        // #region 运营中心额度变动明细记录列表
 
+        // /// <summary>
+        // /// 根据条件查询运营中心额度变动明细记录列表
+        // /// </summary>
+        // /// <returns></returns>
+        // public IActionResult Index(AmountRecord data, string right, int UserId = 0)
+        // {
+        //     ViewBag.RightInfo = RightInfo;
+        //     ViewBag.right = right;
+
+        //     return View();
+        // }
+
+        // #endregion
+
+        // #region 根据条件查询运营中心额度变动明细记录列表
+
+        // /// <summary>
+        // /// 运营中心额度变动明细记录列表
+        // /// </summary>
+        // /// <returns></returns>
+        // public JsonResult IndexData(AmountRecord data, string MakerCode, string OpCode, string CreateDateData, int page = 1, int limit = 30)
+        // {
+
+        //     Dictionary<string, string> Fields = new Dictionary<string, string>();
+
+        //     string condition = " and Status>-1";
+        //     //创客编号
+        //     if (!string.IsNullOrEmpty(MakerCode))
+        //     {
+        //         var user = db.Users.FirstOrDefault(m => m.MakerCode == MakerCode) ?? new Models.Users();
+        //         condition += " and UserId=" + user.Id;
+        //     }
+        //     //运营中心编号
+        //     if (!string.IsNullOrEmpty(OpCode))
+        //     {
+        //         condition += " and UserId in (select UserId from SysAdmin where OpCode='" + OpCode + "')";
+        //     }
+        //     if (!string.IsNullOrEmpty(CreateDateData))
+        //     {
+        //         string[] datelist = CreateDateData.Split(new string[] { " - " }, StringSplitOptions.None);
+        //         // string start = datelist[0];
+        //         // string end = datelist[1];
+        //         // condition += " and CreateDate>='" + start + " 00:00:00' and CreateDate<='" + end + " 23:59:59'";
+        //         var start = Convert.ToDateTime(Convert.ToDateTime(datelist[0]).ToString("yyyy-MM-dd"));
+        //         var end = Convert.ToDateTime(Convert.ToDateTime(datelist[1]).ToString("yyyy-MM-dd") + " 23:59:59");
+        //         var check = opdb.AmountRecord.Any(m => m.CreateDate >= start);
+        //         var checks = opdb.AmountRecord.Any(m => m.CreateDate <= end);
+        //         if (check)
+        //         {
+        //             var sId = opdb.AmountRecord.Where(m => m.CreateDate >= start).Min(m => m.Id);
+        //             condition += "  and Id >=" + sId;
+        //         }
+        //         if (checks)
+        //         {
+        //             var eId = opdb.AmountRecord.Where(m => m.CreateDate <= end).Max(m => m.Id);
+        //             condition += " and Id <=" + eId;
+        //         }
+        //     }
+        //     else
+        //     {
+        //         var start = Convert.ToDateTime(DateTime.Now.AddMonths(-1).ToString("yyyy-MM") + "-01");
+        //         var check = opdb.AmountRecord.Any(m => m.CreateDate >= start);
+        //         if (check)
+        //         {
+        //             var minId = opdb.AmountRecord.Where(m => m.CreateDate >= start).Min(m => m.Id);
+        //             var Info = function.ReadInstance("/WritePage/AmountRecordOperate/AmountRecordOperate.txt");
+        //             if (string.IsNullOrEmpty(Info.ToString()))
+        //             {
+        //                 function.WritePage("/WritePage/AmountRecordOperate/", "AmountRecordOperate.txt", minId.ToString());
+        //                 condition += " and Id >=" + minId;
+        //             }
+        //             else if (minId != int.Parse(Info))
+        //             {
+        //                 function.WritePage("/WritePage/AmountRecordOperate/", "AmountRecordOperate.txt", minId.ToString());
+        //                 condition += " and Id >=" + minId;
+        //             }
+        //             else
+        //             {
+        //                 condition += " and Id >=" + Convert.ToInt32(Info);
+        //             }
+        //         }
+        //         else
+        //         {
+        //             condition += " and Id =0";
+        //         }
+        //     }
+
+        //     Dictionary<string, object> obj = new AdminContentByConn(_accessor.HttpContext, PublicFunction.OpTables, OpConn).IndexData("AmountRecord", Fields, "Id desc", "0", page, limit, condition);
+        //     List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+        //     foreach (Dictionary<string, object> dic in diclist)
+        //     {
+        //         int UserId = int.Parse(dic["UserId"].ToString());
+        //         SysAdmin sysAdmin = opdb.SysAdmin.FirstOrDefault(m => m.UserId == UserId) ?? new SysAdmin();
+        //         dic["OpCode"] = sysAdmin.OpCode;
+        //         dic["MakerCode"] = sysAdmin.MakerCode;
+        //         dic["MakerName"] = sysAdmin.MakerName;
+        //         dic["SourceInfo"] = "";
+        //         if (int.Parse(dic["QueryCount"].ToString()) > 0)
+        //         {
+        //             var Id = int.Parse(dic["QueryCount"].ToString());
+        //             var orderInfo = db.Orders.FirstOrDefault(m => m.Id == Id) ?? new Models.Orders();
+        //             var userInfo = db.Users.FirstOrDefault(m => m.Id == orderInfo.UserId) ?? new Models.Users();
+        //             dic["SourceInfo"] = userInfo.MakerCode + "<br />" + userInfo.RealName;
+        //         }
+        //         int OperateType = int.Parse(dic["OperateType"].ToString());
+        //         dic["OperateTypeName"] = "";
+        //         if (OperateType == 1) dic["OperateTypeName"] = "收入";
+        //         if (OperateType == 2) dic["OperateTypeName"] = "支出";
+        //     }
+        //     return Json(obj);
+        // }
+
+        // #endregion
+
+
+        #region 运营中心额度变动明细记录列表v2
         /// <summary>
-        /// 根据条件查询运营中心额度变动明细记录列表
+        /// 根据条件查询运营中心额度变动明细记录列表v2
         /// </summary>
         /// <returns></returns>
-        public IActionResult Index(AmountRecord data, string right, int UserId = 0)
+        public IActionResult Index(AmountRecordNew data, string right, int UserId = 0)
         {
             ViewBag.RightInfo = RightInfo;
             ViewBag.right = right;
@@ -45,13 +161,12 @@ namespace MySystem.Areas.Admin.Controllers
 
         #endregion
 
-        #region 根据条件查询运营中心额度变动明细记录列表
-
+        #region 根据条件查询运营中心额度变动明细记录列表v2
         /// <summary>
-        /// 运营中心额度变动明细记录列表
+        /// 运营中心额度变动明细记录列表v2
         /// </summary>
         /// <returns></returns>
-        public JsonResult IndexData(AmountRecord data, string MakerCode, string OpCode, string CreateDateData, int page = 1, int limit = 30)
+        public JsonResult IndexData(AmountRecordNew data, string MakerCode, string OpCode, string CreateDateData, int page = 1, int limit = 30)
         {
 
             Dictionary<string, string> Fields = new Dictionary<string, string>();
@@ -76,35 +191,35 @@ namespace MySystem.Areas.Admin.Controllers
                 // condition += " and CreateDate>='" + start + " 00:00:00' and CreateDate<='" + end + " 23:59:59'";
                 var start = Convert.ToDateTime(Convert.ToDateTime(datelist[0]).ToString("yyyy-MM-dd"));
                 var end = Convert.ToDateTime(Convert.ToDateTime(datelist[1]).ToString("yyyy-MM-dd") + " 23:59:59");
-                var check = opdb.AmountRecord.Any(m => m.CreateDate >= start);
-                var checks = opdb.AmountRecord.Any(m => m.CreateDate <= end);
+                var check = opdb.AmountRecordNew.Any(m => m.CreateDate >= start);
+                var checks = opdb.AmountRecordNew.Any(m => m.CreateDate <= end);
                 if (check)
                 {
-                    var sId = opdb.AmountRecord.Where(m => m.CreateDate >= start).Min(m => m.Id);
+                    var sId = opdb.AmountRecordNew.Where(m => m.CreateDate >= start).Min(m => m.Id);
                     condition += "  and Id >=" + sId;
                 }
                 if (checks)
                 {
-                    var eId = opdb.AmountRecord.Where(m => m.CreateDate <= end).Max(m => m.Id);
+                    var eId = opdb.AmountRecordNew.Where(m => m.CreateDate <= end).Max(m => m.Id);
                     condition += " and Id <=" + eId;
                 }
             }
             else
             {
                 var start = Convert.ToDateTime(DateTime.Now.AddMonths(-1).ToString("yyyy-MM") + "-01");
-                var check = opdb.AmountRecord.Any(m => m.CreateDate >= start);
+                var check = opdb.AmountRecordNew.Any(m => m.CreateDate >= start);
                 if (check)
                 {
-                    var minId = opdb.AmountRecord.Where(m => m.CreateDate >= start).Min(m => m.Id);
-                    var Info = function.ReadInstance("/WritePage/AmountRecordOperate/AmountRecordOperate.txt");
+                    var minId = opdb.AmountRecordNew.Where(m => m.CreateDate >= start).Min(m => m.Id);
+                    var Info = function.ReadInstance("/WritePage/AmountRecordOperateNew/AmountRecordOperateNew.txt");
                     if (string.IsNullOrEmpty(Info.ToString()))
                     {
-                        function.WritePage("/WritePage/AmountRecordOperate/", "AmountRecordOperate.txt", minId.ToString());
+                        function.WritePage("/WritePage/AmountRecordOperateNew/", "AmountRecordOperateNew.txt", minId.ToString());
                         condition += " and Id >=" + minId;
                     }
                     else if (minId != int.Parse(Info))
                     {
-                        function.WritePage("/WritePage/AmountRecordOperate/", "AmountRecordOperate.txt", minId.ToString());
+                        function.WritePage("/WritePage/AmountRecordOperateNew/", "AmountRecordOperateNew.txt", minId.ToString());
                         condition += " and Id >=" + minId;
                     }
                     else
@@ -118,7 +233,7 @@ namespace MySystem.Areas.Admin.Controllers
                 }
             }
 
-            Dictionary<string, object> obj = new AdminContentByConn(_accessor.HttpContext, PublicFunction.OpTables, OpConn).IndexData("AmountRecord", Fields, "Id desc", "0", page, limit, condition);
+            Dictionary<string, object> obj = new AdminContentByConn(_accessor.HttpContext, PublicFunction.OpTables, OpConn).IndexData("AmountRecordNew", Fields, "Id desc", "0", page, limit, condition);
             List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
             foreach (Dictionary<string, object> dic in diclist)
             {
@@ -127,14 +242,57 @@ namespace MySystem.Areas.Admin.Controllers
                 dic["OpCode"] = sysAdmin.OpCode;
                 dic["MakerCode"] = sysAdmin.MakerCode;
                 dic["MakerName"] = sysAdmin.MakerName;
-                dic["SourceInfo"] = "";
-                if (int.Parse(dic["QueryCount"].ToString()) > 0)
+
+                dic["UseAmount"] = Math.Abs(decimal.Parse(dic["UseAmount"].ToString()));
+                dic["BeforeAmount"] = Math.Abs(decimal.Parse(dic["BeforeAmount"].ToString()));
+                dic["AfterAmount"] = Math.Abs(decimal.Parse(dic["AfterAmount"].ToString()));
+                dic["UseValidAmount"] = Math.Abs(decimal.Parse(dic["UseValidAmount"].ToString()));
+                dic["AfterValidAmount"] = Math.Abs(decimal.Parse(dic["AfterValidAmount"].ToString()));
+                dic["UseTotalAmt"] = Math.Abs(decimal.Parse(dic["UseTotalAmt"].ToString()));
+                dic["AfterTotalAmt"] = Math.Abs(decimal.Parse(dic["AfterTotalAmt"].ToString()));
+                dic["UseValidForGetAmount"] = Math.Abs(decimal.Parse(dic["UseValidForGetAmount"].ToString()));
+                dic["AfterValidForGetAmount"] = Math.Abs(decimal.Parse(dic["AfterValidForGetAmount"].ToString()));
+                
+                var DataType = int.Parse(dic["DataType"].ToString());//来源类型,区分表(1订单,2机具,3申请记录,4购买运营中心,5预扣款 6兑换大盟主)
+                var Id = int.Parse(dic["DataId"].ToString());//来源Id,表的主键Id
+                var SourceInfo = "";
+                if (DataType > 0 && Id > 0)
                 {
-                    var Id = int.Parse(dic["QueryCount"].ToString());
-                    var orderInfo = db.Orders.FirstOrDefault(m => m.Id == Id) ?? new Models.Orders();
-                    var userInfo = db.Users.FirstOrDefault(m => m.Id == orderInfo.UserId) ?? new Models.Users();
-                    dic["SourceInfo"] = userInfo.MakerCode + "<br />" + userInfo.RealName;
+                    var SourceUserId = 0;
+                    if (DataType == 1)
+                    {
+                        var orderInfo = db.Orders.FirstOrDefault(m => m.Id == Id) ?? new Models.Orders();
+                        SourceUserId = orderInfo.UserId;
+                    }
+                    if (DataType == 2)
+                    {
+                        var pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == Id) ?? new Models.PosMachinesTwo();
+                        SourceUserId = pos.BuyUserId;
+                    }
+                    if (DataType == 3)
+                    {
+                        var storeMachineApply = db.StoreMachineApply.FirstOrDefault(m => m.Id == Id) ?? new Models.StoreMachineApply();
+                        SourceUserId = storeMachineApply.UserId;
+                    }
+                    if (DataType == 4)
+                    {
+                        var sysAdminInfo = opdb.SysAdmin.FirstOrDefault(m => m.Id == Id) ?? new SysAdmin();
+                        SourceUserId = sysAdminInfo.UserId;
+                    }
+                    if (DataType == 5)
+                    {
+                        var toChargeBackRecord = db.ToChargeBackRecord.FirstOrDefault(m => m.Id == Id) ?? new Models.ToChargeBackRecord();
+                        SourceUserId = toChargeBackRecord.UserId;
+                    }
+                    if (DataType == 6)
+                    {
+                        var userExchangeLeaderRecord = db.UserExchangeLeaderRecord.FirstOrDefault(m => m.Id == Id) ?? new Models.UserExchangeLeaderRecord();
+                        SourceUserId = userExchangeLeaderRecord.UserId;
+                    }
+                    var userInfo = db.Users.FirstOrDefault(m => m.Id == SourceUserId) ?? new Models.Users();
+                    SourceInfo = userInfo.MakerCode + "_" + userInfo.RealName;
                 }
+                dic["SourceInfo"] = SourceInfo;
                 int OperateType = int.Parse(dic["OperateType"].ToString());
                 dic["OperateTypeName"] = "";
                 if (OperateType == 1) dic["OperateTypeName"] = "收入";

+ 26 - 3
Areas/Admin/Controllers/OperateServer/SysAdminOperateController.cs

@@ -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();
+                var dic["ExpiredStatus"] = 0; // 是否过期(0 未过期 1 已过期)
+                if (sysAdmin.ExpiredDate < DateTimeConstantAttribute.Now)
+                {
+                    dic["ExpiredStatus"] = 1;
+                }
                 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"] = "运营中心";
@@ -751,8 +774,8 @@ namespace MySystem.Areas.Admin.Controllers
                     ChangeType = ChangeType,//类别
                     Remark = description,//备注
                     UseAmount = decimal.Parse(OperationAmount),//变更总额度
-                    UseValidForGetAmount = 0,//变更可提现额度
-                    UseTotalAmt = decimal.Parse(OperationAmount),//变更未使用额度
+                    UseValidForGetAmount = decimal.Parse(OperationAmount),//变更可提现额度
+                    UseTotalAmt = 0,//变更未使用额度
                     UseValidAmount = 0,//变更关联分仓额度
                     DataType = 0,//来源类型,区分表(1订单,2机具,3申请记录,4购买运营中心,5预扣款 6兑换大盟主 7仓库)
                     DataId = 0,//来源Id,表的主键Id

+ 17 - 0
Areas/Admin/Views/OperateServer/SysAdminOperate/Index.cshtml

@@ -78,6 +78,16 @@
                             </select>
                         </div>
                     </div>
+                    <div class="layui-inline">
+                        <label class="layui-form-label">是否过期</label>
+                        <div class="layui-input-inline">
+                            <select id="ExpiredStatus" name="ExpiredStatus">
+                                <option value="">请选择</option>
+                                <option value="0">未过期</option>
+                                <option value="1">已过期</option>
+                            </select>
+                        </div>
+                    </div>
                     <div class="layui-inline">
                         <label class="layui-form-label">创建时间</label>
                         <div class="layui-input-inline">
@@ -85,6 +95,13 @@
                                 placeholder="" autocomplete="off">
                         </div>
                     </div>
+                    <div class="layui-inline">
+                        <label class="layui-form-label">过期时间</label>
+                        <div class="layui-input-inline">
+                            <input class="layui-input" type="text" readonly name="ExpiredDateData" id="ExpiredDateData"
+                                placeholder="" autocomplete="off">
+                        </div>
+                    </div>
                     <div class="layui-inline ml50">
                         <button class="layui-btn" lay-submit lay-filter="LAY-list-front-search">
                             <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>查询

+ 6 - 0
OpModels/AmountRecordNew.cs

@@ -7,10 +7,16 @@ namespace MySystem.OpModels
     {
         public int Id { get; set; }
         public int Sort { get; set; }
+        public int QueryCount { get; set; }
         public int Status { get; set; }
         public int Version { get; set; }
         public DateTime? CreateDate { get; set; }
         public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
         public int ChangeTypeId { get; set; }
         public string Remark { get; set; }
         public int ShowType { get; set; }

+ 28 - 0
OpModels/WebCMSEntities.cs

@@ -432,12 +432,40 @@ namespace MySystem.OpModels
                     .HasColumnType("int(11)")
                     .HasComment("操作类别");
 
+                entity.Property(e => e.QueryCount)
+                    .HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.Remark)
                     .HasColumnType("varchar(100)")
                     .HasComment("备注")
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.ShowType)
                     .HasColumnType("int(11)")
                     .HasComment("显示类型");

+ 7 - 0
Startup.cs

@@ -176,10 +176,17 @@ namespace MySystem
         private void initMainServer(string Env)
         {
             string dbName = "KxsMainServer";
+<<<<<<< HEAD
             // if (Env == "Production")
             // {
             //     dbName = "KxsProfitServer";
             // }
+=======
+            if(Env == "Production")
+            {
+                dbName = "KxsProfitServer";
+            }
+>>>>>>> feature-dgy-运营中心过期
             Dictionary<string, Dictionary<string, string>> tables = new Dictionary<string, Dictionary<string, string>>();
             Library.OtherMySqlConn.connstr = Configuration["Setting:SqlConnStr"];
             System.Data.DataTable tablecollection = Library.OtherMySqlConn.dtable("select DISTINCT TABLE_NAME from information_schema.columns where table_schema = '" + dbName + "'");

BIN
wwwroot/favicon.ico


+ 381 - 0
wwwroot/layuiadmin/modules/HelpProfitMerchantForUser_Admin.js

@@ -0,0 +1,381 @@
+var ExcelData,ExcelKind;
+function ConfirmImport() {
+    $.ajax({
+        type: "POST",
+        url: "/Admin/HelpProfitMerchantForUser/Import?r=" + Math.random(1),
+        data: "ExcelData=" + encodeURIComponent(JSON.stringify(ExcelData)),
+        dataType: "text",
+        success: function (data) {
+            if (data == "success") {
+                layer.msg("导入成功", { time: 2000 }, function () {
+                    window.location.reload();
+                });
+            } else {
+                layer.msg(data);
+            }
+        }
+    });
+}
+
+var excel;
+layui.config({
+    base: '/layuiadmin/' //静态资源所在路径
+}).extend({
+    myexcel: 'layui/lay/modules/excel',
+    index: 'lib/index' //主入口模块
+}).use(['index', 'table', 'excel', 'laydate'], function () {
+    var $ = layui.$
+        , form = layui.form
+        , table = layui.table;
+
+    //- 筛选条件-日期
+    var laydate = layui.laydate;
+    
+
+    //excel导入
+    excel = layui.excel;        
+    $('#ExcelFile').change(function (e) {
+        var files = e.target.files;
+        excel.importExcel(files, { }, function (data) {
+            ExcelData = data[0].sheet1;
+        });
+    });
+
+    //监听单元格编辑
+    table.on('edit(LAY-list-manage)', function(obj){
+        var value = obj.value //得到修改后的值
+        ,data = obj.data //得到所在行所有键值
+        ,field = obj.field; //得到字段
+        if(field == "Sort"){
+            $.ajax({
+                type: "POST",
+                url: "/Admin/HelpProfitMerchantForUser/Sort?r=" + Math.random(1),
+                data: "Id=" + data.Id + "&Sort=" + value,
+                dataType: "text",
+                success: function (data) {
+                }
+            });
+        }
+    });
+    
+    //列表数据
+    table.render({
+        elem: '#LAY-list-manage'
+        , url: '/Admin/HelpProfitMerchantForUser/IndexData' //模拟接口
+        , cols: [[
+            { type: 'checkbox', fixed: 'left' }
+    		, {field:'Id', fixed: 'left', title:'ID', width:80, sort: true, unresize: true}
+            ,{field:'UserIdMakerCode', width: 200, title:'创客创客编号', sort: true}
+,{field:'UserIdRealName', width: 200, title:'创客真实姓名', sort: true}
+,{field:'MerchantId', width: 200, title:'商户', sort: true}
+,{field:'MerNo', width: 200, title:'商户编号', sort: true}
+
+            , {field:'Sort', fixed: 'right', title:'排序', width:80, edit: 'text'}
+            , { title: '操作', align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
+        ]]
+        , where: {
+            
+        }
+        , page: true
+        , limit: 30
+        , height: 'full-220'
+        , text: '对不起,加载出现异常!'
+        , done: function (res, curr, count) {
+            $(".layui-none").text("无数据");
+        }
+    });
+
+    //监听工具条
+    table.on('tool(LAY-list-manage)', function (obj) {
+        var data = obj.data;
+        if (obj.event === 'del') {
+            var index = layer.confirm('确定要删除吗?删除后不能恢复!', function (index) {
+                $.ajax({
+                    type: "POST",
+                    url: "/Admin/HelpProfitMerchantForUser/Delete?r=" + Math.random(1),
+                    data: "Id=" + data.Id,
+                    dataType: "text",
+                    success: function (data) {
+                        if (data == "success") {                            
+                            obj.del();
+                            layer.close(index);
+                        } else {
+                            parent.layer.msg(data);
+                        }
+                    }
+                });
+            });
+        } else if (obj.event === 'edit') {
+            var tr = $(obj.tr);
+            var perContent = layer.open({
+                type: 2
+                , title: '助利宝商户关联表-编辑'
+                , content: 'Edit?Id=' + data.Id + ''
+                , maxmin: true
+                , area: ['500px', '450px']
+                , btn: ['确定', '取消']
+                , yes: function (index, layero) {
+                    var iframeWindow = window['layui-layer-iframe' + index]
+                        , submitID = 'LAY-list-front-submit'
+                        , submit = layero.find('iframe').contents().find('#' + submitID);
+
+                    setTimeout(function () { 
+                        layero.find('iframe').contents().find('.layui-tab-item').each(function (i) {
+                            var errObj = $(this).find('.layui-form-danger');
+                            if (errObj.length > 0) {
+                                iframeWindow.element.tabChange('mytabbar', String(i + 1));
+                                submit.click();
+                            }
+                        });                        
+                    }, 300);
+
+                    
+                    
+                    
+                    
+
+                    //监听提交
+                    iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
+                        var field = data.field; //获取提交的字段
+                        var userdata = "";
+                        for (var prop in field) {
+                            userdata += prop + "=" + encodeURIComponent(field[prop]) + "&";
+                        }
+                        //提交 Ajax 成功后,静态更新表格中的数据
+                        //$.ajax({});
+                        
+                        $.ajax({
+                            type: "POST",
+                            url: "/Admin/HelpProfitMerchantForUser/Edit?r=" + Math.random(1),
+                            data: userdata,
+                            dataType: "text",
+                            success: function (data) {
+                                layer.close(index); //关闭弹层
+                                if (data == "success") {
+                                    table.reload('LAY-list-manage'); //数据刷新
+                                } else {
+                                    layer.msg(data);
+                                }
+                            }
+                        });
+                    });
+
+                    submit.trigger('click');
+                }
+                , success: function (layero, index) {
+
+                }
+            });
+            layer.full(perContent);
+        }
+    });
+
+
+    //监听搜索
+    form.on('submit(LAY-list-front-search)', function (data) {
+        var field = data.field;
+
+        //执行重载
+        table.reload('LAY-list-manage', {
+            where: field,
+            page: {
+                curr: 1
+            }
+        });
+    });
+    form.on('submit(LAY-list-front-searchall)', function (data) {
+        table.reload('LAY-list-manage', {
+            where: null,
+            page: {
+                curr: 1
+            }
+        });
+    });
+
+    //事件
+    var active = {
+        batchdel: function () {
+            var checkStatus = table.checkStatus('LAY-list-manage')
+                , data = checkStatus.data; //得到选中的数据
+            if (data.length < 1) {
+                parent.layer.msg("请选择要删除的项");
+            } else {
+                var ids = "";
+                $.each(data, function (index, value) {
+                    ids += data[index].Id + ",";
+                });
+                ids = ids.substring(0, ids.length - 1);
+                var index = layer.confirm('确定要删除吗?删除后不能恢复!', function (index) {
+                    $.ajax({
+                        type: "POST",
+                        url: "/Admin/HelpProfitMerchantForUser/Delete?r=" + Math.random(1),
+                        data: "Id=" + ids,
+                        dataType: "text",
+                        success: function (data) {
+                            layer.close(index);
+                            if (data == "success") {
+                                table.reload('LAY-list-manage');
+                            } else {
+                                layer.msg(data);
+                            }
+                        }
+                    });
+                });
+            }
+        }
+        , add: function () {
+            var perContent = layer.open({
+                type: 2
+                , title: '助利宝商户关联表-添加'
+                , content: 'Add'
+                , maxmin: true
+                , area: ['500px', '450px']
+                , btn: ['确定', '取消']
+                , yes: function (index, layero) {
+                    var iframeWindow = window['layui-layer-iframe' + index]
+                        , submitID = 'LAY-list-front-submit'
+                        , submit = layero.find('iframe').contents().find('#' + submitID);
+
+                    setTimeout(function () { 
+                        layero.find('iframe').contents().find('.layui-tab-item').each(function (i) {
+                            var errObj = $(this).find('.layui-form-danger');
+                            if (errObj.length > 0) {
+                                iframeWindow.element.tabChange('mytabbar', String(i + 1));
+                                submit.click();
+                            }
+                        });                        
+                    }, 300);
+
+                    
+                    
+                    
+                    
+
+                    //监听提交
+                    iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
+                        var field = data.field; //获取提交的字段
+                        var userdata = "";
+                        for (var prop in field) {
+                            userdata += prop + "=" + encodeURIComponent(field[prop]) + "&";
+                        }
+                        //提交 Ajax 成功后,静态更新表格中的数据
+                        //$.ajax({});
+                        
+                        $.ajax({
+                            type: "POST",
+                            url: "/Admin/HelpProfitMerchantForUser/Add?r=" + Math.random(1),
+                            data: userdata,
+                            dataType: "text",
+                            success: function (data) {
+                                layer.close(index); //关闭弹层
+                                if (data == "success") {
+                                    table.reload('LAY-list-manage'); //数据刷新
+                                } else {
+                                    layer.msg(data);
+                                }
+                            }
+                        });
+                    });
+
+                    submit.trigger('click');
+                }
+            });
+            layer.full(perContent);
+        }
+        , ImportData: function () {
+            ExcelKind = 1;
+            layer.open({
+                type: 1,
+                title: '导入',
+                maxmin: false,
+                area: ['460px', '280px'],
+                content: $('#excelForm'),
+                cancel: function () {
+                }
+            });
+            $("#excelTemp").html('<a href="/excelfile/模板文件.xlsx">点击下载模板文件</a>');
+        }
+        , ExportExcel: function () {
+            var userdata = '';
+            $(".layuiadmin-card-header-auto input").each(function (i) {
+                userdata += $(this).attr('name') + '=' + encodeURIComponent($(this).val()) + '&';
+            });
+            $(".layuiadmin-card-header-auto select").each(function (i) {
+                userdata += $(this).attr('name') + '=' + encodeURIComponent($(this).val()) + '&';
+            });
+            $.ajax({
+                type: "GET",
+                url: "/Admin/HelpProfitMerchantForUser/ExportExcel?r=" + Math.random(1),
+                data: userdata,
+                dataType: "json",
+                success: function (data) {
+                    data.Obj.unshift(data.Fields);
+                    excel.exportExcel(data.Obj, data.Info, 'xlsx');
+                }
+            });
+        }
+        , Open: function () {
+            var checkStatus = table.checkStatus('LAY-list-manage')
+                , data = checkStatus.data; //得到选中的数据
+            if(data.length < 1){
+                parent.layer.msg("请选择要开启的项");
+            }else{
+                var ids = "";
+                $.each(data, function (index, value) {
+                    ids += data[index].Id + ",";
+                });
+                ids = ids.substring(0, ids.length - 1);
+                var index = layer.confirm('确定要开启吗?', function (index) {
+                    $.ajax({
+                        type: "POST",
+                        url: "/Admin/HelpProfitMerchantForUser/Open?r=" + Math.random(1),
+                        data: "Id=" + ids,
+                        dataType: "text",
+                        success: function (data) {
+                            layer.close(index);
+                            if (data == "success") {
+                                table.reload('LAY-list-manage');
+                            } else {
+                                layer.msg(data);
+                            }
+                        }
+                    });
+                });
+            }
+        }
+        , Close: function () {
+            var checkStatus = table.checkStatus('LAY-list-manage')
+                , data = checkStatus.data; //得到选中的数据
+            if(data.length < 1){
+                parent.layer.msg("请选择要关闭的项");
+            }else{
+                var ids = "";
+                $.each(data, function (index, value) {
+                    ids += data[index].Id + ",";
+                });
+                ids = ids.substring(0, ids.length - 1);
+                var index = layer.confirm('确定要关闭吗?', function (index) {
+                    $.ajax({
+                        type: "POST",
+                        url: "/Admin/HelpProfitMerchantForUser/Close?r=" + Math.random(1),
+                        data: "Id=" + ids,
+                        dataType: "text",
+                        success: function (data) {
+                            layer.close(index);
+                            if (data == "success") {
+                                table.reload('LAY-list-manage');
+                            } else {
+                                layer.msg(data);
+                            }
+                        }
+                    });
+                });
+            }
+        }
+    };
+
+    $('.layui-btn').on('click', function () {
+        var type = $(this).data('type');
+        active[type] ? active[type].call(this) : '';
+    });
+});

+ 1 - 1
wwwroot/layuiadmin/modules_main/PreCardAmountRecord_Admin.js

@@ -10,7 +10,7 @@ function ConfirmImport() {
                 layer.msg("导入结果成功", { time: 2000 }, function () {
                     window.location.reload();
                 });
-            }  else if (data.indexOf("warning") == 0) {
+            } else if (data.indexOf("warning") == 0) {
                 var datalist = data.split('|');
                 layer.alert(datalist[0], { time: 20000 }, function () {
                     window.location.reload();

+ 0 - 1
wwwroot/layuiadmin/modules_main/StoreHouseCardAmountRecord_Admin.js

@@ -54,7 +54,6 @@ function CheckImport(table, key, loadindex, index) {
         }
     });
 }
-
 var excel;
 layui.config({
     base: '/layuiadmin/' //静态资源所在路径

+ 31 - 0
wwwroot/layuiadmin/modules_main/SysTools_Admin.js

@@ -0,0 +1,31 @@
+//列表数据
+table.render({
+    elem: '#LAY-list-manage'
+    , url: '/Admin/SysTools/IndexData' //模拟接口
+    , cols: [[
+        { type: 'checkbox', fixed: 'left' }
+        , { field: 'ApplyNo', width: 200, title: '申请订单号', sort: true }
+        , { field: 'OrderNo', width: 200, title: '订单号', sort: true }
+        , { field: 'MakerCode', width: 200, title: '创客编号', sort: true }
+        , { field: 'RealName', width: 200, title: '创客姓名', sort: true }
+        , { field: 'ComeSn', width: 200, title: '来源机具SN', sort: true, templet: '#Loop' }
+        , { field: 'SendSn', width: 200, title: '发货SN', sort: true, templet: '#Loop' }
+        , { field: 'CreateDate', width: 200, title: '申请时间', sort: true }
+        , { field: 'Status', width: 200, title: '申请状态', sort: true }
+        , { title: '操作', width: 1500, align: 'left', toolbar: '#table-list-tools' }
+    ]]
+    , where: {
+    }
+    , page: true
+    , limit: 30
+    , height: 'full-' + String($('.layui-card-header').height() + 130)
+    , text: '对不起,加载出现异常!'
+    , done: function (res, curr, count) {
+        $(".layui-none").text("无数据");
+    }
+});
+
+$('.layui-btn').on('click', function () {
+    var type = $(this).data('type');
+    active[type] ? active[type].call(this) : '';
+});

+ 0 - 1
wwwroot/layuiadmin/modules_main/Users_Admin.js

@@ -56,7 +56,6 @@ function CheckImport(table, key, loadindex, index) {
     });
 }
 
-
 layui.config({
     base: '/layuiadmin/' //静态资源所在路径
 }).extend({

+ 10 - 3
wwwroot/layuiadmin/modules_operate/AmountRecord_Admin.js

@@ -91,15 +91,22 @@ layui.config({
         , url: '/Admin/AmountRecordOperate/IndexData' //模拟接口
         , cols: [[
             { type: 'checkbox', fixed: 'left' }
+            , { field: 'CreateDate', width: 180, title: '交易时间', sort: true }
             , { field: 'OpCode', width: 150, title: '运营中心编号', sort: true }
             , { field: 'MakerCode', width: 105, title: '创客编号', sort: true }
             , { field: 'MakerName', width: 105, title: '创客姓名', sort: true }
-            , { field: 'SeoKeyword', width: 100, title: '备注', sort: true }
-            , { field: 'SeoDescription', width: 100, title: '描述', sort: true }
+            // , { field: 'SeoKeyword', width: 100, title: '备注', sort: true }
+            // , { field: 'SeoDescription', width: 100, title: '描述', sort: true }
+            , { field: 'Remark', width: 100, title: '描述', sort: true }
             , { field: 'UseAmount', width: 110, title: '交易金额', sort: true }
             , { field: 'BeforeAmount', width: 130, title: '交易前总金额', sort: true }
             , { field: 'AfterAmount', width: 130, title: '交易后总金额', sort: true }
-            , { field: 'CreateDate', width: 180, title: '交易时间', sort: true }
+            , { field: 'UseValidAmount', width: 160, title: '使用关联分仓金额', sort: true }
+            , { field: 'AfterValidAmount', width: 175, title: '交易后关联分仓金额', sort: true }
+            , { field: 'UseTotalAmt', width: 160, title: '使用未使用金额', sort: true }
+            , { field: 'AfterTotalAmt', width: 160, title: '交易后未使用金额', sort: true }
+            , { field: 'UseValidForGetAmount', width: 160, title: '使用可提现金额', sort: true }
+            , { field: 'AfterValidForGetAmount', width: 160, title: '交易后可提现金额', sort: true }
             , { field: 'SourceInfo', width: 200, title: '来源创客信息', sort: true }
         ]]
         , where: {

+ 35 - 0
wwwroot/layuiadmin/modules_operate/SysAdminOperate_Admin.js

@@ -63,6 +63,33 @@ layui.config({
         }
     });
 
+    var layExpiredDateData = laydate.render({
+        elem: '#ExpiredDateData',
+        trigger: 'click',
+        type: 'date',
+        range: true,
+        change: function (value, date, endDate) {
+            var op = true;
+            if (date.year == endDate.year && endDate.month - date.month <= 1) {
+                if (endDate.month - date.month == 1 && endDate.date > date.date) {
+                    op = false;
+                    layExpiredDateData.hint('日期范围请不要超过1个月');
+                    setTimeout(function () {
+                        $(".laydate-btns-confirm").addClass("laydate-disabled");
+                    }, 1);
+                }
+            } else {
+                op = false;
+                layExpiredDateData.hint('日期范围请不要超过1个月');
+                setTimeout(function () {
+                    $(".laydate-btns-confirm").addClass("laydate-disabled");
+                }, 1);
+            }
+            if (op) {
+                $('#ExpiredDateData').val(value);
+            }
+        }
+    });
 
     //excel导入
     excel = layui.excel;
@@ -107,6 +134,14 @@ layui.config({
                 width: 80,
                 sort: true,
                 unresize: true
+            }, {
+                field: 'ExpiredStatus',
+                title: '是否过期',
+                sort: true
+            }, {
+                field: 'ExpiredDate',
+                title: '过期时间',
+                sort: true
             }, {
                 field: 'OpCode',
                 title: '运营中心编号',

Разница между файлами не показана из-за своего большого размера
+ 2 - 2
wwwroot/other/oss/upload-min-oss.js


BIN
wwwroot/users/批量修改提现结算金额模版.xlsx


BIN
wwwroot/users/批量修改金额模版.xlsx


BIN
wwwroot/users/批量奖励操作模板.xlsx


BIN
wwwroot/users/批量账户操作模板.xlsx


BIN
wwwroot/users/退押结果模版.xlsx


Некоторые файлы не были показаны из-за большого количества измененных файлов