Эх сурвалжийг харах

增对账号增加fake click配置;
增加输出 accountid字段;

dodo hold 2 жил өмнө
parent
commit
46cd28a78b

+ 1 - 1
molilian.api/Controllers/public/TaskController.cs

@@ -567,7 +567,7 @@ namespace molilian.api.Controllers
             if (jd_list != null)
             {
                 DateTime startDate = DateTime.Now.AddDays(-1);
-                DateTime endDate = DateTime.Now;
+                DateTime endDate = DateTime.Now.AddDays(-1);
                 foreach (var account in jd_list)
                 {
                     if (!account.status) continue;

+ 7 - 2
molilian.api/Controllers/public/TkController.cs

@@ -532,7 +532,7 @@ namespace molilian.api.Controllers
             List<object> list = [];
             foreach (var item in data)
             {
-                list.Add(new { url = item.deeplinkUrl, item.shortLinkUrl, count = item.click_num, time = item.exp_time });
+                list.Add(new { item.accountId, url = item.deeplinkUrl, item.shortLinkUrl, count = item.click_num, time = item.exp_time });
             }
             var clientIp = _accessor.HttpContext.GetUserIp();
             LoggerLibrary log = new LoggerLibrary("api", "dplist");
@@ -542,6 +542,11 @@ namespace molilian.api.Controllers
             log.Info(string.Join(',', ids));
             _ = log.SaveAsync();
 
+            var update = new DBContext.Table("tk_order_tracking")
+                .Add("clicked_num:", "clicked_num+1")
+                .Where("id IN @ids", new { ids })
+                .Update();
+
             return new APIResult(new
             {
                 success = true,
@@ -573,7 +578,7 @@ namespace molilian.api.Controllers
             List<object> list = [];
             foreach (var item in data)
             {
-                list.Add(new { url = item.deeplinkUrl, item.shortLinkUrl, count = item.click_num, time = item.exp_time });
+                list.Add(new { item.accountId, url = item.deeplinkUrl, item.shortLinkUrl, count = item.click_num, time = item.exp_time });
             }
             var clientIp = _accessor.HttpContext.GetUserIp();
             LoggerLibrary log = new LoggerLibrary("api", "unsafeParseDpList");

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
molilian.api/Properties/PublishProfiles/https___ccr.ccs.tencentyun.com_shaobin.pubxml.user


+ 3 - 0
molilian.core/Core/taoke/OrderTrackingCore.cs

@@ -101,6 +101,9 @@ namespace molilian.core
             Random rand = new();
             int click_num = rand.Next(config.fake_click_min, config.fake_click_max + 1);
 
+            if (account.fake_click_min != 0 && account.fake_click_max != 0)
+                click_num = rand.Next(account.fake_click_min, account.fake_click_max + 1);
+
             DateTime paidTime = item.tbPaidTime;
             if (paidTime < summary.create_time) return false;
 

+ 1 - 0
molilian.core/DTO/alimama/TkOrderTrackingDTO.cs

@@ -28,6 +28,7 @@ namespace molilian.core
         public DateTime click_time { get; set; } = DateTime.MinValue;
         public DateTime paid_time { get; set; } = DateTime.MinValue;
         public int click_num { get; set; } = 0;
+        public int clicked_num { get; set; } = 0;
     }
 
 }

+ 2 - 0
molilian.core/DTO/alimama/TkPoolDTO.cs

@@ -33,6 +33,8 @@
         public string end_point { get; set; } = string.Empty;
         public bool enable_fake_click { get; set; } = false;
         public FakeClickLinkType fake_click_link_type { get; set; } = 0;
+        public int fake_click_max { get; set; } = 0;
+        public int fake_click_min { get; set; } = 0;
         public bool enable_parse { get; set; } = false;
         public bool enable_coupon { get; set; } = false;
         public bool enable_sync_order { get; set; } = false;

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно