Files
obsidian-valut-mq/Untitled.md
2026-01-22 09:07:01 +08:00

84 lines
3.3 KiB
Markdown

https://x.com/Crypto_QianXun/status/2000824222298595627?s=20
PrivateKey: aDimi0YKf6l9S-tfu1Vpncrach9DxR5th3DppwbexFo
Password: CWNO5lIeiJM7cRXvrXVyR8053GKMdGhjDc-HO9MVvEU
Hash32: L8jSjxhDWlpHAcV30OGI4G3S__jqEnWQJv2opKp4BKs
6e48eb91-d3ef-421d-b676-3a115b30e3fe
510000: "socks5://colauser-sichuan-chengdu:dJ31$lCohDouAI@110.185.110.244:11235"
440000: "socks5://colauser-guangdong-dongguan:*l*H7dsHH9g&jM@121.14.153.133:11235"
```sql
CREATE TABLE `auto_learn_setting`
(
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`ent_id` int(11) NOT NULL COMMENT '企业id',
`enabled` bool NOT NULL DEFAULT true comment '是否启用',
`source` varchar(255) NOT NULL DEFAULT '' COMMENT '渠道',
`sub_source` varchar(255) NOT NULL DEFAULT '' COMMENT '子渠道来源',
`description` varchar(255) NOT NULL DEFAULT '' COMMENT '标题名称',
`updated_at` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间',
`created_at` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `idx_ent` (`ent_id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_unicode_ci COMMENT ='自动学习设置'
```
```sql
CREATE TABLE `new_meiqia`.`auth_info` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '认证信息id',
`phone` varchar(50) NOT NULL COMMENT '手机号',
`password` varchar(200) NOT NULL DEFAULT '' COMMENT '密码',
`created_at` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间',
`updated_at` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间',
`deleted_at` datetime(6) DEFAULT NULL COMMENT '软删除时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_phone_del` (`phone`, `deleted_at`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '认证信息表';
CREATE TABLE `new_meiqia`.`auth_info_agent` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`auth_info_id` int(11) NOT NULL COMMENT '认证信息id',
`agent_id` int(11) NOT NULL COMMENT '客服id',
`created_at` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_auth_agent` (`auth_info_id`, `agent_id`),
KEY `idx_agent` (`agent_id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '认证信息与客服关联表';
INSERT INTO auth_info (phone, password, created_at, updated_at)
SELECT DISTINCT
phone,
COALESCE(password, '') as password,
NOW(6),
NOW(6)
FROM agent
WHERE deleted_at IS NULL
AND phone IS NOT NULL
AND phone != ''
AND NOT EXISTS (
SELECT 1 FROM auth_info ai WHERE ai.phone = agent.phone AND ai.deleted_at IS NULL
)
GROUP BY phone;
-- 步骤2: 创建 auth_info 与 agent 的关联关系
INSERT INTO auth_info_agent (auth_info_id, agent_id, created_at)
SELECT
ai.id as auth_info_id,
a.id as agent_id,
NOW(6)
FROM agent a
INNER JOIN auth_info ai ON a.phone = ai.phone AND ai.deleted_at IS NULL
WHERE a.deleted_at IS NULL
AND a.phone IS NOT NULL
AND a.phone != ''
AND NOT EXISTS (
SELECT 1 FROM auth_info_agent aia
WHERE aia.auth_info_id = ai.id AND aia.agent_id = a.id
);
```