|
|
@@ -0,0 +1,70 @@
|
|
|
+package shop.alien.config.properties;
|
|
|
+
|
|
|
+import lombok.Data;
|
|
|
+import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
|
+import org.springframework.cloud.context.config.annotation.RefreshScope;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+@Data
|
|
|
+@Component
|
|
|
+@RefreshScope
|
|
|
+@ConfigurationProperties(prefix = "risk-control")
|
|
|
+public class RiskControlProperties {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 洗钱嫌疑规则配置
|
|
|
+ */
|
|
|
+ private MoneyLaundering moneyLaundering = new MoneyLaundering();
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 账号异常规则配置
|
|
|
+ */
|
|
|
+ private AccountAbnormal accountAbnormal = new AccountAbnormal();
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 交易欺诈规则配置
|
|
|
+ */
|
|
|
+ private TradeFraud tradeFraud = new TradeFraud();
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 异常发布规则配置
|
|
|
+ */
|
|
|
+ private AbnormalPublish abnormalPublish = new AbnormalPublish();
|
|
|
+
|
|
|
+ @Data
|
|
|
+ public static class MoneyLaundering {
|
|
|
+ /**
|
|
|
+ * 每天交易次数阈值
|
|
|
+ */
|
|
|
+ private int dailyCount = 5;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 每笔交易金额阈值(元)
|
|
|
+ */
|
|
|
+ private double amountThreshold = 200.0;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Data
|
|
|
+ public static class AccountAbnormal {
|
|
|
+ /**
|
|
|
+ * 24小时内同一设备/mac注册账号数量阈值
|
|
|
+ */
|
|
|
+ private int regCount24h = 3;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Data
|
|
|
+ public static class TradeFraud {
|
|
|
+ /**
|
|
|
+ * 24小时内发布成功记录次数阈值
|
|
|
+ */
|
|
|
+ private int publishCount24h = 3;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Data
|
|
|
+ public static class AbnormalPublish {
|
|
|
+ /**
|
|
|
+ * 24小时内发布同类商品数量阈值
|
|
|
+ */
|
|
|
+ private int sameCategoryCount24h = 10;
|
|
|
+ }
|
|
|
+}
|