Murphy 3 лет назад
Родитель
Сommit
06047e6108

+ 2 - 2
MicroServices/Business/Business.Application/WMS/SyncKingdeeAppService.cs

@@ -14,9 +14,9 @@ namespace Business.ResourceExamineManagement
 {
     public class SyncKingdeeAppService : ApplicationService, ISyncKingdeeAppService
     {
-        private readonly IRepository<sys_serial_number, long> _sys_serial_number;
+        private readonly IRepository<sys_code, long> _sys_serial_number;
 
-        public SyncKingdeeAppService(IRepository<sys_serial_number, long> sys_serial_number) {
+        public SyncKingdeeAppService(IRepository<sys_code, long> sys_serial_number) {
             _sys_serial_number = sys_serial_number;
         }
         public string SyncSupplier()

+ 0 - 20
MicroServices/Business/Business.Core/Utilities/HttpHelper.cs

@@ -7,16 +7,6 @@ using System.Threading.Tasks;
 namespace Business.Core.Utilities
 {
     public class HttpHelper
-    {/// <summary>
-     /// 发起POST同步请求
-     /// 
-     /// </summary>
-     /// <param name="url"></param>
-     /// <param name="postData"></param>
-     /// <param name="contentType">application/xml、application/json、application/text、application/x-www-form-urlencoded</param>
-     /// <param name="headers">填充消息头</param>        
-     /// <returns></returns>
-        public static string HttpPost(string url, string postData = null, string contentType = null, int timeOut = 30, Dictionary<string, string> headers = null)
     {
         public static string HttpGet(string url, Dictionary<string, string>? headers = null)
         {
@@ -27,13 +17,6 @@ namespace Business.Core.Utilities
                 {
                     client.DefaultRequestHeaders.Add(header.Key, header.Value);
                 }
-                using (HttpContent httpContent = new StringContent(postData, Encoding.UTF8))
-                {
-                    if (contentType != null)
-                        httpContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue(contentType);
-
-                    HttpResponseMessage response = client.PostAsync(url, httpContent).Result;
-                    return response.Content.ReadAsStringAsync().Result;
             }
             try
             {
@@ -55,9 +38,6 @@ namespace Business.Core.Utilities
                 {
                     client.DefaultRequestHeaders.Add(header.Key, header.Value);
                 }
-                HttpResponseMessage response = client.GetAsync(url).Result;
-                return response.Content.ReadAsStringAsync().Result;
-            }
             }
             HttpContent content = new StringContent(postData ?? "", encoding ?? Encoding.UTF8);
             if (!string.IsNullOrWhiteSpace(contentType))