Sfoglia il codice sorgente

添加码牌交易通用入库

lichunlei 5 mesi fa
parent
commit
efc8dffd18
1 ha cambiato i file con 30 aggiunte e 0 eliminazioni
  1. 30 0
      Areas/Api/Controllers/v1/KqController.cs

+ 30 - 0
Areas/Api/Controllers/v1/KqController.cs

@@ -110,6 +110,29 @@ namespace MySystem.Areas.Api.Controllers
 
 
 
+        #region 接收码牌交易记录
+        [HttpPost]
+        [Route("/kxs/qrtrade/{BrandId:int}")]
+        public Dictionary<string, object> QrTrade(int BrandId = 1)
+        {
+            StreamReader sr = new StreamReader(Request.Body);
+            string requestMes = sr.ReadToEnd();
+            if (string.IsNullOrEmpty(requestMes))
+            {
+                return new Dictionary<string, object>();
+            }
+            string content = Newtonsoft.Json.JsonConvert.SerializeObject(Request.Headers) + "#cut#" + requestMes;
+            SaveLog(BrandId, "码牌交易", content);
+            string fileName = function.MD5_16(Guid.NewGuid().ToString());
+            RedisDbconn.Instance.AddList("kxs_qrtrade_list_" + BrandId, content + "#cut#" + fileName);
+            // function.WritePage("/redis/kxs_qrtrade_list_" + BrandId + "/", fileName+".txt", content);
+            Dictionary<string, object> obj = new Dictionary<string, object>();
+            return BackInfo(BrandId, requestMes);
+        }
+        #endregion
+
+
+
         #region 接收分润记录
         [HttpPost]
         [Route("/kxs/profit/{BrandId:int}")]
@@ -541,6 +564,13 @@ namespace MySystem.Areas.Api.Controllers
                 obj.Add("errorcode", "00000");
                 obj.Add("datajson", null);
             }
+            else if (BrandId == 54)
+            {
+                obj.Add("error_code", "0");
+                obj.Add("error_msg", "success");
+                obj.Add("count", 0);
+                obj.Add("data", null);
+            }
             else
             {
                 obj = PublicImportDataService.Instance.CallBack();