|
|
@@ -139,28 +139,30 @@ 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');
|
|
|
+ string[] data = function.ReadInstance("tmp/1.txt").Split('\n');
|
|
|
Dictionary<string, string> sn = new Dictionary<string, string>();
|
|
|
foreach(string sub in data)
|
|
|
{
|
|
|
- string[] subdata = sub.Split('|');
|
|
|
+ string[] subdata = sub.Split(',');
|
|
|
sn.Add(subdata[0], subdata[1]);
|
|
|
}
|
|
|
- data = function.ReadInstance("tmp/1.txt").Split('\n');
|
|
|
+ data = function.ReadInstance("tmp/2.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);
|
|
|
+ string[] subdata = sub.Split(',');
|
|
|
+ if(sn.ContainsKey(subdata[0]))
|
|
|
+ {
|
|
|
+ string pos = subdata[0];
|
|
|
+ string userId = sn[subdata[0]];
|
|
|
+ string kind = subdata[2];
|
|
|
+ string amount = subdata[1];
|
|
|
+ string listId = "";
|
|
|
+ if(kind == "833_01") listId = "81";
|
|
|
+ if(kind == "833_02") listId = "82";
|
|
|
+ listId += ",83";
|
|
|
+ string m = "{\"brand_id\":36,\"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";
|
|
|
}
|