Browse Source

Merge branch 'develop' of http://47.109.31.237:13000/kxs-end/admin-server into DuGuYang

DuGuYang 2 years ago
parent
commit
cc3e3bfb5c

+ 2 - 2
Areas/Admin/Controllers/MainServer/PosMachinesTwoChangeController.cs

@@ -59,7 +59,7 @@ namespace MySystem.Areas.Admin.Controllers
             Fields.Add("PosSn", "1"); //SN编号
             Fields.Add("BrandId", "0"); //品牌
 
-            string condition = " and Status>-1 AND BindingState = 1 AND DATE_SUB(CURDATE(), INTERVAL 120 DAY) >= date(BindingTime) and UpFeeFlag=1 and DownFeeFlag=0 and (SeoDescription!='设置成功' or SeoDescription is null or SeoDescription='')";
+            string condition = " and Status>-1 AND BindingState = 1 AND DATE_SUB(CURDATE(), INTERVAL 90 DAY) >= date(BindingTime) and UpFeeFlag=1 and DownFeeFlag=0 and BrandId!=6 and (SeoDescription!='设置成功' or SeoDescription is null or SeoDescription='')";
             //绑定状态
             if (!string.IsNullOrEmpty(BindingStateSelect))
             {
@@ -454,7 +454,7 @@ namespace MySystem.Areas.Admin.Controllers
             List<int> upposIds = new List<int>();
             string userIds = "";
             DateTime check = DateTime.Now.AddDays(-90);
-            List<PosMachinesTwo> poslist = db.PosMachinesTwo.Where(m => m.Status > -1 && m.BindingState == 1 && m.UpFeeFlag == 1 && m.DownFeeFlag == 0 && m.BindingTime <= check && m.SeoDescription != "设置成功").ToList();//非盒子
+            List<PosMachinesTwo> poslist = db.PosMachinesTwo.Where(m => m.Status > -1 && m.BindingState == 1 && m.UpFeeFlag == 1 && m.DownFeeFlag == 0 && m.BindingTime <= check && m.SeoDescription != "设置成功" && m.BrandId != 6).ToList();//非盒子
             foreach (PosMachinesTwo pos in poslist)
             {
                 Dictionary<string, object> Fields = new Dictionary<string, object>();

+ 21 - 0
Areas/Admin/Controllers/MainServer/TradeRecordController.cs

@@ -423,6 +423,26 @@ namespace MySystem.Areas.Admin.Controllers
                 bool checkMer = db.PosMerchantInfo.Any(m => m.KqMerNo == PhoneNumber);
                 if (!checkMer)
                 {
+                    string json = "{";
+                    json += "\"OrderNo\":\"" + OrderNo + "\",";
+                    json += "\"CreateDate\":\"" + CreateDate + "\",";
+                    json += "\"PhoneNumber\":\"" + PhoneNumber + "\",";
+                    json += "\"HasFirstCharge\":\"" + HasFirstCharge + "\",";
+                    json += "\"FirstChargeAmount\":\"" + FirstChargeAmount + "\",";
+                    json += "\"Province\":\"" + Province + "\",";
+                    json += "\"City\":\"" + City + "\",";
+                    json += "\"ProductName\":\"" + ProductName + "\",";
+                    json += "\"ActiveName\":\"" + ActiveName + "\",";
+                    json += "\"ProductType\":\"" + ProductType + "\",";
+                    json += "\"ActualAmount\":\"" + ActualAmount + "\",";
+                    json += "\"OrderStatus\":\"" + OrderStatus + "\",";
+                    json += "\"ActStatus\":\"" + ActStatus + "\",";
+                    json += "\"ActDate\":\"" + ActDate + "\",";
+                    json += "\"WorkNo\":\"" + WorkNo + "\",";
+                    json += "\"AccountName\":\"" + AccountName + "\",";
+                    json += "\"SimNo\":\"" + SimNo + "\"";
+                    json += "}";
+
                     spdb.BindRecord.Add(new SpModels.BindRecord()
                     {
                         CreateDate = DateTime.Parse(CreateDate),
@@ -440,6 +460,7 @@ namespace MySystem.Areas.Admin.Controllers
                         Field5 = ActStatus,
                         SeoTitle = ActualAmount,
                         SeoKeyword = ActDate,
+                        SeoDescription = json,
                         ProductType = "14",
                         Status = 1,
                     });

+ 16 - 1
Controllers/HomeController.cs

@@ -178,7 +178,22 @@ namespace MySystem.Controllers
     
         public string test(string p)
         {
-            return OssTestHelper.Instance.GetUrlBase64(p);
+            
+            BsModels.WebCMSEntities db = new BsModels.WebCMSEntities();
+            var sysadmins = db.SysAdmin.ToList();
+            foreach(var sysadmin in sysadmins)
+            {
+                BsModels.SysAdmin edit = db.SysAdmin.FirstOrDefault(m => m.Id == sysadmin.Id);
+                if(edit != null)
+                {
+                    string pwd = function.get_Random(8);
+                    edit.Password = function.MD5_32(pwd);
+                    db.SaveChanges();
+                    function.WriteLog(edit.AdminName + ":" + pwd, "pwd");
+                }
+            }
+            db.Dispose();
+            return "ok";
         }
 
         private SymmetricAlgorithm mCSP = new TripleDESCryptoServiceProvider();

+ 4 - 4
Startup.cs

@@ -167,10 +167,10 @@ namespace MySystem
         private void initMainServer(string Env)
         {
             string dbName = "KxsMainServer";
-            // if(Env == "Production")
-            // {
-            //     dbName = "KxsProfitServer";
-            // }
+            if(Env == "Production")
+            {
+                dbName = "KxsProfitServer";
+            }
             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 + "'");