-- =============================================================================
-- 产品与功能点录入脚本（每新增一个产品，在此文件追加对应 SQL）
-- =============================================================================
-- 表说明：
--   product         - 产品（对外售卖项，product_en 需与前端 inquireCategories.feature 及 queryservicelogic productHandlers 一致）
--   feature         - 功能点/接口（api_id 需与天远接口及 apirequestService requestProcessors 一致）
--   product_feature - 产品与功能关联（一个产品可挂多个 feature，一般单接口产品为 1 条）
--
-- 若希望主键自增，可去掉各 INSERT 中的 id 列，由数据库自动分配。
-- 使用显式 id 时，请确保与现有数据不冲突（可先 SELECT MAX(id) 查看 product/feature/product_feature）。
-- =============================================================================

-- ------------------------------ 人车核验（简版）-----------------------------
-- product 39, feature 83, product_feature 148（示例，若已存在可跳过）
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        39,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '人车核验（简版）',
        'toc_PersonVehicleVerification',
        '<p>人车核验</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        83,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXGGB2Q',
        '人车核验（简版）',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        148,
        39,
        83,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 人车核验（详版）-----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        40,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '人车核验（详版）',
        'toc_PersonVehicleVerificationDetail',
        '<p>人车核验详版，提供更丰富的人车匹配详细信息。</p>',
        NULL,
        0.50,
        12.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        84,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXGYTS2',
        '人车核验（详版）',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        149,
        40,
        84,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 名下车辆(车牌) -----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        41,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '名下车辆(车牌)',
        'toc_VehiclesUnderNamePlate',
        '<p>按身份证与姓名查询名下车辆信息。</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        85,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXG5F3A',
        '名下车辆(车牌)',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        150,
        41,
        85,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 名下车辆(数量) -----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        42,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '名下车辆(数量)',
        'toc_VehiclesUnderNameCount',
        '<p>查询名下车辆数量</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        86,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXG4D2E',
        '名下车辆(数量)',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        151,
        42,
        86,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 车辆静态信息查询 -----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        43,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '车辆静态信息查询',
        'toc_VehicleStaticInfo',
        '<p>车辆静态信息查询</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        87,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXG5U0Z',
        '车辆静态信息查询',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        152,
        43,
        87,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 车辆里程记录(混合查询) -----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        44,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '车辆里程记录(混合查询)',
        'toc_VehicleMileageMixed',
        '<p>车辆里程记录混合查询</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        88,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXG1U4U',
        '车辆里程记录(混合查询)',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        153,
        44,
        88,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 二手车VIN估值 -----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        45,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '二手车VIN估值',
        'toc_VehicleVinValuation',
        '<p>二手车VIN估值</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        89,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXGY7F2',
        '二手车VIN估值',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        154,
        45,
        89,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 车辆过户简版查询 -----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        46,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '车辆过户简版查询',
        'toc_VehicleTransferSimple',
        '<p>车辆过户简版查询</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        90,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXG1H7Y',
        '车辆过户简版查询',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        155,
        46,
        90,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 车辆过户详版查询 -----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        47,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '车辆过户详版查询',
        'toc_VehicleTransferDetail',
        '<p>车辆过户详版查询</p>',
        NULL,
        0.50,
        12.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        91,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXG4I1Z',
        '车辆过户详版查询',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        156,
        47,
        91,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 车辆维保简版查询 -----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        48,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '车辆维保简版查询',
        'toc_VehicleMaintenanceSimple',
        '<p>车辆维保简版查询</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        92,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXG3Y6B',
        '车辆维保简版查询',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        157,
        48,
        92,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 车辆维保详细版查询 -----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        49,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '车辆维保详细版查询',
        'toc_VehicleMaintenanceDetail',
        '<p>车辆维保详细版查询</p>',
        NULL,
        0.50,
        12.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        93,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXG3Z3L',
        '车辆维保详细版查询',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        158,
        49,
        93,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 车辆出险详版查询 -----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        50,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '车辆出险详版查询',
        'toc_VehicleClaimDetail',
        '<p>车辆出险详版查询</p>',
        NULL,
        0.50,
        12.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        94,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXGP00W',
        '车辆出险详版查询',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        159,
        50,
        94,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 车辆出险记录核验 -----------------------------
INSERT INTO
    `product` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        51,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '车辆出险记录核验',
        'toc_VehicleClaimVerify',
        '<p>车辆出险记录核验</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        95,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QCXG6B4E',
        '车辆出险记录核验',
        0.80
    );

INSERT INTO
    `product_feature` (
        `id`,
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
VALUES (
        160,
        51,
        95,
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        1,
        0,
        1
    );

-- ------------------------------ 核验工具（verify feature.md）-----------------------------
-- 公安二要素 IVYZ9K7F
INSERT INTO
    `product` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '公安二要素认证',
        'toc_PoliceTwoFactors',
        '<p>公安二要素</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'IVYZ9K7F',
        '公安二要素认证',
        0.80
    )
ON DUPLICATE KEY UPDATE
    `name` = VALUES(`name`),
    `cost_price` = VALUES(`cost_price`);

INSERT INTO
    `product_feature` (
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
SELECT p.id, f.id, NOW(), NOW(), NULL, 0, 0, 1, 0, 1
FROM `product` p
    JOIN `feature` f ON f.api_id = 'IVYZ9K7F'
WHERE
    p.product_en = 'toc_PoliceTwoFactors'
    AND NOT EXISTS (
        SELECT 1
        FROM `product_feature` pf
        WHERE
            pf.product_id = p.id
            AND pf.feature_id = f.id
            AND pf.del_state = 0
    );

-- 企业司法涉诉简版 QYGL66SL
INSERT INTO
    `product` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '企业司法涉诉',
        'toc_EnterpriseLawsuitQYGL66SL',
        '<p>企业司法涉诉（简版）</p>',
        NULL,
        0.50,
        28.80
    );

INSERT INTO
    `feature` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QYGL66SL',
        '企业司法涉诉',
        0.80
    )
ON DUPLICATE KEY UPDATE
    `name` = VALUES(`name`),
    `cost_price` = VALUES(`cost_price`);

INSERT INTO
    `product_feature` (
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
SELECT p.id, f.id, NOW(), NOW(), NULL, 0, 0, 1, 0, 1
FROM `product` p
    JOIN `feature` f ON f.api_id = 'QYGL66SL'
WHERE
    p.product_en = 'toc_EnterpriseLawsuitQYGL66SL'
    AND NOT EXISTS (
        SELECT 1
        FROM `product_feature` pf
        WHERE
            pf.product_id = p.id
            AND pf.feature_id = f.id
            AND pf.del_state = 0
    );

-- 限高被执行人 FLXG3A9B
INSERT INTO
    `product` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '限高被执行人',
        'toc_LimitHighExecuted',
        '<p>限高被执行人</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'FLXG3A9B',
        '限高被执行人',
        0.80
    )
ON DUPLICATE KEY UPDATE
    `name` = VALUES(`name`),
    `cost_price` = VALUES(`cost_price`);

INSERT INTO
    `product_feature` (
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
SELECT p.id, f.id, NOW(), NOW(), NULL, 0, 0, 1, 0, 1
FROM `product` p
    JOIN `feature` f ON f.api_id = 'FLXG3A9B'
WHERE
    p.product_en = 'toc_LimitHighExecuted'
    AND NOT EXISTS (
        SELECT 1
        FROM `product_feature` pf
        WHERE
            pf.product_id = p.id
            AND pf.feature_id = f.id
            AND pf.del_state = 0
    );

-- 失信被执行人 QYGL2S0W
INSERT INTO
    `product` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '失信被执行人',
        'toc_DishonestExecutedPerson',
        '<p>失信被执行人</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QYGL2S0W',
        '失信被执行人',
        0.80
    )
ON DUPLICATE KEY UPDATE
    `name` = VALUES(`name`),
    `cost_price` = VALUES(`cost_price`);

INSERT INTO
    `product_feature` (
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
SELECT p.id, f.id, NOW(), NOW(), NULL, 0, 0, 1, 0, 1
FROM `product` p
    JOIN `feature` f ON f.api_id = 'QYGL2S0W'
WHERE
    p.product_en = 'toc_DishonestExecutedPerson'
    AND NOT EXISTS (
        SELECT 1
        FROM `product_feature` pf
        WHERE
            pf.product_id = p.id
            AND pf.feature_id = f.id
            AND pf.del_state = 0
    );

-- 公安三要素 IVYZA1B3
INSERT INTO
    `product` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '公安三要素',
        'toc_PoliceThreeFactors',
        '<p>公安三要素</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'IVYZA1B3',
        '公安三要素',
        0.80
    )
ON DUPLICATE KEY UPDATE
    `name` = VALUES(`name`),
    `cost_price` = VALUES(`cost_price`);

