|
|
@@ -14,6 +14,7 @@ using TencentCloud.Tcm.V20210413.Models;
|
|
|
using System.Security.Cryptography;
|
|
|
using System.Collections.Concurrent;
|
|
|
using YunhuiKit;
|
|
|
+using System.Xml.Linq;
|
|
|
|
|
|
|
|
|
namespace molilian.core
|
|
|
@@ -892,5 +893,41 @@ namespace molilian.core
|
|
|
.Where("id=@id", new { account.id })
|
|
|
.Update();
|
|
|
}
|
|
|
+
|
|
|
+ public static void AccountRisk(PddPoolDTO account)
|
|
|
+ {
|
|
|
+ string cache_key = $"cache:pdd_pool:{account.name}:disabled";
|
|
|
+ long count = RedisHelper.IncrBy(cache_key);
|
|
|
+ RedisHelper.Expire(cache_key, 10);
|
|
|
+ if (count > 1) return;
|
|
|
+
|
|
|
+
|
|
|
+ // 发送通知
|
|
|
+ string message = $"【PDD风控】【{account.id}:{account.name}】出现30007";
|
|
|
+ NotifyCore.Notify(new NifyMessage
|
|
|
+ {
|
|
|
+ message = message,
|
|
|
+ priority = NifyMessagePriority.high,
|
|
|
+ tags = ["red_circle"]
|
|
|
+ });
|
|
|
+
|
|
|
+ if (!account.is_hide)
|
|
|
+ {
|
|
|
+ _ = NotifyCore.QYWeixinPushNotifyAsync("PDD风控", message);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 设置风控标记
|
|
|
+ RiskControlCore.SetRiskCookie($"pdd:{account.id}", "30007");
|
|
|
+
|
|
|
+ // 更新数据库状态
|
|
|
+ new DBContext.Table("pdd_pool")
|
|
|
+ .Add("enable_parse", 0)
|
|
|
+ .Where("id=@id", new { account.id })
|
|
|
+ .Update();
|
|
|
+ _ = List(true);
|
|
|
+
|
|
|
+ _ = EndPointCore.NotifyReload(true);
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
}
|