USE yami_bbc;
|
|
DROP TABLE IF EXISTS `tz_company_auditing`;
|
|
CREATE TABLE `tz_company_auditing` (
|
`company_auditing_id` bigint NOT NULL AUTO_INCREMENT COMMENT '工商信息审核id',
|
`user_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '申请人id',
|
`shop_id` bigint DEFAULT NULL COMMENT '店铺id',
|
`shop_company_id` bigint NOT NULL COMMENT '工商信息id',
|
`auditor_id` bigint DEFAULT NULL COMMENT '审核人id',
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
`status` tinyint DEFAULT NULL COMMENT '审核状态:1:已通过 0:待审核 -1:未通过',
|
`remarks` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
|
PRIMARY KEY (`company_auditing_id`) USING BTREE,
|
KEY `k_shop_id` (`shop_id`) USING BTREE
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='工商信息审核记录';
|
|
|
// 调整工商信息表存放的数据
|
ALTER TABLE `tz_shop_company` ADD COLUMN `business_license` VARCHAR(200) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '营业执照';
|
ALTER TABLE `tz_shop_company` ADD COLUMN `identity_card_front` VARCHAR(200) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '身份证正面';
|
ALTER TABLE `tz_shop_company` ADD COLUMN `identity_card_later` VARCHAR(200) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '身份证反面';
|
ALTER TABLE `tz_shop_company` ADD COLUMN `status` TINYINT NOT NULL COMMENT '审核状态:1:已通过 0待审核 -1未通过';
|
UPDATE `tz_shop_company` SET `status` = 1;
|
|
UPDATE tz_shop_company sc JOIN `tz_shop_detail` sd ON sc.shop_id = sd.shop_id SET sc.`business_license` = sd.`business_license` ;
|
UPDATE tz_shop_company sc JOIN `tz_shop_detail` sd ON sc.shop_id = sd.shop_id SET sc.`identity_card_front` = sd.`identity_card_front` ;
|
UPDATE tz_shop_company sc JOIN `tz_shop_detail` sd ON sc.shop_id = sd.shop_id SET sc.`identity_card_later` = sd.`identity_card_later` ;
|