INSERT INTO
    `product_feature` (
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
SELECT p.id, f.id, NOW(), NOW(), NULL, 0, 0, 1, 0, 1
FROM `product` p
    JOIN `feature` f ON f.api_id = 'IVYZA1B3'
WHERE
    p.product_en = 'toc_PoliceThreeFactors'
    AND NOT EXISTS (
        SELECT 1
        FROM `product_feature` pf
        WHERE
            pf.product_id = p.id
            AND pf.feature_id = f.id
            AND pf.del_state = 0
    );

-- 职业资格证书 IVYZ6M8P
INSERT INTO
    `product` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '职业资格证书查询',
        'toc_ProfessionalCertificate',
        '<p>职业资格证书</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'IVYZ6M8P',
        '职业资格证书查询',
        0.80
    )
ON DUPLICATE KEY UPDATE
    `name` = VALUES(`name`),
    `cost_price` = VALUES(`cost_price`);

INSERT INTO
    `product_feature` (
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
SELECT p.id, f.id, NOW(), NOW(), NULL, 0, 0, 1, 0, 1
FROM `product` p
    JOIN `feature` f ON f.api_id = 'IVYZ6M8P'
WHERE
    p.product_en = 'toc_ProfessionalCertificate'
    AND NOT EXISTS (
        SELECT 1
        FROM `product_feature` pf
        WHERE
            pf.product_id = p.id
            AND pf.feature_id = f.id
            AND pf.del_state = 0
    );

-- 运营商二要素 YYSY3M8S
INSERT INTO
    `product` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '运营商二要素',
        'toc_OperatorTwoFactors',
        '<p>运营商二要素</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'YYSY3M8S',
        '运营商二要素',
        0.80
    )
ON DUPLICATE KEY UPDATE
    `name` = VALUES(`name`),
    `cost_price` = VALUES(`cost_price`);

INSERT INTO
    `product_feature` (
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
SELECT p.id, f.id, NOW(), NOW(), NULL, 0, 0, 1, 0, 1
FROM `product` p
    JOIN `feature` f ON f.api_id = 'YYSY3M8S'
WHERE
    p.product_en = 'toc_OperatorTwoFactors'
    AND NOT EXISTS (
        SELECT 1
        FROM `product_feature` pf
        WHERE
            pf.product_id = p.id
            AND pf.feature_id = f.id
            AND pf.del_state = 0
    );

-- 全网手机三要素 YYSYK9R4
INSERT INTO
    `product` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '全网手机三要素验证周更',
        'toc_MobileThreeFactors',
        '<p>全网手机三要素</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'YYSYK9R4',
        '全网手机三要素验证周更',
        0.80
    )
ON DUPLICATE KEY UPDATE
    `name` = VALUES(`name`),
    `cost_price` = VALUES(`cost_price`);

INSERT INTO
    `product_feature` (
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
SELECT p.id, f.id, NOW(), NOW(), NULL, 0, 0, 1, 0, 1
FROM `product` p
    JOIN `feature` f ON f.api_id = 'YYSYK9R4'
WHERE
    p.product_en = 'toc_MobileThreeFactors'
    AND NOT EXISTS (
        SELECT 1
        FROM `product_feature` pf
        WHERE
            pf.product_id = p.id
            AND pf.feature_id = f.id
            AND pf.del_state = 0
    );

-- 号码二次放号 YYSYF2T7
INSERT INTO
    `product` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '号码二次放号',
        'toc_NumberRecycle',
        '<p>号码二次放号</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'YYSYF2T7',
        '号码二次放号',
        0.80
    )
ON DUPLICATE KEY UPDATE
    `name` = VALUES(`name`),
    `cost_price` = VALUES(`cost_price`);

INSERT INTO
    `product_feature` (
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
SELECT p.id, f.id, NOW(), NOW(), NULL, 0, 0, 1, 0, 1
FROM `product` p
    JOIN `feature` f ON f.api_id = 'YYSYF2T7'
WHERE
    p.product_en = 'toc_NumberRecycle'
    AND NOT EXISTS (
        SELECT 1
        FROM `product_feature` pf
        WHERE
            pf.product_id = p.id
            AND pf.feature_id = f.id
            AND pf.del_state = 0
    );

-- 手机空号检测 YYSYK8R3
INSERT INTO
    `product` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '手机空号检测',
        'toc_MobileEmptyCheck',
        '<p>手机空号检测</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'YYSYK8R3',
        '手机空号检测',
        0.80
    )
