From 8c7107ddd2833509998e74cbcdd036cc0acf13e2 Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Mon, 23 Dec 2019 16:16:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0sql=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/update.sql | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/Data/update.sql b/Data/update.sql index 46c6e2d76..650ee7671 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -772,3 +772,33 @@ ADD COLUMN `data_empower_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '数据权 ALTER TABLE `platform`.`sys_auth_group` ADD COLUMN `data_president` longtext NULL COMMENT '会长数据' AFTER `data_empower_type`; +-- 推广员表新增推广公司id liuweiwen 2019-12-23 +ALTER TABLE tab_promote ADD `company_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广公司ID'; +-- 新增推广公司表 liuweiwen 2019-12-23 +CREATE TABLE `tab_promote_company` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', + `company_name` varchar(60) NOT NULL COMMENT '推广公司名称', + `uid` int(11) NOT NULL DEFAULT '0' COMMENT '添加人ID', + `status` tinyint(3) NOT NULL DEFAULT '1' COMMENT '状态 0-禁用 1-启用', + `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '添加时间', + `last_up_time` int(10) NOT NULL DEFAULT '0' COMMENT '最后更新时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='推广公司'; + +-- 菜单(推广公司录入)有个变量,所以后面几句要一起执行 liuweiwen +INSERT INTO `sys_menu`(`title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`) +VALUES ('推广公司录入', 185, 56, 'PromoteCompany/lists', 0, '该功能用于录入工会所属的推广公司名称', '推广员管理', 0, 1); + +set @company_id = (SELECT id FROM sys_menu WHERE title = '推广公司录入'); +INSERT INTO `sys_menu`(`title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`) +VALUES ('新增', @company_id, 0, 'PromoteCompany/add', 0, '', '推广员管理', 0, 1); +INSERT INTO `sys_menu`(`title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`) +VALUES ('编辑', @company_id, 0, 'PromoteCompany/edit', 0, '', '推广员管理', 0, 1); +INSERT INTO `sys_menu`(`title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`) +VALUES ('删除', @company_id, 0, 'PromoteCompany/del', 0, '', '推广员管理', 0, 1); +-- 增加修改b_spend表索引 liuweiwen 2019-12-23 +DROP INDEX o ON tab_spend; +ALTER TABLE tab_spend ADD INDEX o(pay_status, is_check, settle_check, promote_id); +ALTER TABLE tab_user_login_record ADD INDEX user_id_promote_idx(user_id, promote_id); + +