瀏覽代碼

拆分日志写入结构;
搜同款改成按日保存;‘
新增快手转链(未完成);

dodo hold 2 年之前
父節點
當前提交
166455ca02

+ 4 - 0
molilian.api/Controllers/public/TaskController.cs

@@ -328,6 +328,10 @@ namespace molilian.api.Controllers
                     DBContext.Execute(sql, null);
                     sql = $"CREATE TABLE IF NOT EXISTS jd_parse_logs_{table_suffix} LIKE jd_parse_logs;";
                     DBContext.Execute(sql, null);
+                    sql = $"CREATE TABLE IF NOT EXISTS ks_parse_logs_{table_suffix} LIKE ks_parse_logs;";
+                    DBContext.Execute(sql, null);
+                    sql = $"CREATE TABLE IF NOT EXISTS tk_promotion_logs_{table_suffix} LIKE tk_promotion_logs;";
+                    DBContext.Execute(sql, null);
                 }
                 TkLogCore.save_dailys_log = true;
                 RedisHelper.Set("turn:save_dailys_log", 1, 86400);

File diff suppressed because it is too large
+ 0 - 0
molilian.api/Properties/PublishProfiles/https___ccr.ccs.tencentyun.com_shaobin.pubxml.user


+ 31 - 15
molilian.core/Core/API/ApiReportCore.cs

@@ -12,19 +12,28 @@ namespace molilian.core
             public int id { get; set; }
             public int data_type { get; set; }
             public DateTime report_date { get; set; }
-            public int uclk_uv { get; set; }
-            public int uclk_pv { get; set; }
-            public int pay_ord_num { get; set; }
-            public int order_ord_num { get; set; }
-            public decimal pay_ord_amt { get; set; }
-            public decimal pay_tk_disp_tfee { get; set; }
-            public int pay_ord_uv { get; set; }
-            public int eff_ord_num { get; set; }
-            public decimal eff_ord_amt { get; set; }
-            public decimal eff_tk_disp_tfee { get; set; }
-            public int total_count { get; set; }
-            public int abandon_count { get; set; }
-            public int success_count { get; set; }
+            public int uclk_uv { get; set; } = 0;
+            public int uclk_pv { get; set; } = 0;
+            public int pay_ord_num { get; set; } = 0;
+            public int order_ord_num { get; set; } = 0;
+            public decimal pay_ord_amt { get; set; } = 0;
+            public decimal pay_tk_disp_tfee { get; set; } = 0;
+            public int pay_ord_uv { get; set; } = 0;
+            public int eff_ord_num { get; set; } = 0;
+            public decimal eff_ord_amt { get; set; } = 0;
+            public decimal eff_tk_disp_tfee { get; set; } = 0;
+            public int total_count { get; set; } = 0;
+            public int abandon_count { get; set; } = 0;
+            public int success_count { get; set; } = 0;
+            public int req_other_aff_num { get; set; } = 0;
+            public int req_goods_num { get; set; } = 0;
+            public int req_live_num { get; set; } = 0;
+            public int req_video_num { get; set; } = 0;
+            public int req_shop_num { get; set; } = 0;
+            public int req_base_num { get; set; } = 0;
+            public int req_note_num { get; set; } = 0;
+            public int resp_deeplink_num { get; set; } = 0;
+
         }
 
 
@@ -110,10 +119,17 @@ namespace molilian.core
                 e.eff_ord_num,
                 e.eff_ord_amt,
                 e.eff_tk_disp_tfee,
-
                 e.total_count,
                 //e.abandon_count,
-                e.success_count
+                e.success_count,
+                e.req_other_aff_num,
+                e.req_goods_num,
+                e.req_live_num,
+                e.req_video_num,
+                e.req_shop_num,
+                e.req_base_num,
+                e.req_note_num,
+                e.resp_deeplink_num
             }).ToList<dynamic>();
             return data;
         }

+ 1 - 1
molilian.core/Core/ProxyNodesCore.cs

@@ -32,7 +32,7 @@ namespace molilian.core
         {
             var list = List();
             if (!list.Any()) return null;
-            //var ProxyNodesDTO = list.Where(s => s.name == node).FirstOrDefault();
+
             var ProxyNodesDTO = list.Where(e => SelectEndPointUseProxy(e, node)).OrderBy(l => Guid.NewGuid()).FirstOrDefault();
             if (ProxyNodesDTO == null) return null;
 

+ 5 - 6
molilian.core/Core/log/base.cs

@@ -28,6 +28,7 @@ namespace molilian.core
 
         public static bool save_dailys_log = false;
 
+        public static string _test_oaid = "3B191CFA4C6B48F9BA459E915B57743BEC7D424979CC9C51BCAD0C245B1C7BA2";
         static TkLogCore()
         {
             int flag = RedisHelper.Get<int>("turn:save_dailys_log");
@@ -63,11 +64,6 @@ namespace molilian.core
             connection.Open();
             using var transaction = connection.BeginTransaction();
 
-
-            string cacheKey = ":lock_key:start_comparison_tk";
-            bool start_comparison_tk = RedisHelper.Get<int>(cacheKey) > 0;
-
-
             try
             {
                 //第三方接口写入日志
@@ -91,6 +87,9 @@ namespace molilian.core
 
                 total += task_insert_promotion_img_logs(connection, transaction, limit, redis);
 
+
+                total += task_insert_parse_ks_logs(connection, transaction, limit, redis);
+
                 transaction.Commit();
             }
             catch (Exception ex)
@@ -114,7 +113,7 @@ namespace molilian.core
             }
             return total;
         }
