Commit 972d0dbf by 马玮

Op sql

parent e01acff0
...@@ -316,7 +316,6 @@ class DealerHelper { ...@@ -316,7 +316,6 @@ class DealerHelper {
customer_id, customer_name, customer_phone, intention_des, intention_id, shop_name, shop_id, customer_id, customer_name, customer_phone, intention_des, intention_id, shop_name, shop_id,
salesman_name, salesman_id, clue_input_type, create_type, create_time salesman_name, salesman_id, clue_input_type, create_type, create_time
) VALUES ${valuesSql.join(',')} ON DUPLICATE KEY UPDATE ) VALUES ${valuesSql.join(',')} ON DUPLICATE KEY UPDATE
id = LAST_INSERT_ID(id),
customer_id = VALUES(customer_id), customer_id = VALUES(customer_id),
customer_name = VALUES(customer_name), customer_name = VALUES(customer_name),
intention_des = VALUES(intention_des), intention_des = VALUES(intention_des),
......
...@@ -16,10 +16,10 @@ CREATE TABLE `crm_dealer_thirdparty_account` ( ...@@ -16,10 +16,10 @@ CREATE TABLE `crm_dealer_thirdparty_account` (
`cookies` text COMMENT '第三方账号cookies', `cookies` text COMMENT '第三方账号cookies',
`error` text COMMENT '爬取第三方过程中产生的错误', `error` text COMMENT '爬取第三方过程中产生的错误',
`status` tinyint(255) DEFAULT '0' COMMENT '第三方账号状态: -1: 同步失败, 0: 未同步, 1: 同步成功', `status` tinyint(255) DEFAULT '0' COMMENT '第三方账号状态: -1: 同步失败, 0: 未同步, 1: 同步成功',
`latestClueAt` bigint(255) DEFAULT NULL COMMENT '最新线索时间', `latestClueAt` int(11) DEFAULT '0' COMMENT '最新线索时间',
`latestFetchAt` bigint(255) DEFAULT NULL COMMENT '最近抓取时间', `latestFetchAt` int(11) DEFAULT '0' COMMENT '最近抓取时间',
`createdAt` bigint(20) DEFAULT NULL COMMENT '第三方账号创建时间', `createdAt` int(11) DEFAULT '0' COMMENT '第三方账号创建时间',
`updatedAt` bigint(20) DEFAULT NULL COMMENT '第三方账号更新时间', `updatedAt` int(11) DEFAULT '0' COMMENT '第三方账号更新时间',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `dealerWeb` (`dealerID`,`website`) UNIQUE KEY `dealerWeb` (`dealerID`,`website`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
...@@ -33,8 +33,8 @@ CREATE TABLE `crm_dealer_thirdparty_summary` ( ...@@ -33,8 +33,8 @@ CREATE TABLE `crm_dealer_thirdparty_summary` (
`dealerID` int(11) DEFAULT '0' COMMENT '经销商ID', `dealerID` int(11) DEFAULT '0' COMMENT '经销商ID',
`totalClue` int(11) DEFAULT '0' COMMENT '线索总计', `totalClue` int(11) DEFAULT '0' COMMENT '线索总计',
`totalAccount` int(11) DEFAULT '0' COMMENT '第三方账号总计', `totalAccount` int(11) DEFAULT '0' COMMENT '第三方账号总计',
`createdAt` bigint(20) DEFAULT NULL COMMENT '创建时间', `createdAt` int(11) DEFAULT '0' COMMENT '创建时间',
`updatedAt` bigint(20) DEFAULT NULL COMMENT '更新时间', `updatedAt` int(11) DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `dealerID` (`dealerID`) UNIQUE KEY `dealerID` (`dealerID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment