START TRANSACTION;

INSERT INTO ccdi_bank_tag_rule (
    model_code,
    model_name,
    rule_code,
    rule_name,
    indicator_code,
    result_type,
    risk_level,
    business_caliber,
    enabled,
    sort_order,
    create_by,
    remark
) VALUES
('SUSPICIOUS_GAMBLING', '疑似赌博', 'GAMBLING_SENSITIVE_KEYWORD', '疑似敏感交易', NULL, 'STATEMENT', 'HIGH', '备注或交易摘要、对手有“游戏、抖币、体彩、福彩”等字眼。', 1, 20, 'system', '真实规则：识别摘要或对手方命中赌博敏感词的支出流水'),
('SUSPICIOUS_RELATION', '可疑关系', 'SPECIAL_AMOUNT_TRANSACTION', '特殊金额交易', NULL, 'STATEMENT', NULL, '除与配偶、子女外，发生特殊金额交易，如1314元、520元等具有特殊含义的金额。', 1, 10, 'system', '真实规则：识别与非配偶子女发生的特殊金额交易'),
('SUSPICIOUS_PART_TIME', '可疑兼职', 'SUSPICIOUS_INCOME_KEYWORD', '疑似兼职', NULL, 'STATEMENT', 'HIGH', '转入资金摘要有“工资”、“分红”、“红利”、“利息（非银行结息）”等收入', 1, 30, 'system', '真实规则：识别非本行工资代发的收入关键词转入流水'),
('SUSPICIOUS_FOREIGN_EXCHANGE', '可疑外汇交易', 'FOREX_BUY_AMT', '可疑外汇交易', 'SINGLE_PURCHASE_AMOUNT', 'STATEMENT', NULL, '单笔购汇金额超限', 1, 10, 'system', '真实规则：识别单笔购汇金额超过阈值的流水'),
('SUSPICIOUS_FOREIGN_EXCHANGE', '可疑外汇交易', 'FOREX_SELL_AMT', '可疑外汇交易', 'SINGLE_SETTLEMENT_AMOUNT', 'STATEMENT', NULL, '单笔结汇金额超限', 1, 20, 'system', '真实规则：识别单笔结汇金额超过阈值的流水'),
('SUSPICIOUS_PURCHASE', '可疑采购', 'LARGE_PURCHASE_TRANSACTION', '可疑采购', NULL, 'STATEMENT', NULL, '单笔采购金额超过10万元。', 1, 10, 'system', '真实规则：识别单笔采购金额超过10万元的采购事项'),
('ABNORMAL_BEHAVIOR', '异常行为', 'STOCK_TFR_LARGE', '可疑银证大额转账', 'STOCK_TFR_LARGE', 'STATEMENT', NULL, '家庭老人/非关系人银证大额转账', 1, 10, 'system', '真实规则：识别银证转账金额超过阈值的流水'),
('ABNORMAL_BEHAVIOR', '异常行为', 'WITHDRAW_CNT', '微信支付宝频繁提现', 'WITHDRAW_CNT', 'OBJECT', NULL, '微信、支付宝单日提现次数超过设置次数', 1, 20, 'system', '真实规则：识别微信支付宝单日提现次数超过阈值的对象'),
('ABNORMAL_BEHAVIOR', '异常行为', 'LARGE_STOCK_TRADING', '大额炒股', 'STOCK_TFR_LARGE', 'STATEMENT', 'HIGH', '单次三方资管交易金额超过100万元。', 1, 60, 'system', '真实规则：识别单笔三方资管交易金额超过阈值的流水')
ON DUPLICATE KEY UPDATE
    model_code = VALUES(model_code),
    model_name = VALUES(model_name),
    rule_name = VALUES(rule_name),
    indicator_code = VALUES(indicator_code),
    result_type = VALUES(result_type),
    risk_level = VALUES(risk_level),
    business_caliber = VALUES(business_caliber),
    enabled = VALUES(enabled),
    sort_order = VALUES(sort_order),
    update_by = 'system',
    update_time = NOW(),
    remark = VALUES(remark);

COMMIT;
