-- 支付方式初始数据（按历史使用量大致排序；幂等：同 F_Name 未删除记录已存在则跳过）
-- 执行前请先运行：创建支付方式配置表_lq_payment_method.sql

INSERT INTO `lq_payment_method` (
  `F_Id`, `F_Name`, `F_SortCode`, `F_EnabledMark`, `F_DeleteMark`, `F_Remark`,
  `F_CreateTime`, `F_LastModifyTime`
)
SELECT '1980080609000000001', '微信', 1, 1, NULL, '初始数据', NOW(), NOW()
FROM DUAL
WHERE NOT EXISTS (
  SELECT 1 FROM `lq_payment_method` WHERE `F_Name` = '微信' AND (`F_DeleteMark` IS NULL OR `F_DeleteMark` = 0)
);

INSERT INTO `lq_payment_method` (
  `F_Id`, `F_Name`, `F_SortCode`, `F_EnabledMark`, `F_DeleteMark`, `F_Remark`,
  `F_CreateTime`, `F_LastModifyTime`
)
SELECT '1980080609000000002', '现金', 2, 1, NULL, '初始数据', NOW(), NOW()
FROM DUAL
WHERE NOT EXISTS (
  SELECT 1 FROM `lq_payment_method` WHERE `F_Name` = '现金' AND (`F_DeleteMark` IS NULL OR `F_DeleteMark` = 0)
);

INSERT INTO `lq_payment_method` (
  `F_Id`, `F_Name`, `F_SortCode`, `F_EnabledMark`, `F_DeleteMark`, `F_Remark`,
  `F_CreateTime`, `F_LastModifyTime`
)
SELECT '1980080609000000003', '直播收款', 3, 1, NULL, '初始数据', NOW(), NOW()
FROM DUAL
WHERE NOT EXISTS (
  SELECT 1 FROM `lq_payment_method` WHERE `F_Name` = '直播收款' AND (`F_DeleteMark` IS NULL OR `F_DeleteMark` = 0)
);

INSERT INTO `lq_payment_method` (
  `F_Id`, `F_Name`, `F_SortCode`, `F_EnabledMark`, `F_DeleteMark`, `F_Remark`,
  `F_CreateTime`, `F_LastModifyTime`
)
SELECT '1980080609000000004', '支付宝', 4, 1, NULL, '初始数据', NOW(), NOW()
FROM DUAL
WHERE NOT EXISTS (
  SELECT 1 FROM `lq_payment_method` WHERE `F_Name` = '支付宝' AND (`F_DeleteMark` IS NULL OR `F_DeleteMark` = 0)
);

INSERT INTO `lq_payment_method` (
  `F_Id`, `F_Name`, `F_SortCode`, `F_EnabledMark`, `F_DeleteMark`, `F_Remark`,
  `F_CreateTime`, `F_LastModifyTime`
)
SELECT '1980080609000000005', '合作', 5, 1, NULL, '初始数据', NOW(), NOW()
FROM DUAL
WHERE NOT EXISTS (
  SELECT 1 FROM `lq_payment_method` WHERE `F_Name` = '合作' AND (`F_DeleteMark` IS NULL OR `F_DeleteMark` = 0)
);

INSERT INTO `lq_payment_method` (
  `F_Id`, `F_Name`, `F_SortCode`, `F_EnabledMark`, `F_DeleteMark`, `F_Remark`,
  `F_CreateTime`, `F_LastModifyTime`
)
SELECT '1980080609000000006', '银行卡', 6, 1, NULL, '初始数据', NOW(), NOW()
FROM DUAL
WHERE NOT EXISTS (
  SELECT 1 FROM `lq_payment_method` WHERE `F_Name` = '银行卡' AND (`F_DeleteMark` IS NULL OR `F_DeleteMark` = 0)
);

INSERT INTO `lq_payment_method` (
  `F_Id`, `F_Name`, `F_SortCode`, `F_EnabledMark`, `F_DeleteMark`, `F_Remark`,
  `F_CreateTime`, `F_LastModifyTime`
)
SELECT '1980080609000000007', '医院', 7, 1, NULL, '初始数据', NOW(), NOW()
FROM DUAL
WHERE NOT EXISTS (
  SELECT 1 FROM `lq_payment_method` WHERE `F_Name` = '医院' AND (`F_DeleteMark` IS NULL OR `F_DeleteMark` = 0)
);

INSERT INTO `lq_payment_method` (
  `F_Id`, `F_Name`, `F_SortCode`, `F_EnabledMark`, `F_DeleteMark`, `F_Remark`,
  `F_CreateTime`, `F_LastModifyTime`
)
SELECT '1980080609000000008', '抖音', 8, 1, NULL, '初始数据', NOW(), NOW()
FROM DUAL
WHERE NOT EXISTS (
  SELECT 1 FROM `lq_payment_method` WHERE `F_Name` = '抖音' AND (`F_DeleteMark` IS NULL OR `F_DeleteMark` = 0)
);

INSERT INTO `lq_payment_method` (
  `F_Id`, `F_Name`, `F_SortCode`, `F_EnabledMark`, `F_DeleteMark`, `F_Remark`,
  `F_CreateTime`, `F_LastModifyTime`
)
SELECT '1980080609000000009', '美团', 9, 1, NULL, '初始数据', NOW(), NOW()
FROM DUAL
WHERE NOT EXISTS (
  SELECT 1 FROM `lq_payment_method` WHERE `F_Name` = '美团' AND (`F_DeleteMark` IS NULL OR `F_DeleteMark` = 0)
);

INSERT INTO `lq_payment_method` (
  `F_Id`, `F_Name`, `F_SortCode`, `F_EnabledMark`, `F_DeleteMark`, `F_Remark`,
  `F_CreateTime`, `F_LastModifyTime`
)
SELECT '1980080609000000010', '转卡', 10, 1, NULL, '初始数据', NOW(), NOW()
FROM DUAL
WHERE NOT EXISTS (
  SELECT 1 FROM `lq_payment_method` WHERE `F_Name` = '转卡' AND (`F_DeleteMark` IS NULL OR `F_DeleteMark` = 0)
);

INSERT INTO `lq_payment_method` (
  `F_Id`, `F_Name`, `F_SortCode`, `F_EnabledMark`, `F_DeleteMark`, `F_Remark`,
  `F_CreateTime`, `F_LastModifyTime`
)
SELECT '1980080609000000011', '合作方退', 11, 1, NULL, '初始数据', NOW(), NOW()
FROM DUAL
WHERE NOT EXISTS (
  SELECT 1 FROM `lq_payment_method` WHERE `F_Name` = '合作方退' AND (`F_DeleteMark` IS NULL OR `F_DeleteMark` = 0)
);

INSERT INTO `lq_payment_method` (
  `F_Id`, `F_Name`, `F_SortCode`, `F_EnabledMark`, `F_DeleteMark`, `F_Remark`,
  `F_CreateTime`, `F_LastModifyTime`
)
SELECT '1980080609000000012', '星驿付', 12, 1, NULL, '初始数据', NOW(), NOW()
FROM DUAL
WHERE NOT EXISTS (
  SELECT 1 FROM `lq_payment_method` WHERE `F_Name` = '星驿付' AND (`F_DeleteMark` IS NULL OR `F_DeleteMark` = 0)
);