ON DUPLICATE KEY UPDATE
    `name` = VALUES(`name`),
    `cost_price` = VALUES(`cost_price`);

INSERT INTO
    `product_feature` (
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
SELECT p.id, f.id, NOW(), NOW(), NULL, 0, 0, 1, 0, 1
FROM `product` p
    JOIN `feature` f ON f.api_id = 'YYSYK8R3'
WHERE
    p.product_en = 'toc_MobileEmptyCheck'
    AND NOT EXISTS (
        SELECT 1
        FROM `product_feature` pf
        WHERE
            pf.product_id = p.id
            AND pf.feature_id = f.id
            AND pf.del_state = 0
    );

-- 手机携号转网 YYSYS9W1
INSERT INTO
    `product` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '手机携号转网',
        'toc_MobilePortability',
        '<p>手机携号转网</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'YYSYS9W1',
        '手机携号转网',
        0.80
    )
ON DUPLICATE KEY UPDATE
    `name` = VALUES(`name`),
    `cost_price` = VALUES(`cost_price`);

INSERT INTO
    `product_feature` (
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
SELECT p.id, f.id, NOW(), NOW(), NULL, 0, 0, 1, 0, 1
FROM `product` p
    JOIN `feature` f ON f.api_id = 'YYSYS9W1'
WHERE
    p.product_en = 'toc_MobilePortability'
    AND NOT EXISTS (
        SELECT 1
        FROM `product_feature` pf
        WHERE
            pf.product_id = p.id
            AND pf.feature_id = f.id
            AND pf.del_state = 0
    );

-- 手机在网状态 YYSYE7V5
INSERT INTO
    `product` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '手机在网状态',
        'toc_MobileOnlineStatus',
        '<p>手机在网状态</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'YYSYE7V5',
        '手机在网状态',
        0.80
    )
ON DUPLICATE KEY UPDATE
    `name` = VALUES(`name`),
    `cost_price` = VALUES(`cost_price`);

INSERT INTO
    `product_feature` (
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
SELECT p.id, f.id, NOW(), NOW(), NULL, 0, 0, 1, 0, 1
FROM `product` p
    JOIN `feature` f ON f.api_id = 'YYSYE7V5'
WHERE
    p.product_en = 'toc_MobileOnlineStatus'
    AND NOT EXISTS (
        SELECT 1
        FROM `product_feature` pf
        WHERE
            pf.product_id = p.id
            AND pf.feature_id = f.id
            AND pf.del_state = 0
    );

-- 手机在网时长 YYSYP0T4
INSERT INTO
    `product` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '手机号码在网时长',
        'toc_MobileOnlineDuration',
        '<p>手机在网时长</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'YYSYP0T4',
        '手机号码在网时长',
        0.80
    )
ON DUPLICATE KEY UPDATE
    `name` = VALUES(`name`),
    `cost_price` = VALUES(`cost_price`);

INSERT INTO
    `product_feature` (
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
SELECT p.id, f.id, NOW(), NOW(), NULL, 0, 0, 1, 0, 1
FROM `product` p
    JOIN `feature` f ON f.api_id = 'YYSYP0T4'
WHERE
    p.product_en = 'toc_MobileOnlineDuration'
    AND NOT EXISTS (
        SELECT 1
        FROM `product_feature` pf
        WHERE
            pf.product_id = p.id
            AND pf.feature_id = f.id
            AND pf.del_state = 0
    );

-- 手机消费区间 YYSY6F2B
INSERT INTO
    `product` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '手机消费区间验证',
        'toc_MobileConsumptionRange',
        '<p>手机消费区间</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'YYSY6F2B',
        '手机消费区间验证',
        0.80
    )
ON DUPLICATE KEY UPDATE
    `name` = VALUES(`name`),
    `cost_price` = VALUES(`cost_price`);

INSERT INTO
    `product_feature` (
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
SELECT p.id, f.id, NOW(), NOW(), NULL, 0, 0, 1, 0, 1
FROM `product` p
    JOIN `feature` f ON f.api_id = 'YYSY6F2B'
WHERE
    p.product_en = 'toc_MobileConsumptionRange'
    AND NOT EXISTS (
        SELECT 1
        FROM `product_feature` pf
        WHERE
            pf.product_id = p.id
            AND pf.feature_id = f.id
            AND pf.del_state = 0
    );

-- 手机归属地 YYSY9E4A
INSERT INTO
    `product` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '手机号码归属地核验',
        'toc_MobileAttribution',
        '<p>手机归属地</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'YYSY9E4A',
        '手机号码归属地核验',
        0.80
    )
