Эх сурвалжийг харах

修复100购机奖励,只返一次

lichunlei 2 жил өмнө
parent
commit
9024181544

+ 5 - 6
AppStart/Helper/AlipayPayBack2Service.cs

@@ -244,8 +244,7 @@ namespace MySystem
                                 bool directPrize = false; //直推奖标记
                                 bool directPrize = false; //直推奖标记
                                 bool bigLeaderPrize = false; //大盟主券标记
                                 bool bigLeaderPrize = false; //大盟主券标记
                                 bool operateFlag = false; //运营中心标记
                                 bool operateFlag = false; //运营中心标记
-                                bool buyPrize = false; //返100购机奖励标记
-                                bool operatePrize = false; //返100购机奖励标记-运营中心
+                                bool buyPrize = false; //返100购机奖励标记或返100购机奖励标记-运营中心
                                 int leaderFlag = 0; //返600备用金标记
                                 int leaderFlag = 0; //返600备用金标记
                                 if(user.LeaderLevel > 0 || user.UserType == 1) //盟主或运营中心
                                 if(user.LeaderLevel > 0 || user.UserType == 1) //盟主或运营中心
                                 {
                                 {
@@ -552,11 +551,11 @@ namespace MySystem
                                     if(puser.UserType == 1)
                                     if(puser.UserType == 1)
                                     {
                                     {
                                         UserAccount acccount = db.UserAccount.FirstOrDefault(m => m.Id == puser.Id) ?? new UserAccount();
                                         UserAccount acccount = db.UserAccount.FirstOrDefault(m => m.Id == puser.Id) ?? new UserAccount();
-                                        if(!operatePrize)
+                                        if(!buyPrize)
                                         {
                                         {
                                             //购机奖励
                                             //购机奖励
                                             ChangeAccount(db, order, puser.Id, 100 * pro.ProductCount, 120);
                                             ChangeAccount(db, order, puser.Id, 100 * pro.ProductCount, 120);
-                                            operatePrize = true;
+                                            buyPrize = true;
                                         }
                                         }
                                         //标记标签
                                         //标记标签
                                         if(couponIds.Count > 0 && !operateFlag)
                                         if(couponIds.Count > 0 && !operateFlag)
@@ -926,8 +925,8 @@ namespace MySystem
         {
         {
             OpModels.WebCMSEntities db = new OpModels.WebCMSEntities();
             OpModels.WebCMSEntities db = new OpModels.WebCMSEntities();
             if(OpReserve1 > 0) OperateAmountChange(db, UserId, OpReserve1, 1, 1, "机具激活", true);
             if(OpReserve1 > 0) OperateAmountChange(db, UserId, OpReserve1, 1, 1, "机具激活", true);
-            if(OpReserve2 > 0) OperateAmountChange(db, UserId, OpReserve1, 1, 2, "机具激活", true);
-            if(OpReserve3 > 0) OperateAmountChange(db, UserId, OpReserve1, 1, 3, "机具激活", true);
+            if(OpReserve2 > 0) OperateAmountChange(db, UserId, OpReserve2, 1, 2, "机具激活", true);
+            if(OpReserve3 > 0) OperateAmountChange(db, UserId, OpReserve3, 1, 3, "机具激活", true);
             db.Dispose();
             db.Dispose();
         }
         }
         public void OperateAmountChange(OpModels.WebCMSEntities db, int UserId, decimal Money, int OperateType, int AmountType, string Remark = "", bool record = false)
         public void OperateAmountChange(OpModels.WebCMSEntities db, int UserId, decimal Money, int OperateType, int AmountType, string Remark = "", bool record = false)

+ 2 - 2
Startup.cs

@@ -106,11 +106,11 @@ namespace MySystem
             MySystemLib.SystemPublicFuction.checkurl = checkurl;
             MySystemLib.SystemPublicFuction.checkurl = checkurl;
             MySystemLib.SystemPublicFuction.appcheck = "success";
             MySystemLib.SystemPublicFuction.appcheck = "success";
             Dictionary<string, Dictionary<string, string>> tables = new Dictionary<string, Dictionary<string, string>>();
             Dictionary<string, Dictionary<string, string>> tables = new Dictionary<string, Dictionary<string, string>>();
-            System.Data.DataTable tablecollection = Library.dbconn.dtable("select DISTINCT TABLE_NAME from information_schema.columns where table_schema = 'KxsMainServer'");
+            System.Data.DataTable tablecollection = Library.dbconn.dtable("select DISTINCT TABLE_NAME from information_schema.columns where table_schema = 'KxsMainServer2'");
             foreach (System.Data.DataRow subtable in tablecollection.Rows)
             foreach (System.Data.DataRow subtable in tablecollection.Rows)
             {
             {
                 Dictionary<string, string> Columns = new Dictionary<string, string>();
                 Dictionary<string, string> Columns = new Dictionary<string, string>();
-                System.Data.DataTable columncollection = Library.dbconn.dtable("select COLUMN_NAME,DATA_TYPE from information_schema.columns where table_schema = 'KxsMainServer' and TABLE_NAME='" + subtable["TABLE_NAME"].ToString() + "'");
+                System.Data.DataTable columncollection = Library.dbconn.dtable("select COLUMN_NAME,DATA_TYPE from information_schema.columns where table_schema = 'KxsMainServer2' and TABLE_NAME='" + subtable["TABLE_NAME"].ToString() + "'");
                 foreach (System.Data.DataRow column in columncollection.Rows)
                 foreach (System.Data.DataRow column in columncollection.Rows)
                 {
                 {
                     string datatype = column["DATA_TYPE"].ToString();
                     string datatype = column["DATA_TYPE"].ToString();