lcl 1 тиждень тому
батько
коміт
0d5ea7ff49
5 змінених файлів з 19 додано та 5 видалено
  1. BIN
      .DS_Store
  2. 1 1
      Common/RabbitMQClient.cs
  3. 3 1
      Program.cs
  4. 13 1
      Util/PrizeDo.cs
  5. 2 2
      appsettings.Development.json

+ 1 - 1
Common/RabbitMQClient.cs

@@ -87,7 +87,7 @@ namespace MySystem
             var list = setService.GetList(m => m.status == 1);
             foreach(var sub in list)
             {
-                StartReceive(sub.mqQueueName, "PRIZE_SEND_QUEUE", "/");
+                StartReceive(sub.mqQueueName, "kxs_direct_ranch", "/");
             }
         }
         #endregion

+ 3 - 1
Program.cs

@@ -120,6 +120,8 @@ app.MapControllerRoute(
 
 app.MapControllers();
 
+app.Urls.Add("http://*:5802");
+
 // PrizeDo.sendPrize(1, "{\"PosSn\":\"00005702880118401003\"}");
 // PrizeDo.sendPrize(1, "{\"PosSn\":\"00003102722406215502730\"}");
 // PrizeDo.sendPrize(4, "{\"PosSn\":\"CS00000000015859\"}");
@@ -129,7 +131,7 @@ app.MapControllers();
 // PrizeDo.sendPrize(7, "{\"OrderNo\":\"BM2024090817330511847441249\"}");
 // PrizeDo.sendPrize(7, "{\"OrderNo\":\"BM2024090817360962275551251\"}");
 
-// RabbitMQClient.Instance.Start();
+RabbitMQClient.Instance.Start();
 
 // PrizeDo.sendPrize("{\"prize_tag\":\"1\",\"content\":\"{\\\"PosSn\\\":\\\"00002402045980195457\\\"}\"}");
 

+ 13 - 1
Util/PrizeDo.cs

@@ -1789,7 +1789,19 @@ namespace Util
                             batchNo = batchNo,
                         };
                         recordService.Add(item);
-                        string prizeOutContent = Newtonsoft.Json.JsonConvert.SerializeObject(item);
+
+                        Dictionary<string, object> prizeItem = new Dictionary<string, object>();
+                        prizeItem.Add("prize_date", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+                        prizeItem.Add("prize_name", sub.prizeName);
+                        prizeItem.Add("batch_no", batchNo);
+                        prizeItem.Add("request_param_field", content);
+                        List<Dictionary<string, object>> prizeItemList = new List<Dictionary<string, object>>();
+                        Dictionary<string, object> prizeItemSub = new Dictionary<string, object>();
+                        prizeItemSub.Add("prize_amount", prizeAmt);
+                        prizeItemSub.Add("prize_obj", prizeObjectId);
+                        prizeItemList.Add(prizeItemSub);
+                        prizeItem.Add("prize_list", prizeItemList);
+                        string prizeOutContent = Newtonsoft.Json.JsonConvert.SerializeObject(prizeItem);
                         setLogFieldValue(sub.id, "prizeOutContent", prizeOutContent);
                         setLogFieldValue(sub.id, "prizeOutUrl", project.noticeUrl);
                         loopAmount = getPrizeAmount;

+ 2 - 2
appsettings.Development.json

@@ -43,10 +43,10 @@
   "MqSettings": {
     "UserName": "admin",
     "Password": "admin",
-    "HostName": "47.108.62.166:5672",
+    "HostName": "47.109.61.191:5672",
     "VirtualHostName": "/"
   },
   "InitDb": false, //是否初始化db
   "ApiKey": "*ga34|^7", //webapi解密的key
-  "Host": "http://telap.yumuit.com"
+  "Host": ""
 }