-------------------- 模块: basic Start -------------------- #用户日志表 CREATE TABLE `ec_b_admin_operate` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `creation_time` datetime NOT NULL, `update_time` datetime NOT NULL, `msg_id` varchar(255) NOT NULL, `operate` varchar(255) NOT NULL, `operate_ip` varchar(255) NOT NULL, `operate_time` datetime NOT NULL, `operate_user_id` bigint(20) NOT NULL, `root_org_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `IDX_R_ADMIN_OPERATE_03` (`msg_id`), KEY `IDX_R_ADMIN_OPERATE_01` (`root_org_id`,`operate_user_id`), KEY `IDX_R_ADMIN_OPERATE_02` (`root_org_id`,`operate_user_id`,`operate_time`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; #首次登录改密码 alter table ec_b_user add password_weak bit(1) NOT NULL DEFAULT 1; update ec_b_user set password_weak=0; alter table ec_b_student add password_weak bit(1) NOT NULL DEFAULT 1; update ec_b_student set password_weak=0; #学生密码加密(可重复执行) update ec_b_student set password=UPPER(SHA2(CONCAT(identity_number,password),256)) where LENGTH(password)<64; #后台用户密码加密(可重复执行) update ec_b_user set password=UPPER(SHA2(CONCAT(login_name,password),256)) where id not in (select f.user_id from ec_b_user_role_relation f where f.role_id=1) and LENGTH(password)<64; -------------------- 模块: basic End --------------------