3.给默认创建系统管理员和审计管理员权限组并且为系统管理员和审计管理员默认分配指定的权限
| | |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + " VALUES ('3508', '100003', '普通用户组', 'battfault_query_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + " VALUES ('3509', '100003', '普通用户组', 'battfault_add_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + " VALUES ('3510', '100003', '普通用户组', 'battfault_edit_permit', '0');"); |
| | | } |
| | | } |
| | | //" SELECT COUNT(*) as sum_count FROM "+Sql_Mysql.User_Permitgroup_Table; |
| | | res = sql.sqlMysqlQuery("SELECT COUNT(*) as sum_count FROM " + Sql_Mysql.User_Permitgroup_Table + " WHERE permit_group_id = 1"); |
| | | //插入默认的系统管理员权限组 |
| | | if(res.next()) { |
| | | int count = res.getInt("sum_count"); |
| | | if(count<10) { |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'battinf_report_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'battgroup_report_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'battmant_report_query_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'battlarm_report_query_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'monomer_report_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'batttest_data_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'batttest_data_edit_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'task_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'task_edit_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'task_check_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'task_recheck_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'usr_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'usr_edit_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'permit_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'permit_edit_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'server_param_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'server_param_edit_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'analog_loader_op_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'batt_test_op_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'battcfg_query_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'battcfg_add_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'battcfg_modify_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'battcfg_del_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'batt_alm_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'batt_alm_confirm_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'batt_alm_clear_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'batt_alm_delete_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'batt_alm_param_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'batt_alm_param_edit_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'dev_alm_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'dev_alm_confirm_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'dev_alm_clear_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'dev_alm_delete_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'battfault_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'battfault_add_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'battfault_edit_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'battfault_delete_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'battmaint_confirm_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'usrtaskcheck_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'usrtaskcheck_add_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'usrtaskcheck_edit_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'usrtaskcheck_delete_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'usrtaskcheck_confirm_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'taskchange_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'taskchange_add_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'taskchange_delete_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'taskchange_shenpi_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'batt_map_edit_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'batt_map_delete_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('1', '系统管理员', 'batt_discharge_model_permit', '0');"); |
| | | } |
| | | } |
| | | |
| | | res = sql.sqlMysqlQuery("SELECT COUNT(*) as sum_count FROM " + Sql_Mysql.User_Permitgroup_Table + " WHERE permit_group_id = 2"); |
| | | //插入默认的审计管理员权限组 |
| | | if(res.next()) { |
| | | int count = res.getInt("sum_count"); |
| | | if(count<10) { |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'battinf_report_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'battgroup_report_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'battmant_report_query_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'battlarm_report_query_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'monomer_report_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'batttest_data_query_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'batttest_data_edit_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'task_query_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'task_edit_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'task_check_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'task_recheck_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'usr_query_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'usr_edit_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'permit_query_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'permit_edit_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'server_param_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'server_param_edit_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'analog_loader_op_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'batt_test_op_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'battcfg_query_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'battcfg_add_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'battcfg_modify_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'battcfg_del_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'batt_alm_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'batt_alm_confirm_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'batt_alm_clear_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'batt_alm_delete_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'batt_alm_param_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'batt_alm_param_edit_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'dev_alm_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'dev_alm_confirm_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'dev_alm_clear_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'dev_alm_delete_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'battfault_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'battfault_add_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'battfault_edit_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'battfault_delete_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'battmaint_confirm_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'usrtaskcheck_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'usrtaskcheck_add_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'usrtaskcheck_edit_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'usrtaskcheck_delete_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'usrtaskcheck_confirm_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'taskchange_query_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'taskchange_add_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'taskchange_delete_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'taskchange_shenpi_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'batt_map_edit_permit', '1');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'batt_map_delete_permit', '0');"); |
| | | sql.sqlMysqlExecute("INSERT INTO " + Sql_Mysql.User_Permitgroup_Table + "(permit_group_id,permit_group_name,permit_item_name,permit_item_value) VALUES ('2', '审计管理员', 'batt_discharge_model_permit', '0');"); |
| | | } |
| | | } |
| | | } catch (SQLException e) { |
| | |
| | | if(count<1) { |
| | | sql.sqlMysqlExecute("INSERT INTO "+Sql_Mysql.User_Permitgroup_Data_Table+" VALUES ('1', '100001', '1001');"); |
| | | sql.sqlMysqlExecute("INSERT INTO "+Sql_Mysql.User_Permitgroup_Data_Table+" VALUES ('2', '100002', '1002');"); |
| | | } |
| | | } |
| | | //给系统管理员分配系统管理员权限 |
| | | res = sql.sqlMysqlQuery("SELECT COUNT(*) as sum_count FROM " + Sql_Mysql.User_Permitgroup_Data_Table + " WHERE permit_group_id = 1 AND uId = 1"); |
| | | if(res.next()) { |
| | | int count = res.getInt("sum_count"); |
| | | if(count<1) { |
| | | sql.sqlMysqlExecute("INSERT INTO "+Sql_Mysql.User_Permitgroup_Data_Table+"(permit_group_id,uId) VALUES ('1', '1');"); |
| | | } |
| | | } |
| | | |
| | | //给审计管理员分配审计管理员权限 |
| | | res = sql.sqlMysqlQuery("SELECT COUNT(*) as sum_count FROM " + Sql_Mysql.User_Permitgroup_Data_Table + " WHERE permit_group_id = 2 AND uId = 2"); |
| | | if(res.next()) { |
| | | int count = res.getInt("sum_count"); |
| | | if(count<1) { |
| | | sql.sqlMysqlExecute("INSERT INTO "+Sql_Mysql.User_Permitgroup_Data_Table+"(permit_group_id,uId) VALUES ('2', '2');"); |
| | | } |
| | | } |
| | | } catch (SQLException e) { |
| | |
| | | int count = res.getInt("num_count"); |
| | | if(count<1) { |
| | | //默认没有添加用户信息时添加'未登录的用户账号' |
| | | sql.sqlMysqlExecute("INSERT INTO "+Sql_Mysql.TB_UserInf+"(uId,uSnId,uName,uMobilephone,uJobGroup,upassword,login_type,uRole,type,status,last_login_time,password_update_time,create_time,visit_time,visit_ip) VALUES(1,'sys123456', 'sys_admin','','默认班组','61b3151941bb43fad57005524d1a967c',1,0,1,1,'2022-02-14 16:02:01',null,'2021-12-14 16:16:04','00:00:00~23:59:59','*');"); |
| | | sql.sqlMysqlExecute("INSERT INTO "+Sql_Mysql.TB_UserInf+"(uId,uSnId,uName,uMobilephone,uJobGroup,upassword,login_type,uRole,type,status,last_login_time,password_update_time,create_time,visit_time,visit_ip) VALUES(1,'9bjUYyd3End5Hof9HqNmDQ==', 'sys_admin','','默认班组','dd75ac527808a04efadb9de25871effc',1,0,1,1,'2022-02-14 16:02:01',null,'2021-12-14 16:16:04','00:00:00~23:59:59','*');"); |
| | | } |
| | | } |
| | | |
| | |
| | | int count = res.getInt("num_count"); |
| | | if(count<1) { |
| | | //默认没有添加用户信息时添加'未登录的用户账号' |
| | | sql.sqlMysqlExecute("INSERT INTO "+Sql_Mysql.TB_UserInf+"(uId,uSnId,uName,uMobilephone,uJobGroup,upassword,login_type,uRole,type,status,last_login_time,password_update_time,create_time,visit_time,visit_ip) VALUES(2,'audit123456', 'audit_admin','','默认班组','2abdaafa43d93077a514146476ed59db',1,0,1,1,null,'2021-12-14 16:18:44','2021-12-14 16:18:44','00:00:00~23:59:59','*');"); |
| | | sql.sqlMysqlExecute("INSERT INTO "+Sql_Mysql.TB_UserInf+"(uId,uSnId,uName,uMobilephone,uJobGroup,upassword,login_type,uRole,type,status,last_login_time,password_update_time,create_time,visit_time,visit_ip) VALUES(2,'Y2YIthHwIvAA3e8M4vofnA==', 'audit_admin','','默认班组','2abdaafa43d93077a514146476ed59db',1,0,1,1,null,'2021-12-14 16:18:44','2021-12-14 16:18:44','00:00:00~23:59:59','*');"); |
| | | } |
| | | } |
| | | |
| | |
| | | 1.表 `db_user`.`tb_user_log` 新增修改字段 |
| | | CHANGE `operation_detail` `operation_detail` text COMMENT '操作的具体数据' |
| | | ADD COLUMN `read_flag` TINYINT(1) NULL DEFAULT 1 COMMENT '是否已阅读,此功能针对异常信息' AFTER `operation_detail`; |
| | | |
| | | 2.表 `db_user`.`tb_user_inf` 默认插入默认账号 ['未登录的用户账号','sys_admin','audit_admin'] |
| | | INSERT INTO `tb_user_inf`(uId,uSnId,uName,uMobilephone,uJobGroup,upassword,login_type,uRole,type,status,last_login_time,password_update_time,create_time,visit_time,visit_ip) VALUES(0,'未登录的用户账号','未登录的用户账号','','','',1,0,1,1,null,'2021-12-14 16:18:44','2021-12-14 16:18:44','00:00:00~23:59:59','*'); |
| | | INSERT INTO `tb_user_inf`(uId,uSnId,uName,uMobilephone,uJobGroup,upassword,login_type,uRole,type,status,last_login_time,password_update_time,create_time,visit_time,visit_ip) VALUES(1,'sys123456', 'sys_admin','','默认班组','61b3151941bb43fad57005524d1a967c',1,0,1,1,'2022-02-14 16:02:01',null,'2021-12-14 16:16:04','00:00:00~23:59:59','*'); |
| | | INSERT INTO `tb_user_inf`(uId,uSnId,uName,uMobilephone,uJobGroup,upassword,login_type,uRole,type,status,last_login_time,password_update_time,create_time,visit_time,visit_ip) VALUES(2,'audit123456', 'audit_admin','','默认班组','2abdaafa43d93077a514146476ed59db',1,0,1,1,null,'2021-12-14 16:18:44','2021-12-14 16:18:44','00:00:00~23:59:59','*'); |
| | | |
| | | |
| | | 3.给默认创建系统管理员和审计管理员权限组并且为系统管理员和审计管理员默认分配指定的权限 |
| | | |
| | | |
| | | |