ON DUPLICATE KEY UPDATE
    `name` = VALUES(`name`),
    `cost_price` = VALUES(`cost_price`);

INSERT INTO
    `product_feature` (
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
SELECT p.id, f.id, NOW(), NOW(), NULL, 0, 0, 1, 0, 1
FROM `product` p
    JOIN `feature` f ON f.api_id = 'YYSY9E4A'
WHERE
    p.product_en = 'toc_MobileAttribution'
    AND NOT EXISTS (
        SELECT 1
        FROM `product_feature` pf
        WHERE
            pf.product_id = p.id
            AND pf.feature_id = f.id
            AND pf.del_state = 0
    );

-- 名下企业关联 QYGL5F6A
INSERT INTO
    `product` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '名下企业关联',
        'toc_EnterpriseRelation',
        '<p>名下企业关联</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'QYGL5F6A',
        '名下企业关联',
        0.80
    )
ON DUPLICATE KEY UPDATE
    `name` = VALUES(`name`),
    `cost_price` = VALUES(`cost_price`);

INSERT INTO
    `product_feature` (
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
SELECT p.id, f.id, NOW(), NOW(), NULL, 0, 0, 1, 0, 1
FROM `product` p
    JOIN `feature` f ON f.api_id = 'QYGL5F6A'
WHERE
    p.product_en = 'toc_EnterpriseRelation'
    AND NOT EXISTS (
        SELECT 1
        FROM `product_feature` pf
        WHERE
            pf.product_id = p.id
            AND pf.feature_id = f.id
            AND pf.del_state = 0
    );

-- 银行卡四要素 JRZQACAB
INSERT INTO
    `product` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '银行卡四要素验证（详版）',
        'toc_BankcardFourFactors',
        '<p>银行卡四要素</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'JRZQACAB',
        '银行卡四要素验证（详版）',
        0.80
    )
ON DUPLICATE KEY UPDATE
    `name` = VALUES(`name`),
    `cost_price` = VALUES(`cost_price`);

INSERT INTO
    `product_feature` (
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
SELECT p.id, f.id, NOW(), NOW(), NULL, 0, 0, 1, 0, 1
FROM `product` p
    JOIN `feature` f ON f.api_id = 'JRZQACAB'
WHERE
    p.product_en = 'toc_BankcardFourFactors'
    AND NOT EXISTS (
        SELECT 1
        FROM `product_feature` pf
        WHERE
            pf.product_id = p.id
            AND pf.feature_id = f.id
            AND pf.del_state = 0
    );

-- 银行卡黑名单 JRZQ0B6Y
INSERT INTO
    `product` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `product_name`,
        `product_en`,
        `description`,
        `notes`,
        `cost_price`,
        `sell_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        '银行卡黑名单(实时)',
        'toc_BankcardBlacklist',
        '<p>银行卡黑名单</p>',
        NULL,
        0.50,
        9.90
    );

INSERT INTO
    `feature` (
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `api_id`,
        `name`,
        `cost_price`
    )
VALUES (
        NOW(),
        NOW(),
        NULL,
        0,
        0,
        'JRZQ0B6Y',
        '银行卡黑名单(实时)',
        0.80
    )
ON DUPLICATE KEY UPDATE
    `name` = VALUES(`name`),
    `cost_price` = VALUES(`cost_price`);

INSERT INTO
    `product_feature` (
        `product_id`,
        `feature_id`,
        `create_time`,
        `update_time`,
        `delete_time`,
        `del_state`,
        `version`,
        `sort`,
        `is_important`,
        `enable`
    )
SELECT p.id, f.id, NOW(), NOW(), NULL, 0, 0, 1, 0, 1
FROM `product` p
    JOIN `feature` f ON f.api_id = 'JRZQ0B6Y'
WHERE
    p.product_en = 'toc_BankcardBlacklist'
    AND NOT EXISTS (
        SELECT 1
        FROM `product_feature` pf
        WHERE
            pf.product_id = p.id
            AND pf.feature_id = f.id
            AND pf.del_state = 0
    );

-- =============================================================================
-- 以后每加一个产品，按上面格式追加三块：
--   1. INSERT INTO product (..., product_name, product_en, ...)
--   2. INSERT INTO feature (..., api_id, name, ...)
--   3. INSERT INTO product_feature (..., product_id, feature_id, ...)
-- 注意：id 依次递增，或去掉 id 列改用自增。
-- =============================================================================