-     
+
         private static void saveCache(string channel, int accountId, string accountName, bool success, string message, string reason)
         {
             saveAccountCache("all", success, message, reason);

+ 1 - 1
molilian.core/Core/log/coupon.cs

@@ -15,7 +15,7 @@ namespace molilian.core
                 var data = redis.LPop<UnionCouponDTO>(queue_coupon_key);
                 if (data == null) break;
 
-                if ("3B191CFA4C6B48F9BA459E915B57743BEC7D424979CC9C51BCAD0C245B1C7BA2".Equals(data.oaid) ||
+                if (_test_oaid.Equals(data.oaid) ||
                      data.ip.Contains("127.0.0"))
                 {
                     var test_data = data.Convert2Json().Convert2Object<TestUnionCouponDTO>();

+ 1 - 1
molilian.core/Core/log/cps.cs

@@ -16,7 +16,7 @@ namespace molilian.core
                 var data = redis.LPop<UnionCpsDTO>(queue_cps_key);
                 if (data == null) break;
 
-                if ("3B191CFA4C6B48F9BA459E915B57743BEC7D424979CC9C51BCAD0C245B1C7BA2".Equals(data.oaid) ||
+                if (_test_oaid.Equals(data.oaid) ||
                      data.ip.Contains("127.0.0"))
                 {
                     var test_data = data.Convert2Json().Convert2Object<TestUnionCpsDTO>();

+ 1 - 1
molilian.core/Core/log/deeplink.cs

@@ -18,7 +18,7 @@ namespace molilian.core
                 var data = redis.LPop<DeeplinkParseDataDTO>(queue_deeplink_parse_key);
                 if (data == null) break;
 
-                if ("3B191CFA4C6B48F9BA459E915B57743BEC7D424979CC9C51BCAD0C245B1C7BA2".Equals(data.oaid) ||
+                if (_test_oaid.Equals(data.oaid) ||
                      data.ip.Contains("127.0.0"))
                 {
                     var test_data = data.Convert2Json().Convert2Object<TestDeeplinkParseDataDTO>();

+ 1 - 1
molilian.core/Core/log/jd.cs

@@ -17,7 +17,7 @@ namespace molilian.core
                 if (data == null) break;
 
 
-                if ("3B191CFA4C6B48F9BA459E915B57743BEC7D424979CC9C51BCAD0C245B1C7BA2".Equals(data.oaid) ||
+                if (_test_oaid.Equals(data.oaid) ||
                      data.ip.Contains("127.0.0"))
                 {
                     save_jd_parse_logs(data, "jd_parse_logs_test", connection, transaction);

+ 113 - 0
molilian.core/Core/log/ks.cs

@@ -0,0 +1,113 @@
+using dodohold.core;
+using CSRedis;
+using System.Data;
+
+namespace molilian.core
+{
+    public partial class TkLogCore
+    {
+        static string queue_parse_ks_key = "queue:parse_logs:ks";
+
+        public static int task_insert_parse_ks_logs(IDbConnection connection, IDbTransaction transaction, int limit, CSRedisClient redis)
+        {
+            int total = 0;
+            for (int i = 0; i < limit; i++)
+            {
+                var data = redis.LPop<KsDataDTO>(queue_parse_ks_key);
+                if (data == null) break;
+
+
+                if (_test_oaid.Equals(data.oaid) || data.ip.Contains("127.0.0"))
+                {
+                    save_ks_parse_logs(data, "ks_parse_logs_test", connection, transaction);
+                }
+                else
+                {
+                    save_ks_parse_logs(data, "ks_parse_logs", connection, transaction);
+
+                    if (save_dailys_log)
+                    {
+                        string daily_table = $"ks_parse_logs_{DateTime.Now:yyyyMMdd}";
+                        save_ks_parse_logs(data, daily_table, connection, transaction);
+                    }
+
+                    if (data.success)
+                    {
+                        save_ks_parse_logs(data, "ks_parse_logs_success", connection, transaction);
+                    }
+                }
+                total++;
+            }
+            return total;
+        }
+
+        public static async Task ParseLogAsync(KsDataDTO response)
+        {
+            try
+            {
+                var ts = DateTime.Now - response.create_time;
+                response.elapsedTime = (int)ts.TotalMilliseconds;
+                _ = RedisHelper.RPushAsync(queue_parse_ks_key, response);
+
+                if (!response.ip.Contains("127.0.0"))
+                {
+                    saveParseCache(response.channel.ToString(), response.accountId,
+                        response.accountName, response.success, response.message, response.reason,
+                        response.deeplink_url);
+                }
+
+                if (response.success || response.message.Equals("转链失败"))
+                {
+                    KsPoolCore.CallsIncrBy(response.accountId);
+                }
+
+
+                if (response.success) saveClientRequestTotal(response.channel, response.ip, response.oaid);
+
+                if (!response.success && ("nologin".Equals(response.reason) ||
+                    "方法不存在".Equals(response.reason) ||
+                    "未登录".Equals(response.reason)))
+                {
+                    await Task.Run(() =>
+                    {
+                        KsPoolCore.Disabled(response.accountId, response.accountName, $"{response.rawContent}\n{response.rawContent2}");
+                    });
+                }
+                if ("没有匹配账号".Equals(response.reason))
+                {
+                    KsPoolCore.AccountExhausted();
+                }
+            }
+            catch (Exception ex) { }
+        }
+        private static int save_ks_parse_logs(KsDataDTO data, string tablename, IDbConnection connection, IDbTransaction transaction)
+        {
+            return new DBContext.Table(connection, tablename)
+                .Add("end_point", data.end_point)
+                .Add("channel", (int)data.channel)
+                .Add("accountId", data.accountId)
+                .Add("accountName", data.accountName)
+                .Add("rawContent", data.rawContent)
+                .Add("success", data.success)
+                .Add("message", data.message)
+                .Add("reason", data.reason)
+                .Add("content", data.content)
+                .Add("itemId", data.itemId)
+                .Add("itemName", data.itemName)
+                .Add("pic", data.pic)
+                .Add("couponAmount", data.couponAmount)
+                .Add("promotionPrice", data.promotionPrice)
+                .Add("taoToken", data.taoToken)
+                .Add("shortLinkurl", data.shortLinkurl)
+                .Add("deeplink_url", data.deeplink_url)
+                .Add("elapsedTime", data.elapsedTime)
+                .Add("subCode", data.subCode)
+                .Add("ip", data.ip)
+                .Add("oaid", data.oaid)
+                .Add("create_time", data.create_time)
+                .Create(DBContext.InsertType.NORMAL, transaction);
+        }
+
+    }
+
+}

+ 1 - 1
molilian.core/Core/log/pdd.cs

@@ -17,7 +17,7 @@ namespace molilian.core
                 if (data == null) break;
 
 
-                if ("3B191CFA4C6B48F9BA459E915B57743BEC7D424979CC9C51BCAD0C245B1C7BA2".Equals(data.oaid) ||
+                if (_test_oaid.Equals(data.oaid) ||
                      data.ip.Contains("127.0.0"))
                 {
                     save_pdd_parse_logs(data, "pdd_parse_logs_test", connection, transaction);

+ 34 - 1
molilian.core/Core/log/promotion.cs

@@ -22,11 +22,44 @@ namespace molilian.core
                     data.similarPromotion = string.Empty;
                     data.promotionImg = string.Empty;
                 }
-                connection.Insert(data);
+
+                //按日保存数据
+                string daily_table = $"tk_promotion_logs_{DateTime.Now:yyyyMMdd}";
+                save_tk_promotion_img_logs(data, daily_table, connection, transaction);
+
                 total++;
             }
             return total;
         }
+
+        private static int save_tk_promotion_img_logs(PromotionQueryDTO data, string tablename, IDbConnection connection, IDbTransaction transaction)
+        { 
+            try
+            {
+                return new DBContext.Table(connection, tablename)
+                    .Add("accountId", data.accountId)
+                    .Add("accountName", data.accountName)
+                    .Add("img", data.img)
+                    .Add("ip", data.ip)
+                    .Add("oaid", data.oaid)
+                    .Add("success", data.success)
+                    .Add("message", data.message)
+                    .Add("reason", data.reason)
+                    .Add("url", data.url)
+                    .Add("similarPromotion", data.similarPromotion)
+                    .Add("promotionImg", data.promotionImg)
+
+                    .Add("elapsedTime", data.elapsedTime)
+                    .Add("elapsedTime2", data.elapsedTime2)
+                    .Add("elapsedTime3", data.elapsedTime3)
+                    .Add("elapsedTime4", data.elapsedTime4)
+                    .Add("create_time", data.create_time)
+                    .Add("end_point", data.end_point)
+                    .Create(DBContext.InsertType.NORMAL, transaction);
+            }
+            catch (Exception ex) { return 0; }
+        }
+
         public static async Task PromotionImgLogAsync(PromotionQueryDTO response)
         {
             try

+ 1 - 1
molilian.core/Core/log/taobao.cs

@@ -17,7 +17,7 @@ namespace molilian.core
                 var data = redis.LPop<TkDataDTO>(queue_parse_tb_key);
                 if (data == null) break;
 
-                if ("3B191CFA4C6B48F9BA459E915B57743BEC7D424979CC9C51BCAD0C245B1C7BA2".Equals(data.oaid) ||
+                if (_test_oaid.Equals(data.oaid) ||
                      data.ip.Contains("127.0.0"))
                 {
                     save_tk_parse_logs(data, "tk_parse_logs_test", connection, transaction);

+ 1 - 1
molilian.core/Core/log/tool.cs

@@ -18,7 +18,7 @@ namespace molilian.core
                 if (data == null) break;
 
 
-                if ("3B191CFA4C6B48F9BA459E915B57743BEC7D424979CC9C51BCAD0C245B1C7BA2".Equals(data.oaid) ||
+                if (_test_oaid.Equals(data.oaid) ||
                      data.ip.Contains("127.0.0"))
                 {
                     new DBContext.Table(connection, "tool_parse_logs_test")

+ 1 - 1
molilian.core/Core/log/第三方旧接口.cs

@@ -18,7 +18,7 @@ namespace molilian.core
                 var data = redis.LPop<TkDataDTO>(queue_tb_key);
                 if (data == null) break;
 
-                if ("3B191CFA4C6B48F9BA459E915B57743BEC7D424979CC9C51BCAD0C245B1C7BA2".Equals(data.oaid) ||
+                if (_test_oaid.Equals(data.oaid) ||
                      data.ip.Contains("127.0.0"))
                 {
                     save_tk_log(data, "tk_logs_test", connection, transaction);

+ 85 - 0
molilian.core/Core/taoke/UnionParseCore.cs

@@ -39,6 +39,7 @@ namespace molilian.core
                 "wemeet" => await WemeetParseAsync(content, ip, oaid),
                 "bdpan" => PanParse(content, ip, oaid),
                 "jd" => await JdParseAsync(content, ip, oaid, accountid),
+                "ks" => await KsParseAsync(content, ip, oaid, accountid),
                 "dy" => await DyParseAsync(content, ip, oaid),
                 "pdd" => await PddParseAsync(content, ip, oaid, accountid),
                 "tb" => await TaobaoParseAsync(content, ip, oaid, accountid),
@@ -664,6 +665,90 @@ namespace molilian.core
             }, code);
         }
 
+
+
+        public static async Task<APIResult> KsParseAsync(string content, string ip, string oaid,
+            int accountid = 0, CancellationToken cancellationToken = default)
+        {
+            var result = KsUnionPlus.GetFormattedObject(content, ip, oaid);
+            content = content.UrlDecode();
+            result.rawContent = content;
+            bool IfExceptional = false;
+            try
+            {
+                var config = TkConfigCore.Get();
+
+                //============================== 放弃转链-地区过滤 ==============================
+                if (accountid == 0 && KsUnionPlus.ShouldIgnoreRequest(config, ip, oaid, out string reason))
+                {
+                    result.success = false;
+                    result.message = "放弃转链";
+                    result.reason = reason;
+                    _ = TkLogCore.ParseLogAsync(result);
+                    return KsParseOutput(result);
+                }
+
+                var account = accountid > 0 ? KsPoolCore.GetOne(accountid, KsPoolCore.KsAction.parse) : KsPoolCore.GetOne(KsPoolCore.KsAction.parse);
+                if (account == null)
+                {
+                    result.success = false;
+                    result.message = "放弃转链";
+                    result.reason = "没有匹配账号";
+                    _ = TkLogCore.ParseLogAsync(result);
+                    return KsParseOutput(result);
+                }
+                result.accountId = account.id;
+                result.accountName = account.name;
+
+                var plus = new KsUnionPlus(account);
+
+                result = await plus.KsParseAsync(content, result, cancellationToken);
+            }
+            catch (Exception ex)
+            {
+                if (ex.Message.Contains("was canceled"))
+                {
+                    result.success = false;
+                    result.message = "放弃转链";
+                    result.reason = "请求超时";
+                }
+                else
+                {
+                    IfExceptional = true;
+                    _ = new LoggerLibrary("unionParse", "jd_error")
+                        .Info(ip, oaid)
+                        .Info(content)
+                        .Info(ex.Message, ex.StackTrace)
+                        .SaveAsync();
+                    NotifyCore.Notify(new NifyMessage
+                    {
+                        message = $"【转链异常JD】\n{content}\n\n{ex.Message}\n{ex.StackTrace}",
+                        priority = NifyMessagePriority.high,
+                        tags = ["red_circle"]
+                    });
+                    result.success = false;
+                    result.message = "内部错误";
+                    result.reason = "转链接口异常";
+                }
+            }
+            _ = TkLogCore.ParseLogAsync(result);
+            return KsParseOutput(result, IfExceptional ? APIResultCodeEnum.NotAcceptable : APIResultCodeEnum.OK);
+
+        }
+        private static APIResult KsParseOutput(KsDataDTO result, APIResultCodeEnum code = APIResultCodeEnum.OK)
+        {
+            return new APIResult(new
+            {
+                result.success,
+                result.message,
+                link_type = result.link_type.ToString(),
+                channel = result?.channel.ToString(),
+                result.itemId,
+                result.itemName,
+                result.shortLinkurl,
+                result.deeplink_url,
+            }, code);
+        }
     }
 
 }

+ 4 - 0
molilian.core/DTO/alimama/TkConfigDTO.cs

@@ -35,5 +35,9 @@ namespace molilian.core
         public string pddIgnorePercentageCity { get; set; } = string.Empty;
         public int pdd_limit_per_ip_24h { get; set; } = 0;
 
+
+        public int ksIgnorePercentage { get; set; } = 0;
+        public string ksIgnorePercentageCity { get; set; } = string.Empty;
+        public int ks_limit_per_ip_24h { get; set; } = 0;
     }
 }

+ 2 - 0
molilian.core/DTO/ks/KsDataDTO.cs

@@ -25,6 +25,8 @@
         public string shortLinkurl { get; set; } = string.Empty;
         public string deeplink_url { get; set; } = string.Empty;
         public int elapsedTime { get; set; } = 0;
+        public int elapsedTime2 { get; set; } = 0;
+        public int elapsedTime3 { get; set; } = 0;
         public DateTime create_time { get; set; } = DateTime.Now;
         public string end_point { get; set; } = string.Empty;
         public int subCode { get; set; } = 0;

+ 0 - 1
molilian.core/Plus/Alimama/crawler.cs

@@ -261,7 +261,6 @@ namespace molilian.core
 
             try
             {
-
                 string tableName = $"tk_parse_logs_{report_date:yyyyMMdd}";
 
                 string exist_sql = @$"SELECT IF( EXISTS ( SELECT 1 FROM information_schema.tables WHERE table_name = '{tableName}'), 1, 0) AS table_exists;";

+ 194 - 0
molilian.core/Plus/ks/Crawler.cs

@@ -0,0 +1,194 @@
+using dodohold.core;
+using Sayaka.Common;
+using System.Text.RegularExpressions;
+
+namespace molilian.core
+{
+    public class KsTransferUrlResult
+    {
+        public string multiGroupShortUrl { get; set; } = string.Empty;
+        public string multiGroupUrl { get; set; } = string.Empty;
+        public string shortUrl { get; set; } = string.Empty;
+        public string url { get; set; } = string.Empty;
+    }
+
+    public class KsTransferUrlResponse
+    {
+        public int errorCode { get; set; }
+        public string errorMsg { get; set; } = string.Empty;
+        public bool success { get; set; } = false;
+        public KsTransferUrlResult result { get; set; } = new();
+    }
+
+    public class KsCreatePromotionUrlResult
+    {
+        public string multiGroupShortUrl { get; set; } = string.Empty;
+        public string multiGroupUrl { get; set; } = string.Empty;
+        public string shortUrl { get; set; } = string.Empty;
+        public string url { get; set; } = string.Empty;
+    }
+
+    public class KsCreatePromotionUrlResponse
+    {
+        public int errorCode { get; set; }
+        public string errorMsg { get; set; } = string.Empty;
+        public bool success { get; set; } = false;
+        public KsCreatePromotionUrlResult result { get; set; } = new();
+    }
+
+    public partial class KsUnionPlus
+    {
+//        public async Task<KsDataDTO> transferUrl(KsDataDTO result, string sourceUrl, CancellationToken cancellationToken = default)
+//        {
+//            var ts = DateTime.Now.Convert2UnixTimestamp(true);
+//            string cookies = _account.cookies.Trim();
+
+//            string useragent = ProviderFakeUserAgent.RandomComputer;
+//            string url = "https://jinbao.pinduoduo.com/network/api/promotion/transferUrl";
+
+//            //{"pid":"13848803_189356569","sourceUrl":"https://p.pinduoduo.com/1OAsct0r"}
+
+//            var args = new
+//            {
+//                _account.pid,
+//                sourceUrl = sourceUrl.UrlDecode(),
+//            };
+//            string data = args.Convert2Json();
+
+//            WebClientUtility client = new WebClientUtility();
+//            client.Proxy = _proxy;
+//#if DEBUG
+//            client.Proxy = null;
+//#endif
+//            client.SetContentType("application/json");
+//            client.AddHeaders("Referer", "https://jinbao.pinduoduo.com/promotion/url-promotion");
+//            client.AddHeaders("Origin", "https://jinbao.pinduoduo.com");
+//            client.UserAgent = useragent;
+//            client.AddHeaders("Cookie", cookies);
+//            client.Post(data);
+//            var response = await client.RequestAsync(url, "POST", cancellationToken);
+
+//            string body = response.Body();
+//            var root = body.Convert2Object<KsTransferUrlResponse>();
+//            string message = string.Empty;
+
+//            if (!root.success)
+//            {
+//                message = $"{root.errorCode}:{root.errorMsg}";
+//                result.success = false;
+//                result.message = "转链失败";
+//                result.reason = message;
+//                _ = new LoggerLibrary("KsUnion", "transferUrl").Info(body).SaveAsync();
+//                return result;
+//            }
+
+//            if (string.IsNullOrEmpty(root.result?.multiGroupShortUrl))
+//            {
+//                result.success = false;
+//                result.message = "转链失败";
+//                result.reason = "无法转链";
+//                //_ = new LoggerLibrary("KsUnion", "transferUrl").Info(body).SaveAsync();
+//                return result;
+//            }
+
+//            if (!string.IsNullOrEmpty(root.result?.url))
+//            {
+//                result.itemId = root.result?.url.GetContentPart("goods_id=", "&");
+//            }
+
+//            result.success = true;
+//            result.message = "OK";
+//            result.link_type = LinkTypeEnum.goods;
+//            result.shortLinkurl = root.result?.multiGroupShortUrl;
+//            result.content = result.shortLinkurl;
+//            result.deeplink_url = GetDeeplink(result.shortLinkurl);
+
+
+//            return result;
+//        }
+
+
+//        public async Task<KsDataDTO> createPromotionUrl(KsDataDTO result, string sourceUrl, CancellationToken cancellationToken = default)
+//        {
+//            var ts = DateTime.Now.Convert2UnixTimestamp(true);
+//            string cookies = _account.cookies.Trim();
+
+//            string useragent = ProviderFakeUserAgent.RandomComputer;
+//            string url = "https://jinbao.pinduoduo.com/network/api/promotion/createPromotionUrl";
+
+//            //{"pid":"13848803_189356569","sourceUrl":"https://p.pinduoduo.com/1OAsct0r"}
+
+//            string goodsId = sourceUrl;
+//            var args = new
+//            {
+//                _account.pid,
+//                goodsId,
+//                generateOpenCoupon = true
+//            };
+
+//            /*
+//{
+//	"mediaId": "9092702778",
+//	"pid": "13848803_189356569",
+//	"goodsId": "123",
+//	"generateOpenCoupon": true
+//}             
+//             */
+//            string data = args.Convert2Json();
+
+//            WebClientUtility client = new WebClientUtility();
+//            client.Proxy = _proxy;
+//#if DEBUG
+//            client.Proxy = null;
+//#endif
+//            client.SetContentType("application/json");
+//            client.AddHeaders("Referer", "https://jinbao.pinduoduo.com/promotion/url-promotion");
+//            client.AddHeaders("Origin", "https://jinbao.pinduoduo.com");
+//            client.UserAgent = useragent;
+//            client.AddHeaders("Cookie", cookies);
+//            client.Post(data);
+//            var response = await client.RequestAsync(url, "POST", cancellationToken);
+
+//            string body = response.Body();
+//            var root = body.Convert2Object<KsCreatePromotionUrlResponse>();
+//            string message = string.Empty;
+
+//            if (!root.success)
+//            {
+//                message = $"{root.errorCode}:{root.errorMsg}";
+//                result.success = false;
+//                result.message = "转链失败";
+//                result.reason = message;
+//                _ = new LoggerLibrary("KsUnion", "transferUrl").Info(body).SaveAsync();
+//                return result;
+//            }
+
+//            if (string.IsNullOrEmpty(root.result?.multiGroupShortUrl))
+//            {
+//                result.success = false;
+//                result.message = "转链失败";
+//                result.reason = "无法转链";
+//                //_ = new LoggerLibrary("KsUnion", "transferUrl").Info(body).SaveAsync();
+//                return result;
+//            }
+
+//            //goods_id=636365867069&pid=13848803_189356569&goods_sign=E9z2NkASdqlKuWDVwvfdqnADgCEqTQSt_JuMe2WC0G&zs_duo_id=25194414&cpsSign=CC_240807_13848803_189356569_fdbbdfa499058644becc9f8b3b7acaaf&_x_ddjb_act=
+
+//            if (!string.IsNullOrEmpty(root.result?.url))
+//            {
+//                result.itemId = root.result?.url.GetContentPart("goods_id=", "&");
+//            }
+
+//            result.success = true;
+//            result.message = "OK";
+//            result.link_type = LinkTypeEnum.goods;
+//            result.shortLinkurl = root.result?.multiGroupShortUrl;
+//            result.content = result.shortLinkurl;
+//            result.deeplink_url = GetDeeplink(result.shortLinkurl);
+
+
+//            return result;
+//        }
+
+    }
+}

+ 255 - 0
molilian.core/Plus/ks/KsUnionPlus.cs

@@ -0,0 +1,255 @@
+using COSXML.Network;
+using dodohold.core;
+using Spire.Pdf.Graphics;
+using System.Diagnostics;
+using System.Net;
+using System.Text.RegularExpressions;
+using TencentCloud.Apm.V20210622.Models;
+using static dodohold.core.ZTOExpress.CreateOrderArgs;
+
+namespace molilian.core
+{
+    public partial class KsUnionPlus
+    {
+        public static string _url_pattern = @"https?://(?:[\w-]+\.)*(?:chenzhongtech\.com|kuaishou\.com)(?:/[^\s]*)?";
+
+
+        public static string GetLink(string content)
+        {
+            if (string.IsNullOrEmpty(content)) return content;
+            string result = content;
+            //
+            Regex regex = new(_url_pattern);
+            MatchCollection matches = regex.Matches(content);
+
+            foreach (Match m in matches.Cast<Match>())
+            {
+                string url = m.Value;
+                return url;
+            }
+            return string.Empty;
+        }
+        public static string GetDeeplink(string url, LinkTypeEnum type)
+        {
+            string shareObjectId = string.Empty;
+            string url_pattern = @"shareObjectId=([^\s&]+)";
+            var match = Regex.Match(url, url_pattern);
+            if (match.Success) shareObjectId = match.Groups[1].Value;
+
+            string result = type switch
+            {
+                LinkTypeEnum.video => $"kwai://work/{shareObjectId}",
+                LinkTypeEnum.profile => $"kwai://profile/{shareObjectId}",
+                LinkTypeEnum.live => $"kwai://live/play/{shareObjectId}",
+                LinkTypeEnum.baseDomain or LinkTypeEnum.other_aff => "kwai://home",
+                LinkTypeEnum.goods or LinkTypeEnum.note => "kwai://home",
+                _ => string.Empty,
+            };
+            return result;
+        }
+
+        public static KsDataDTO GetFormattedObject(string content, string ip = "", string oaid = "")
+        {
+            string shortLinkurl = GetLink(content);
+            LinkTypeEnum link_type = string.IsNullOrEmpty(shortLinkurl) ? LinkTypeEnum.unknown : LinkTypeEnum.baseDomain;
+
+            string deeplink_url = GetDeeplink(shortLinkurl, link_type);
+            return new KsDataDTO()
+            {
+                message = string.Empty,
+                link_type = link_type,
+                channel = TkChannelEnum.ks,
+                accountName = string.Empty,
+                success = false,
+                content = content,
+                ip = ip,
+                oaid = oaid,
+                elapsedTime = 0,
+                itemName = "点击打开快手APP",
+                shortLinkurl = shortLinkurl,
+                deeplink_url = deeplink_url,
+                create_time = DateTime.Now,
+                end_point = _end_point,
+            };
+        }
+
+
+        private LinkTypeEnum GetLinkType(string url)
+        {
+            if (string.IsNullOrEmpty(url)) return LinkTypeEnum.unknown;
+
+            string url_pattern = @"https?://(?:[\w-]+\.)*(?:chenzhongtech\.com|kuaishou\.com)/fw/(?:photo|long-video)/[^\s]*\bshareObjectId=[^\s&]+";
+            var match = Regex.Match(url, url_pattern);
+            if (match.Success) return LinkTypeEnum.video;
+
+            url_pattern = @"https?://(?:[\w-]+\.)*(?:chenzhongtech\.com|kuaishou\.com)/fw/user/[^\s]*\bshareObjectId=[^\s&]+";
+            match = Regex.Match(url, url_pattern);
+            if (match.Success) return LinkTypeEnum.profile;
+
+            url_pattern = @"https?://(?:[\w-]+\.)*(?:chenzhongtech\.com|kuaishou\.com)/fw/live/[^\s]*\bshareObjectId=[^\s&]+";
+            match = Regex.Match(url, url_pattern);
+            if (match.Success) return LinkTypeEnum.live;
+
+            if (url.Contains("chenzhongtech.com") || url.Contains("kuaishou.com")) return LinkTypeEnum.baseDomain;
+
+            return LinkTypeEnum.unknown;
+        }
+
+
+
+
+        private bool IsAffCode(string content)
+        {
+            string url_pattern = @"復制整段消息,打開快手|复制整段消息,打开快手";
+            var match = Regex.Match(content, url_pattern);
+            if (match.Success) return true;
+            return false;
+        }
+
+        private async Task<(bool, string)> GetDesiredUrlAsync(string url)
+        {
+            string result = url;
+            try
+            {
+                string pattern = @"https:\/\/v\.kuaishou\.com\/[A-Za-z0-9]+";
+                Match match = Regex.Match(url, pattern);
+
+                //不是短网址,不用展开
+                if (!match.Success) return (true, url);
+
+                WebClientUtility client = new()
+                {
+                    Proxy = _proxy ?? ProxyNodesCore.RandomOne(),
+                    UserAgent = Sayaka.Common.ProviderFakeUserAgent.RandomComputer,
+                    AllowAutoRedirect = false
+                };
+#if DEBUG
+                client.Proxy = null;
+#endif
+                client.Timeout = GetRequestTimeout(0);
+                var response = await client.RequestAsync(url);
+
+                if (response.ResponseMessage != null)
+                {
+                    result = response.ResponseMessage.Headers.Location.ToString();
+                    result = result.UrlDecode();
+                    return (true, result);
+                }
+            }
+            catch (Exception ex)
+            {
+                result = $"{ex.Message}\n{ex.StackTrace}";
+            }
+            return (false, result);
+        }
+
+        public TimeSpan GetRequestTimeout(int deduction = 0)
+        {
+#if DEBUG
+            return TimeSpan.FromMilliseconds(10 * 1000);
+#endif
+            int min = (int)(_config.rt_max * 0.3);
+            if (_config.rt_max == 0) return TimeSpan.FromMilliseconds(1000);
+
+            int timeout = _config.rt_max;
+            if (deduction == 0)
+            {
+                timeout -= min;
+                return TimeSpan.FromMilliseconds(timeout);
+            }
+
+            timeout -= deduction;
+            if (timeout <= min) return TimeSpan.FromMilliseconds(1);
+            return TimeSpan.FromMilliseconds(min);
+        }
+
+        public async Task<KsDataDTO> KsParseAsync(string content, KsDataDTO result, CancellationToken cancellationToken = default)
+        {
+            //正文里面不包含url
+            if (string.IsNullOrEmpty(result.shortLinkurl) && IsAffCode(content))
+            {
+                result.success = false;
+                result.link_type = LinkTypeEnum.other_aff;
+                result.message = "放弃转链";
+                result.reason = "其他推广链接";
+                result.accountId = 0;
+                result.accountName = string.Empty;
+                result.content = content;
+                result.deeplink_url = GetDeeplink(content, LinkTypeEnum.goods);
+                return result;
+            }
+
+            string url = string.Empty;
+            if (!string.IsNullOrEmpty(result.shortLinkurl))
+            {
+
+                //从http获取跳转的url
+                Stopwatch stopwatch = Stopwatch.StartNew();
+                stopwatch.Start();
+                (bool success, url) = await GetDesiredUrlAsync(result.shortLinkurl);
+                stopwatch.Stop();
+                // 获取执行时间
+                result.elapsedTime2 = (int)stopwatch.ElapsedMilliseconds;
+
+
+                result.link_type = GetLinkType(url);
+
+                if (result.link_type == LinkTypeEnum.other_aff)
+                {
+                    result.success = false;
+                    result.message = "放弃转链";
+                    result.reason = "其他推广链接";
+                    result.accountId = 0;
+                    result.accountName = string.Empty;
+                    result.content = content;
+                    result.deeplink_url = GetDeeplink(content, LinkTypeEnum.goods);
+                    return result;
+                }
+
+                //没有链接、 不是链接
+                if (!success)
+                {
+                    result.success = false;
+                    result.link_type = LinkTypeEnum.unknown;
+                    result.message = "放弃转链";
+                    result.reason = url;
+                    result.accountId = 0;
+                    result.accountName = string.Empty;
+                    result.content = content;
+                    return result;
+                }
+                result.deeplink_url = GetDeeplink(url, result.link_type);
+                return result;
+            }
+
+
+            if (!result.ip.StartsWith("127.0.0") && FlowControlIgnoreRequest(_config, out string reason))
+            {
+                result.success = false;
+                result.link_type = LinkTypeEnum.unknown;
+                result.message = "放弃转链";
+                result.reason = reason;
+                result.accountId = 0;
+                result.accountName = string.Empty;
+                result.content = content;
+                result.deeplink_url = GetDeeplink(content, LinkTypeEnum.goods);
+                return result;
+            }
+            //result.shortLinkurl = url;
+
+
+
+            switch (_account.work_mode)
+            {
+                case KsUnionWorkMode.SiteApi:
+                    result = await UnionGeneratelink(result, content, cancellationToken);
+                    break;
+                case KsUnionWorkMode.Crawler:
+                default:
+                    //result = await transferUrl(result, url, cancellationToken);
+                    break;
+            }
+            return result;
+        }
+    }
+}

+ 102 - 0
molilian.core/Plus/ks/base.cs

@@ -0,0 +1,102 @@
+using System.Net;
+using dodohold.core.kwaixiaodian;
+
+
+namespace molilian.core
+{
+    public partial class KsUnionPlus
+    {
+        static Random _random = new Random();
+        private WebProxy? _proxy = null;
+
+        public TkConfigDTO _config;
+        private static KsPoolDTO _account;
+        private static string _end_point;
+
+
+        string server = "https://openapi.kwaixiaodian.com";
+
+        static KsUnionPlus()
+        {
+            _end_point = Environment.GetEnvironmentVariable("EndPoint");
+        }
+
+        KwaiXiaodianPlus plus;
+        public KsUnionPlus(KsPoolDTO account)
+        {
+            _account = account;
+            _config = TkConfigCore.Get();
+
+            if (!string.IsNullOrEmpty(account.nodeName))
+            {
+                _proxy = ProxyNodesCore.GetOne(account.nodeName);
+            }
+
+            plus = new KwaiXiaodianPlus(server, _account.app_key, _account.app_secret, _account.sign_secret,
+                _account.event_secret, string.Empty, 0);
+        }
+
+        public static bool ShouldIgnoreRequest(TkConfigDTO config, string ip, string oaid, out string reason)
+        {
+            reason = string.Empty;
+            try
+            {
+                // IP和流量控制
+                string ignorePercentageCity = config.ksIgnorePercentageCity;
+                string? ipInfo = IP2RegionPlus.Search(ip);
+                if (AlimamaPlus.IgnoreRegionIncluded(ignorePercentageCity, ipInfo, out string regionInfo))
+                {
+                    reason = $"地区控制:{regionInfo}";
+                    return true;
+                }
+
+                int limit_num = config.ks_limit_per_ip_24h;
+                if (limit_num > 0)
+                {
+                    int num = TkLogCore.getClientRequestTotalByIp(TkChannelEnum.ks, ip);
+                    if (num > limit_num)
+                    {
+                        reason = "IP控制";
+                        return true;
+                    }
+                    num = TkLogCore.getClientRequestTotalByOAID(TkChannelEnum.ks, oaid);
+                    if (num > limit_num)
+                    {
+                        reason = "OAID控制";
+                        return true;
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                reason = "配置异常";
+            }
+            return false;
+        }
+
+        public static bool FlowControlIgnoreRequest(TkConfigDTO config, out string reason)
+        {
+            reason = string.Empty;
+            try
+            {
+                // IP和流量控制
+                int ignorePercentage = config.ksIgnorePercentage;
+                if (ignorePercentage == 0) return false;
+
+
+                var randomValue = (decimal)_random.Next(0, 100);
+                bool result = randomValue <= ignorePercentage; // 如果生成的随机数小于忽略百分比,则返回 true,表示需要忽略请求
+                if (result)
+                {
+                    reason = "流量控制";
+                    return true;
+                }
+            }
+            catch (Exception ex)
+            {
+                reason = $"配置异常";
+            }
+            return false;
+        }
+    }
+}

+ 242 - 0
molilian.core/Plus/ks/open.cs

@@ -0,0 +1,242 @@
+using dodohold.core;
+
+namespace molilian.core
+{
+
+
+    public partial class KsUnionPlus
+    {
+
+        public class BaseResponse
+        {
+            public int result { get; set; }
+            public string msg { get; set; }
+            public string error_msg { get; set; }
+            public string code { get; set; }
+            public string requestId { get; set; }
+            public string sub_msg { get; set; }
+            public string sub_code { get; set; }
+        }
+
+        public class GetItemIdResponse : BaseResponse
+        {
+            public ParseInfoDTO data { get; set; } = new ParseInfoDTO { };
+        }
+
+        public class ParseCpsUrlResponse : BaseResponse
+        {
+            public DistributeCpsPidLinkDTO data { get; set; } = new DistributeCpsPidLinkDTO { };
+        }
+
+
+        public class DistributeCpsPidLinkDTO
+        {
+            public string linkCode { get; set; } = string.Empty;
+            public string linkUrl { get; set; } = string.Empty;
+            public string kwaiUrl { get; set; } = string.Empty;
+            public string cpsPid { get; set; } = string.Empty;
+            public string nebulaKwaiUrl { get; set; } = string.Empty;
+            public string shortContent { get; set; } = string.Empty;
+            public string longContent { get; set; } = string.Empty;
+            public string commandContent { get; set; } = string.Empty;
+            public string shareToken { get; set; } = string.Empty;
+            public string minaShortLink { get; set; } = string.Empty;
+            public bool hasSecondActivity { get; set; } = true;
+        }
+
+
+        public class ParseInfoDTO
+        {
+            public long itemId { get; set; }
+        }
+
+
+
+        public async Task<KsDataDTO> UnionGeneratelink(KsDataDTO result, string content, CancellationToken cancellationToken = default)
+        {
+            long item_id = getItemId(content);
+            var data = parseCpsUrl(item_id);
+
+            /*
+             {"result":100001,"msg":"业务处理失败","error_msg":"分销商品不存在或已下架","code":"807000","requestId":"724092832538976441","sub_msg":"分销商品不存在或已下架","sub_code":"100001"}
+            */
+
+            if (data.result != 1)
+            {
+                result.success = false;
+                result.message = "转链失败";
+                result.reason = data.error_msg;
+                result.deeplink_url = GetDeeplink(content, LinkTypeEnum.goods);
+                return result;
+            }
+            result.link_type = LinkTypeEnum.goods;
+            result.shortLinkurl = data.data.linkUrl;
+            result.deeplink_url = data.data.kwaiUrl;
+            return result;
+        }
+
+        public long getItemId(string content)
+        {
+            //todo 写死 
+            var _ticket = new dodohold.core.kwaixiaodian.AccessTokenDTO();
+            _ticket.access_token = "ChFvYXV0aC5hY2Nlc3NUb2tlbhJgiUxQMorqEhwJeNGcTk-ihdeaHUB7Q8z3C0vUUgqzC3gjX93_ZoCSJQVp1_uZjj_6myeHUILcNTvxOtiTXPdCF_YgS-Sgl3SPwxQgeVd62ltjj63-gQAm4PzEZawyxAEqGhLmzpljLPVHbK1DJTZ-cNTpKfIiIDMWIXZK5-NgxjH205_ulDVmPZBcMx8f14Nkd4l2b0sXKAUwAQ";
+
+
+            string action = "open.distribution.cps.kwaimoney.link.parse";
+            var data = new { cpsLink = content };
+            var body = plus.Request(_ticket, action, data.Convert2Json(), "POST");
+
+            var result = body.Convert2Object<GetItemIdResponse>();
+            return result.data.itemId;
+        }
+
+
+        public ParseCpsUrlResponse parseCpsUrl(long itemId)
+        {
+            //todo 写死 
+            var _ticket = new dodohold.core.kwaixiaodian.AccessTokenDTO();
+            _ticket.access_token = "ChFvYXV0aC5hY2Nlc3NUb2tlbhJgiUxQMorqEhwJeNGcTk-ihdeaHUB7Q8z3C0vUUgqzC3gjX93_ZoCSJQVp1_uZjj_6myeHUILcNTvxOtiTXPdCF_YgS-Sgl3SPwxQgeVd62ltjj63-gQAm4PzEZawyxAEqGhLmzpljLPVHbK1DJTZ-cNTpKfIiIDMWIXZK5-NgxjH205_ulDVmPZBcMx8f14Nkd4l2b0sXKAUwAQ";
+
+
+            string action = "open.distribution.cps.kwaimoney.link.create";
+            var ts = DateTime.Now.Convert2UnixTimestamp();
+            string comments = ts.ToString();
+            int linkType = 101;
+            var data = new
+            {
+                linkType,
+                linkCarrierId = itemId,
+                comments,
+                cpsPid = _account.pid,
+                genPoster = false,
+            };
+            var body = plus.Request(_ticket, action, data.Convert2Json(), "POST");
+            var result = body.Convert2Object<ParseCpsUrlResponse>();
+
+            return result;
+        }
+
+        //public class ErrorResponse
+        //{
+        //    public string error_msg { get; set; }
+        //    public string sub_msg { get; set; }
+        //    public string sub_code { get; set; }
+        //    public int error_code { get; set; }
+        //    public string request_id { get; set; }
+        //}
+
+
+        //public class GoodsZsUnitGenerateResponse
+        //{
+        //    public string multi_group_mobile_short_url { get; set; }
+        //    public string multi_group_url { get; set; }
+        //    public string mobile_url { get; set; }
+        //    public string multi_group_short_url { get; set; }
+        //    public string mobile_short_url { get; set; }
+        //    public string multi_group_mobile_url { get; set; }
+        //    public string request_id { get; set; }
+        //    public string url { get; set; }
+        //    public string short_url { get; set; }
+        //}
+        //public class UnionGeneratelinkDTO
+        //{
+        //    public GoodsZsUnitGenerateResponse goods_zs_unit_generate_response { get; set; }
+        //    public ErrorResponse error_response { get; set; }
+        //}
+
+
+        //public static Dictionary<string, string> GenerateSignature(KsPoolDTO account, Dictionary<string, string> args)
+        //{
+        //    if (args.ContainsKey("sign")) args.Remove("sign");
+        //    // 对参数进行ASCII升序排序
+        //    var sortedArgs = args.OrderBy(kv => kv.Key).ToDictionary(kv => kv.Key, kv => kv.Value);
+
+        //    // 拼接排序后的参数
+        //    StringBuilder stringBuilder = new StringBuilder();
+        //    foreach (var kv in sortedArgs)
+        //    {
+        //        stringBuilder.Append(kv.Key).Append(kv.Value);
+        //    }
+
+        //    // 在头部和尾部分别拼接client_secret
+        //    string signString = account.app_secret + stringBuilder.ToString() + account.app_secret;
+        //    signString = signString.MD5(false, false);
+
+        //    if (!args.TryAdd("sign", signString))
+        //    {
+        //        args["sign"] = signString;
+        //    }
+        //    return args;
+        //}
+
+
+        //        /// <summary>
+        //        /// 多多进宝转链接口
+        //        /// </summary>
+        //        /// <param name="result"></param>
+        //        /// <param name="sourceUrl"></param>
+        //        /// <param name="cancellationToken"></param>
+        //        /// <returns></returns>
+        //        public async Task<KsDataDTO> UnionGeneratelink(KsDataDTO result, string sourceUrl, CancellationToken cancellationToken = default)
+        //        {
+        //            var ts = DateTime.Now.Convert2UnixTimestamp(true);
+        //            var args = new Dictionary<string, string>
+        //            {
+        //                { "type", "ks.ddk.goods.zs.unit.url.gen" },
+        //                { "data_type", "JSON" },
+        //                { "client_id", _account.app_key },
+        //                { "pid", _account.pid },
+        //                { "source_url", sourceUrl },
+        //                { "timestamp", ts.ToString() }
+        //            };
+        //            args = GenerateSignature(_account, args);
+
+        //            var query = HttpUtility.ParseQueryString(string.Empty);
+        //            foreach (var kvp in args) query[kvp.Key] = kvp.Value;
+        //            string urlWithQuery = $"{_baseUrl}?{query}";
+
+
+        //            WebClientUtility client = new();
+        //            client.Proxy = _proxy;
+        //#if DEBUG
+        //            client.Proxy = null;
+        //#endif
+        //            client.SetContentType("application/json");
+        //            var response = await client.RequestAsync(urlWithQuery, "GET", cancellationToken);
+
+        //            string body = response.Body();
+        //            var root = body.Convert2Object<UnionGeneratelinkDTO>();
+        //            string message = string.Empty;
+        //            _ = new LoggerLibrary("KsUnion", "debug ").Info(urlWithQuery, body).SaveAsync();
+
+        //            if (root.error_response != null || root.goods_zs_unit_generate_response == null)
+        //            {
+        //                message = $"{root.error_response.sub_code}:{root.error_response.sub_msg}";
+        //                result.success = false;
+        //                result.message = "转链失败";
+        //                result.reason = message;
+        //                _ = new LoggerLibrary("KsUnion", "UnionGeneratelink").Info(urlWithQuery, body).SaveAsync();
+        //                return result;
+        //            }
+
+        //            if (string.IsNullOrEmpty(root.goods_zs_unit_generate_response.url))
+        //            {
+        //                result.success = false;
+        //                result.message = "转链失败";
+        //                result.reason = "无法转链";
+        //                _ = new LoggerLibrary("KsUnion", "UnionGeneratelink").Info(urlWithQuery, body).SaveAsync();
+        //                return result;
+        //            }
+
+        //            result.itemId = root.goods_zs_unit_generate_response.url.GetContentPart("goods_id=", "&");
+
+        //            result.success = true;
+        //            result.message = "OK";
+        //            result.link_type = LinkTypeEnum.goods;
+        //            result.shortLinkurl = root.goods_zs_unit_generate_response.short_url;
+        //            result.content = result.shortLinkurl;
+        //            result.deeplink_url = GetDeeplink(result.shortLinkurl);
+        //            return result;
+        //        }
+    }
+}

Some files were not shown because too many files changed in this diff