Browse Source

补好哒新奖励

lcl 7 months ago
parent
commit
1dc29238c7
1 changed files with 23 additions and 0 deletions
  1. 23 0
      Controllers/HomeController.cs

+ 23 - 0
Controllers/HomeController.cs

@@ -139,6 +139,29 @@ namespace MySystem.Controllers
             // {
             //     function.GetWebRequest("http://logic-executor-api.kexiaoshuang.com/noauth/prize/pushbyone?n=QUEUE_KXS_LKB_PRO_PRIZE_CONFIG_DIVISION&m=" + sub + "&ids=69");
             // }
+            string[] data = function.ReadInstance("tmp/2.txt").Split('\n');
+            Dictionary<string, string> sn = new Dictionary<string, string>();
+            foreach(string sub in data)
+            {
+                string[] subdata = sub.Split('|');
+                sn.Add(subdata[0], subdata[1]);
+            }
+            data = function.ReadInstance("tmp/1.txt").Split('\n');
+            foreach(string sub in data)
+            {
+                string[] subdata = sub.Split('|');
+                string pos = subdata[0];
+                string userId = sn[subdata[0]];
+                string kind = subdata[1];
+                string amount = subdata[2];
+                string listId = "0";
+                if(kind == "995_21") listId = "77";
+                if(kind == "995_22") listId = "78";
+                if(kind == "830_21") listId = "79";
+                if(kind == "830_22") listId = "80";
+                string m = "{\"brand_id\":29,\"ext_field\":\"" + kind + "\",\"pos_sn\":\"" + pos + "\",\"user_id\":" + userId + ",\"prize\":\"" + amount + "\"}";
+                function.GetWebRequest("http://logic-executor-api.kexiaoshuang.com/noauth/prize/pushbyone?n=QUEUE_KXS_HAODA_PRIZE_CONFIG_DIVISION&m=" + m + "&ids=" + listId);
+            }
             return "ok";
         }
     }