|
@@ -13,6 +13,7 @@ using System.Linq;
|
|
|
using static dodohold.core.ZTOExpress.CreateOrderArgs;
|
|
using static dodohold.core.ZTOExpress.CreateOrderArgs;
|
|
|
using MySqlX.XDevAPI;
|
|
using MySqlX.XDevAPI;
|
|
|
using TencentCloud.Ame.V20190916.Models;
|
|
using TencentCloud.Ame.V20190916.Models;
|
|
|
|
|
+using YunhuiKit;
|
|
|
|
|
|
|
|
namespace molilian.api.Controllers
|
|
namespace molilian.api.Controllers
|
|
|
{
|
|
{
|
|
@@ -417,12 +418,25 @@ namespace molilian.api.Controllers
|
|
|
{
|
|
{
|
|
|
return new APIResult(new { success = false, message = "查询条件不能为空" });
|
|
return new APIResult(new { success = false, message = "查询条件不能为空" });
|
|
|
}
|
|
}
|
|
|
|
|
+ int[] report_account_ids = account.report_account_ids.ToArray<int>(',');
|
|
|
|
|
+ int[] report_exclude_account_ids = account.report_exclude_account_ids.ToArray<int>(',');
|
|
|
|
|
+
|
|
|
string filter = $"batchId=@query";
|
|
string filter = $"batchId=@query";
|
|
|
var account_list = await TkPoolCore.ListAsync();
|
|
var account_list = await TkPoolCore.ListAsync();
|
|
|
List<int> account_ids = [];
|
|
List<int> account_ids = [];
|
|
|
if (account_list.Any())
|
|
if (account_list.Any())
|
|
|
{
|
|
{
|
|
|
account_ids = account_list.Where(e => e.enable_fake_click).Select(e => e.id).ToList();
|
|
account_ids = account_list.Where(e => e.enable_fake_click).Select(e => e.id).ToList();
|
|
|
|
|
+
|
|
|
|
|
+ if (report_account_ids.Length > 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ account_ids = account_ids.Intersect(report_account_ids).ToList();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (report_exclude_account_ids.Length > 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ account_ids = account_ids.Except(report_exclude_account_ids).ToList();
|
|
|
|
|
+ }
|
|
|
filter += $" AND accountId IN @account_ids";
|
|
filter += $" AND accountId IN @account_ids";
|
|
|
}
|
|
}
|
|
|
string orderBy = "paid_time ASC";
|
|
string orderBy = "paid_time ASC";
|
|
@@ -449,6 +463,8 @@ namespace molilian.api.Controllers
|
|
|
_ = log.SaveAsync();
|
|
_ = log.SaveAsync();
|
|
|
|
|
|
|
|
var update = new DBContext.Table("tk_order_tracking")
|
|
var update = new DBContext.Table("tk_order_tracking")
|
|
|
|
|
+ .Add("last_pull_time", DateTime.Now)
|
|
|
|
|
+ .Add("last_pull_account", account.name)
|
|
|
.Add("clicked_num:", "clicked_num+1")
|
|
.Add("clicked_num:", "clicked_num+1")
|
|
|
.Where("id IN @ids", new { ids })
|
|
.Where("id IN @ids", new { ids })
|
|
|
.Update();
|
|
.Update();
|
|
@@ -464,16 +480,46 @@ namespace molilian.api.Controllers
|
|
|
|
|
|
|
|
|
|
|
|
|
[HttpGet]
|
|
[HttpGet]
|
|
|
- public async Task<ActionResult> unsafeParseDpList([FromQuery] string query = "")
|
|
|
|
|
|
|
+ public async Task<ActionResult> unsafeParseDpList([FromQuery] string a = "", [FromQuery] string query = "")
|
|
|
{
|
|
{
|
|
|
|
|
+ if (string.IsNullOrEmpty(a))
|
|
|
|
|
+ {
|
|
|
|
|
+ return new APIResult(new { success = false, message = "验证错误" }, APIResultCodeEnum.Unauthorized);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var account = await ApiAccountCore.GetOneAsync(a);
|
|
|
|
|
+ if (account == null || !account.enable_report)
|
|
|
|
|
+ {
|
|
|
|
|
+ return new APIResult(new { success = false, message = "验证错误3" }, APIResultCodeEnum.Unauthorized);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (string.IsNullOrEmpty(query))
|
|
|
|
|
+ {
|
|
|
|
|
+ return new APIResult(new { success = false, message = "查询条件不能为空" });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ int[] report_account_ids = account.report_account_ids.TryToArray<int>(',');
|
|
|
|
|
+ int[] report_exclude_account_ids = account.report_exclude_account_ids.TryToArray<int>(',');
|
|
|
|
|
+
|
|
|
string filter = $"batchId=@query";
|
|
string filter = $"batchId=@query";
|
|
|
var account_list = await TkPoolCore.ListAsync();
|
|
var account_list = await TkPoolCore.ListAsync();
|
|
|
List<int> account_ids = [];
|
|
List<int> account_ids = [];
|
|
|
if (account_list.Any())
|
|
if (account_list.Any())
|
|
|
{
|
|
{
|
|
|
account_ids = account_list.Where(e => e.enable_fake_click).Select(e => e.id).ToList();
|
|
account_ids = account_list.Where(e => e.enable_fake_click).Select(e => e.id).ToList();
|
|
|
|
|
+
|
|
|
|
|
+ if (report_account_ids.Length > 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ account_ids = account_ids.Intersect(report_account_ids).ToList();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (report_exclude_account_ids.Length > 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ account_ids = account_ids.Except(report_exclude_account_ids).ToList();
|
|
|
|
|
+ }
|
|
|
filter += $" AND accountId IN @account_ids";
|
|
filter += $" AND accountId IN @account_ids";
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
string orderBy = "paid_time ASC";
|
|
string orderBy = "paid_time ASC";
|
|
|
|
|
|
|
|
var data = new DBContext.Table("tk_order_tracking")
|
|
var data = new DBContext.Table("tk_order_tracking")
|