From 18d1788802380bcc90127d80ae2aa732148b1977 Mon Sep 17 00:00:00 2001 From: tpxcer Date: Mon, 27 Jan 2020 21:59:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?pref:=E6=9B=B4=E6=96=B0mp=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dice-server/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dice-server/pom.xml b/dice-server/pom.xml index 2e4946a0..402384a3 100644 --- a/dice-server/pom.xml +++ b/dice-server/pom.xml @@ -17,7 +17,7 @@ UTF-8 UTF-8 1.8 - 3.2.0 + 3.3.1 2.5.6 2.9.2 0.34.58 From 9e9b808c7d3fb9a027429fe1af43e1d06844e363 Mon Sep 17 00:00:00 2001 From: tpxcer Date: Mon, 27 Jan 2020 23:25:10 +0800 Subject: [PATCH 2/2] =?UTF-8?q?refactor:=20=E6=9D=83=E9=99=90=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E5=90=AF=E7=94=A8mp=E9=AB=98=E7=BA=A7=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E9=80=BB=E8=BE=91=E5=88=A0=E9=99=A4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dice-auth/lua/api_check.lua | 100 +----- dice-auth/lua/auth_check.lua | 4 +- dice-auth/lua/get_group_info.lua | 8 +- dice-docker/dice-openresty/lua/api_check.lua | 104 +----- dice-docker/dice-openresty/lua/auth_check.lua | 4 +- .../dice-openresty/lua/get_group_info.lua | 8 +- .../dice/controller/admin/TaskController.java | 2 - .../com/bihell/dice/model/BaseEntity.java | 4 +- .../java/com/bihell/dice/model/tool/Task.java | 2 + .../auth/impl/AuthRoleServiceImpl.java | 25 +- .../service/auth/impl/UserServiceImpl.java | 6 +- .../src/main/resources/application.yml | 2 + dice-server/src/main/resources/init.sql | 331 +++++++++--------- .../main/resources/mapper/AuthApiMapper.xml | 8 +- .../resources/mapper/AuthClassesMapper.xml | 6 +- .../resources/mapper/AuthContentMapper.xml | 6 +- .../main/resources/mapper/AuthGroupMapper.xml | 2 +- .../main/resources/mapper/AuthItemMapper.xml | 16 +- .../main/resources/mapper/AuthRoleMapper.xml | 8 +- .../src/main/resources/mapper/UserMapper.xml | 2 +- .../dice/service/ArticleServiceTests.java | 21 ++ 21 files changed, 240 insertions(+), 429 deletions(-) diff --git a/dice-auth/lua/api_check.lua b/dice-auth/lua/api_check.lua index 9f638bb1..50cd0310 100644 --- a/dice-auth/lua/api_check.lua +++ b/dice-auth/lua/api_check.lua @@ -110,22 +110,6 @@ local function init_post_args() -- json post_args_body = json.decode(ngx.req.get_body_data()) end - - --local post_args_str = string_utils:sort_and_join_kv(post_args_body, "&") - --post_args_str = string_utils:try_decode(post_args_body, max_decode_time) - --if type(post_args_body) == "table" then - -- -- 获取post中的json用ngx.req.get_body_data() - -- local json = require("cjson.safe") - -- - -- - -- decode_body = string_utils:try_decode(post_args_sort, max_decode_time) - --else - -- -- 获取post中的formdata用ngx.req.get_post_args() - -- if string_utils:string_not_empty(post_args_body) then - -- - -- end - --end - --end return post_args_body end @@ -187,7 +171,7 @@ end local function query_secret_key(partner_code) local db = db_utils.get_db() - local sql = string.format('select secret_key from system_user where status=1 and partner_code="%s"', partner_code) + local sql = string.format('select secret_key from system_user where deleted=0 and partner_code="%s"', partner_code) local res, err, errno, sqlstate = db:query(sql) if not res[1] then db_utils.close_db(db) @@ -199,63 +183,6 @@ local function query_secret_key(partner_code) local res_data = res[1] return res_data.secret_key - --local cache = ngx.shared.partner_secret_key - -- - --local secret_cache_key = cache_key .. ":" .. partner_code .. ":" .. partner_code - -- - --local secret_key = "" - -- - --if nil ~= cache then - -- secret_key = cache_client:get_cache(cache, secret_cache_key) - --end - -- - --if string_utils:string_empty(secret_key) then - -- ngx.log(ngx.INFO, string.format("start prepare cache p:%s ....", partner_code)) - -- -- TODO: fusing mechanism - -- local ret, db_object = pcall(function() - -- return db_util.get_db() - -- end - -- ) - -- if not ret then - -- ngx.log(ngx.ERR, "db connection has error") - -- return "", true - -- end - -- - -- // TODO - --local quote_partner_code = ngx.quote_sql_str(partner_code) - --local res, err, errno, sqlstate = db_object:query(string.format('select secret_key from system_user where status=1 and partner_code="%s"', quote_partner_code)) - --if nil ~= err then - ---- TODO: fusing mechanism - --pcall(close_db, db_object) - --ngx.log(ngx.ERR, "sql has error") - --return "", true - --end - --if #res <= 0 then - --if nil ~= cache then - --cache_client:set_cache(cache, secret_cache_key, "", cache_expire_second) - --end - ---- TODO: fusing mechanism - --pcall(close_db, db_object) - --ngx.log(ngx.ERR, "unauthorized") - --return "", false - --end - -- - --secret_key = res[1].secret_key - -- - --local ret, return_value = pcall(close_db, db_object) - -- - --if not ret then - --ngx.log(ngx.ERR, "db connection has error") - --end - -- - --if nil ~= cache then - --cache_client:set_cache(cache, secret_cache_key, secret_key, cache_expire_second) - --end - -- - --ngx.log(ngx.INFO, string.format("end prepare cache p:%s ....", partner_code)) - --end - --return secret_key, false - --return "bi-token-2017" end local function check_timestamp(time) @@ -307,26 +234,6 @@ function _M.check_api_sign() -- 获取uri上的参数,不支持编码后的url local uri_args = ngx.req.get_uri_args() - --local query_args = ngx.req.get_uri_args() - --if string_utils:string_not_empty(ngx.var.args) then - -- local equal_symbol_index = string.find(ngx.var.args, '&', 1) - -- if not equal_symbol_index then - -- local convert_query_args = string_utils:try_decode(ngx.var.args, 1) - -- convert_query_args = string.gsub(convert_query_args, '&', ',') - -- local convert1 = string_utils:split(convert_query_args, ',') - -- local args_table = {} - -- for i, v in ipairs(convert1) do - -- local tmp = convert1[i] - -- local equal_symbol_index = string.find(tmp, '=', 1) - -- if equal_symbol_index > 1 then - -- local key = string.sub(tmp, 1, equal_symbol_index - 1) - -- local value = string.sub(tmp, equal_symbol_index + 1, string.len(tmp)) - -- args_table[key] = value - -- end - -- end - -- query_args = args_table - -- end - --end local body_args = init_post_args() @@ -335,11 +242,6 @@ function _M.check_api_sign() local secret_key = query_secret_key(partner_code) - --if nil ~= interrupt and interrupt then - -- ngx.log(ngx.ERR, "has db error, skip check") - -- return ngx.exit(0) - --end - --check secret key validation if string_utils:string_empty(secret_key) then ngx.log(ngx.ERR, "invalid secret_key") diff --git a/dice-auth/lua/auth_check.lua b/dice-auth/lua/auth_check.lua index 8b8764a1..fae0d307 100644 --- a/dice-auth/lua/auth_check.lua +++ b/dice-auth/lua/auth_check.lua @@ -54,7 +54,7 @@ json.encode_sparse_array(true) ngx.log(ngx.INFO, 'project_type: ' .. project_type .. ' access_uri: ' .. access_uri .. ' content_type: ' .. content_type) -- 先校验是不是管理员 local db = db_utils.get_db() -local sql = string.format('select 1 from auth_rel_role_user t join auth_role t1 on t.role_id=t1.role_id and t1.role_type=1 and t1.status=1 and t1.project_type="%s" where t.user_id=%s and t.status=1 limit 1', project_type, user_id) +local sql = string.format('select 1 from auth_rel_role_user t join auth_role t1 on t.role_id=t1.role_id and t1.role_type=1 and t1.deleted=0 and t1.project_type="%s" where t.user_id=%s and t.deleted=0 limit 1', project_type, user_id) ngx.log(ngx.INFO, '执行SQL查询: ' .. sql) local res, err, errno, sqlstate = db:query(sql) -- 当前系统的管理员 @@ -73,7 +73,7 @@ end if func.start_with(ngx.var.uri, '/api') or string.find(content_type, 'application/json') or project_type == 'stbp' or string.find(ngx.var.uri, '/v%d') then --接口类别权限 -- 获取用户所有接口权限,根据item查找 - sql = string.format('select 1 from (SELECT 1 FROM auth_api t1 join auth_rel_item_api t2 on t1.api_id=t2.api_id and t2.status=1 join auth_item t3 on t2.item_id=t3.item_id and t3.status=1 join auth_rel_role_item t4 on t3.item_id=t4.item_id and t4.status=1 join auth_rel_role_user t5 on t4.role_id=t5.role_id and t5.status=1 where t1.status=1 and "%s" like concat(t1.api_path,"%%") and t1.project_type="%s" and t5.user_id=%s union all select 1 from auth_api t1 join auth_rel_item_api t2 on t1.api_id=t2.api_id and t2.status=1 join auth_item t3 on t2.item_id=t3.item_id and t3.status=1 join auth_classes t4 on t3.classes_id=t4.classes_id and t4.status=1 join auth_group t5 on t4.group_id=t5.group_id and t5.status=1 join auth_role t6 on t5.project_type=t6.project_type and t6.status=1 and t6.role_type=1 join auth_rel_role_user t7 on t6.role_id=t7.role_id where t1.status=1 and "%s" like concat(t1.api_path,"%%") and t1.project_type="%s" and t7.user_id=%s) t limit 1', access_uri, project_type, user_id, access_uri, project_type, user_id) + sql = string.format('select 1 from (SELECT 1 FROM auth_api t1 join auth_rel_item_api t2 on t1.api_id=t2.api_id and t2.deleted=0 join auth_item t3 on t2.item_id=t3.item_id and t3.deleted=0 join auth_rel_role_item t4 on t3.item_id=t4.item_id and t4.deleted=0 join auth_rel_role_user t5 on t4.role_id=t5.role_id and t5.deleted=0 where t1.deleted=0 and "%s" like concat(t1.api_path,"%%") and t1.project_type="%s" and t5.user_id=%s union all select 1 from auth_api t1 join auth_rel_item_api t2 on t1.api_id=t2.api_id and t2.deleted=0 join auth_item t3 on t2.item_id=t3.item_id and t3.deleted=0 join auth_classes t4 on t3.classes_id=t4.classes_id and t4.deleted=0 join auth_group t5 on t4.group_id=t5.group_id and t5.deleted=0 join auth_role t6 on t5.project_type=t6.project_type and t6.deleted=0 and t6.role_type=1 join auth_rel_role_user t7 on t6.role_id=t7.role_id where t1.deleted=0 and "%s" like concat(t1.api_path,"%%") and t1.project_type="%s" and t7.user_id=%s) t limit 1', access_uri, project_type, user_id, access_uri, project_type, user_id) ngx.log(ngx.INFO, '执行SQL查询: ' .. sql) res, err, errno, sqlstate = db:query(sql) diff --git a/dice-auth/lua/get_group_info.lua b/dice-auth/lua/get_group_info.lua index f29d7345..ab9263cb 100644 --- a/dice-auth/lua/get_group_info.lua +++ b/dice-auth/lua/get_group_info.lua @@ -14,14 +14,14 @@ end -- 如果是管理员,返回所有菜单和权限项 local db = db_utils.get_db() -local sql = string.format('select 1 from auth_rel_role_user t join auth_role t1 on t.role_id=t1.role_id and t1.role_type=1 and t1.status=1 and t1.project_type="%s" where t.user_id=%s and t.status=1 limit 1', project_type, user_id) +local sql = string.format('select 1 from auth_rel_role_user t join auth_role t1 on t.role_id=t1.role_id and t1.role_type=1 and t1.deleted=0 and t1.project_type="%s" where t.user_id=%s and t.deleted=0 limit 1', project_type, user_id) ngx.log(ngx.INFO, '执行SQL查询: ' .. sql) local res, err, errno, sqlstate = db:query(sql) -- 当前系统的管理员 if res and res[1] then - sql = string.format('select t.group_id g_group_id,t.group_name g_group_name,t.group_url g_group_url,t.project_type g_project_type,t.order g_order,t.is_display g_is_display,t.style g_style,t1.classes_id c_classes_id,t1.classes_name c_classes_name,t1.classes_url c_classes_url,t1.order c_order,t1.is_display c_is_display,t1.style c_style,t2.item_id i_item_id,t2.item_name i_item_name,t2.item_code i_item_code,t2.order i_order,t2.style i_style,t2.outer_url i_outer_url from auth_group t join auth_classes t1 on t1.group_id=t.group_id and t1.status=1 join auth_item t2 on t2.classes_id=t1.classes_id and t2.status=1 where t.status=1 and t.project_type="%s" order by t.order,t1.order,t2.order', project_type) + sql = string.format('select t.group_id g_group_id,t.group_name g_group_name,t.group_url g_group_url,t.project_type g_project_type,t.order g_order,t.is_display g_is_display,t.style g_style,t1.classes_id c_classes_id,t1.classes_name c_classes_name,t1.classes_url c_classes_url,t1.order c_order,t1.is_display c_is_display,t1.style c_style,t2.item_id i_item_id,t2.item_name i_item_name,t2.item_code i_item_code,t2.order i_order,t2.style i_style,t2.outer_url i_outer_url from auth_group t join auth_classes t1 on t1.group_id=t.group_id and t1.deleted=0 join auth_item t2 on t2.classes_id=t1.classes_id and t2.deleted=0 where t.deleted=0 and t.project_type="%s" order by t.order,t1.order,t2.order', project_type) else - sql = string.format('select t.group_id g_group_id,t.group_name g_group_name,t.group_url g_group_url,t.project_type g_project_type,t.order g_order,t.is_display g_is_display,t.style g_style,t1.classes_id c_classes_id,t1.classes_name c_classes_name,t1.classes_url c_classes_url,t1.order c_order,t1.is_display c_is_display,t1.style c_style,t2.item_id i_item_id,t2.item_name i_item_name,t2.item_code i_item_code,t2.order i_order,t2.style i_style,t2.outer_url i_outer_url from auth_group t join auth_classes t1 on t1.group_id=t.group_id and t1.status=1 join auth_item t2 on t2.classes_id=t1.classes_id and t2.status=1 join auth_rel_role_item t3 on t3.item_id=t2.item_id and t3.status=1 join auth_rel_role_user t4 on t4.role_id=t3.role_id and t4.status=1 where t.status=1 and t.project_type="%s" and t4.user_id=%s order by t.order,t1.order,t2.order', project_type, user_id) + sql = string.format('select t.group_id g_group_id,t.group_name g_group_name,t.group_url g_group_url,t.project_type g_project_type,t.order g_order,t.is_display g_is_display,t.style g_style,t1.classes_id c_classes_id,t1.classes_name c_classes_name,t1.classes_url c_classes_url,t1.order c_order,t1.is_display c_is_display,t1.style c_style,t2.item_id i_item_id,t2.item_name i_item_name,t2.item_code i_item_code,t2.order i_order,t2.style i_style,t2.outer_url i_outer_url from auth_group t join auth_classes t1 on t1.group_id=t.group_id and t1.deleted=0 join auth_item t2 on t2.classes_id=t1.classes_id and t2.deleted=0 join auth_rel_role_item t3 on t3.item_id=t2.item_id and t3.deleted=0 join auth_rel_role_user t4 on t4.role_id=t3.role_id and t4.deleted=0 where t.deleted=0 and t.project_type="%s" and t4.user_id=%s order by t.order,t1.order,t2.order', project_type, user_id) end ngx.log(ngx.INFO, '执行SQL查询: ' .. sql) @@ -110,7 +110,7 @@ end table.sort(group_list, comp) -ngx.status = 200 +ngx.deleted = 200 ngx.header.content_type = "application/json; charset=utf-8"; ngx.say(string.format('{"code":0,"msg":null,"data":%s,"success":true}', json.encode(group_list))) ngx.exit(ngx.OK) diff --git a/dice-docker/dice-openresty/lua/api_check.lua b/dice-docker/dice-openresty/lua/api_check.lua index 9f638bb1..67f5a9e4 100644 --- a/dice-docker/dice-openresty/lua/api_check.lua +++ b/dice-docker/dice-openresty/lua/api_check.lua @@ -111,21 +111,6 @@ local function init_post_args() post_args_body = json.decode(ngx.req.get_body_data()) end - --local post_args_str = string_utils:sort_and_join_kv(post_args_body, "&") - --post_args_str = string_utils:try_decode(post_args_body, max_decode_time) - --if type(post_args_body) == "table" then - -- -- 获取post中的json用ngx.req.get_body_data() - -- local json = require("cjson.safe") - -- - -- - -- decode_body = string_utils:try_decode(post_args_sort, max_decode_time) - --else - -- -- 获取post中的formdata用ngx.req.get_post_args() - -- if string_utils:string_not_empty(post_args_body) then - -- - -- end - --end - --end return post_args_body end @@ -187,7 +172,7 @@ end local function query_secret_key(partner_code) local db = db_utils.get_db() - local sql = string.format('select secret_key from system_user where status=1 and partner_code="%s"', partner_code) + local sql = string.format('select secret_key from system_user where deleted=0 and partner_code="%s"', partner_code) local res, err, errno, sqlstate = db:query(sql) if not res[1] then db_utils.close_db(db) @@ -198,64 +183,6 @@ local function query_secret_key(partner_code) local res_data = res[1] return res_data.secret_key - - --local cache = ngx.shared.partner_secret_key - -- - --local secret_cache_key = cache_key .. ":" .. partner_code .. ":" .. partner_code - -- - --local secret_key = "" - -- - --if nil ~= cache then - -- secret_key = cache_client:get_cache(cache, secret_cache_key) - --end - -- - --if string_utils:string_empty(secret_key) then - -- ngx.log(ngx.INFO, string.format("start prepare cache p:%s ....", partner_code)) - -- -- TODO: fusing mechanism - -- local ret, db_object = pcall(function() - -- return db_util.get_db() - -- end - -- ) - -- if not ret then - -- ngx.log(ngx.ERR, "db connection has error") - -- return "", true - -- end - -- - -- // TODO - --local quote_partner_code = ngx.quote_sql_str(partner_code) - --local res, err, errno, sqlstate = db_object:query(string.format('select secret_key from system_user where status=1 and partner_code="%s"', quote_partner_code)) - --if nil ~= err then - ---- TODO: fusing mechanism - --pcall(close_db, db_object) - --ngx.log(ngx.ERR, "sql has error") - --return "", true - --end - --if #res <= 0 then - --if nil ~= cache then - --cache_client:set_cache(cache, secret_cache_key, "", cache_expire_second) - --end - ---- TODO: fusing mechanism - --pcall(close_db, db_object) - --ngx.log(ngx.ERR, "unauthorized") - --return "", false - --end - -- - --secret_key = res[1].secret_key - -- - --local ret, return_value = pcall(close_db, db_object) - -- - --if not ret then - --ngx.log(ngx.ERR, "db connection has error") - --end - -- - --if nil ~= cache then - --cache_client:set_cache(cache, secret_cache_key, secret_key, cache_expire_second) - --end - -- - --ngx.log(ngx.INFO, string.format("end prepare cache p:%s ....", partner_code)) - --end - --return secret_key, false - --return "bi-token-2017" end local function check_timestamp(time) @@ -307,39 +234,10 @@ function _M.check_api_sign() -- 获取uri上的参数,不支持编码后的url local uri_args = ngx.req.get_uri_args() - --local query_args = ngx.req.get_uri_args() - --if string_utils:string_not_empty(ngx.var.args) then - -- local equal_symbol_index = string.find(ngx.var.args, '&', 1) - -- if not equal_symbol_index then - -- local convert_query_args = string_utils:try_decode(ngx.var.args, 1) - -- convert_query_args = string.gsub(convert_query_args, '&', ',') - -- local convert1 = string_utils:split(convert_query_args, ',') - -- local args_table = {} - -- for i, v in ipairs(convert1) do - -- local tmp = convert1[i] - -- local equal_symbol_index = string.find(tmp, '=', 1) - -- if equal_symbol_index > 1 then - -- local key = string.sub(tmp, 1, equal_symbol_index - 1) - -- local value = string.sub(tmp, equal_symbol_index + 1, string.len(tmp)) - -- args_table[key] = value - -- end - -- end - -- query_args = args_table - -- end - --end - local body_args = init_post_args() - -- 待签名字符串 local check_sign_str = generate_sign_string(timestamp, partner_code, body_args, uri_args) - local secret_key = query_secret_key(partner_code) - - --if nil ~= interrupt and interrupt then - -- ngx.log(ngx.ERR, "has db error, skip check") - -- return ngx.exit(0) - --end - --check secret key validation if string_utils:string_empty(secret_key) then ngx.log(ngx.ERR, "invalid secret_key") diff --git a/dice-docker/dice-openresty/lua/auth_check.lua b/dice-docker/dice-openresty/lua/auth_check.lua index bc2c449f..01455fd5 100644 --- a/dice-docker/dice-openresty/lua/auth_check.lua +++ b/dice-docker/dice-openresty/lua/auth_check.lua @@ -46,7 +46,7 @@ json.encode_sparse_array(true) ngx.log(ngx.INFO, 'project_type: ' .. project_type .. ' access_uri: ' .. access_uri .. ' content_type: ' .. content_type) -- 先校验是不是管理员 local db = db_utils.get_db() -local sql = string.format('select 1 from auth_rel_role_user t join auth_role t1 on t.role_id=t1.role_id and t1.role_type=1 and t1.status=1 and t1.project_type="%s" where t.user_id=%s and t.status=1 limit 1', project_type, user_id) +local sql = string.format('select 1 from auth_rel_role_user t join auth_role t1 on t.role_id=t1.role_id and t1.role_type=1 and t1.deleted=0 and t1.project_type="%s" where t.user_id=%s and t.deleted=0 limit 1', project_type, user_id) ngx.log(ngx.INFO, '执行SQL查询: ' .. sql) local res, err, errno, sqlstate = db:query(sql) -- 当前系统的管理员 @@ -65,7 +65,7 @@ end if func.start_with(ngx.var.uri, '/api') or string.find(content_type, 'application/json') or project_type == 'stbp' or string.find(ngx.var.uri, '/v%d') then --接口类别权限 -- 获取用户所有接口权限,根据item查找 - sql = string.format('select 1 from (SELECT 1 FROM auth_api t1 join auth_rel_item_api t2 on t1.api_id=t2.api_id and t2.status=1 join auth_item t3 on t2.item_id=t3.item_id and t3.status=1 join auth_rel_role_item t4 on t3.item_id=t4.item_id and t4.status=1 join auth_rel_role_user t5 on t4.role_id=t5.role_id and t5.status=1 where t1.status=1 and "%s" like concat(t1.api_path,"%%") and t1.project_type="%s" and t5.user_id=%s union all select 1 from auth_api t1 join auth_rel_item_api t2 on t1.api_id=t2.api_id and t2.status=1 join auth_item t3 on t2.item_id=t3.item_id and t3.status=1 join auth_classes t4 on t3.classes_id=t4.classes_id and t4.status=1 join auth_group t5 on t4.group_id=t5.group_id and t5.status=1 join auth_role t6 on t5.project_type=t6.project_type and t6.status=1 and t6.role_type=1 join auth_rel_role_user t7 on t6.role_id=t7.role_id where t1.status=1 and "%s" like concat(t1.api_path,"%%") and t1.project_type="%s" and t7.user_id=%s) t limit 1', access_uri, project_type, user_id, access_uri, project_type, user_id) + sql = string.format('select 1 from (SELECT 1 FROM auth_api t1 join auth_rel_item_api t2 on t1.api_id=t2.api_id and t2.deleted=0 join auth_item t3 on t2.item_id=t3.item_id and t3.deleted=0 join auth_rel_role_item t4 on t3.item_id=t4.item_id and t4.deleted=0 join auth_rel_role_user t5 on t4.role_id=t5.role_id and t5.deleted=0 where t1.deleted=0 and "%s" like concat(t1.api_path,"%%") and t1.project_type="%s" and t5.user_id=%s union all select 1 from auth_api t1 join auth_rel_item_api t2 on t1.api_id=t2.api_id and t2.deleted=0 join auth_item t3 on t2.item_id=t3.item_id and t3.deleted=0 join auth_classes t4 on t3.classes_id=t4.classes_id and t4.deleted=0 join auth_group t5 on t4.group_id=t5.group_id and t5.deleted=0 join auth_role t6 on t5.project_type=t6.project_type and t6.deleted=0 and t6.role_type=1 join auth_rel_role_user t7 on t6.role_id=t7.role_id where t1.deleted=0 and "%s" like concat(t1.api_path,"%%") and t1.project_type="%s" and t7.user_id=%s) t limit 1', access_uri, project_type, user_id, access_uri, project_type, user_id) ngx.log(ngx.INFO, '执行SQL查询: ' .. sql) res, err, errno, sqlstate = db:query(sql) diff --git a/dice-docker/dice-openresty/lua/get_group_info.lua b/dice-docker/dice-openresty/lua/get_group_info.lua index f29d7345..ab9263cb 100644 --- a/dice-docker/dice-openresty/lua/get_group_info.lua +++ b/dice-docker/dice-openresty/lua/get_group_info.lua @@ -14,14 +14,14 @@ end -- 如果是管理员,返回所有菜单和权限项 local db = db_utils.get_db() -local sql = string.format('select 1 from auth_rel_role_user t join auth_role t1 on t.role_id=t1.role_id and t1.role_type=1 and t1.status=1 and t1.project_type="%s" where t.user_id=%s and t.status=1 limit 1', project_type, user_id) +local sql = string.format('select 1 from auth_rel_role_user t join auth_role t1 on t.role_id=t1.role_id and t1.role_type=1 and t1.deleted=0 and t1.project_type="%s" where t.user_id=%s and t.deleted=0 limit 1', project_type, user_id) ngx.log(ngx.INFO, '执行SQL查询: ' .. sql) local res, err, errno, sqlstate = db:query(sql) -- 当前系统的管理员 if res and res[1] then - sql = string.format('select t.group_id g_group_id,t.group_name g_group_name,t.group_url g_group_url,t.project_type g_project_type,t.order g_order,t.is_display g_is_display,t.style g_style,t1.classes_id c_classes_id,t1.classes_name c_classes_name,t1.classes_url c_classes_url,t1.order c_order,t1.is_display c_is_display,t1.style c_style,t2.item_id i_item_id,t2.item_name i_item_name,t2.item_code i_item_code,t2.order i_order,t2.style i_style,t2.outer_url i_outer_url from auth_group t join auth_classes t1 on t1.group_id=t.group_id and t1.status=1 join auth_item t2 on t2.classes_id=t1.classes_id and t2.status=1 where t.status=1 and t.project_type="%s" order by t.order,t1.order,t2.order', project_type) + sql = string.format('select t.group_id g_group_id,t.group_name g_group_name,t.group_url g_group_url,t.project_type g_project_type,t.order g_order,t.is_display g_is_display,t.style g_style,t1.classes_id c_classes_id,t1.classes_name c_classes_name,t1.classes_url c_classes_url,t1.order c_order,t1.is_display c_is_display,t1.style c_style,t2.item_id i_item_id,t2.item_name i_item_name,t2.item_code i_item_code,t2.order i_order,t2.style i_style,t2.outer_url i_outer_url from auth_group t join auth_classes t1 on t1.group_id=t.group_id and t1.deleted=0 join auth_item t2 on t2.classes_id=t1.classes_id and t2.deleted=0 where t.deleted=0 and t.project_type="%s" order by t.order,t1.order,t2.order', project_type) else - sql = string.format('select t.group_id g_group_id,t.group_name g_group_name,t.group_url g_group_url,t.project_type g_project_type,t.order g_order,t.is_display g_is_display,t.style g_style,t1.classes_id c_classes_id,t1.classes_name c_classes_name,t1.classes_url c_classes_url,t1.order c_order,t1.is_display c_is_display,t1.style c_style,t2.item_id i_item_id,t2.item_name i_item_name,t2.item_code i_item_code,t2.order i_order,t2.style i_style,t2.outer_url i_outer_url from auth_group t join auth_classes t1 on t1.group_id=t.group_id and t1.status=1 join auth_item t2 on t2.classes_id=t1.classes_id and t2.status=1 join auth_rel_role_item t3 on t3.item_id=t2.item_id and t3.status=1 join auth_rel_role_user t4 on t4.role_id=t3.role_id and t4.status=1 where t.status=1 and t.project_type="%s" and t4.user_id=%s order by t.order,t1.order,t2.order', project_type, user_id) + sql = string.format('select t.group_id g_group_id,t.group_name g_group_name,t.group_url g_group_url,t.project_type g_project_type,t.order g_order,t.is_display g_is_display,t.style g_style,t1.classes_id c_classes_id,t1.classes_name c_classes_name,t1.classes_url c_classes_url,t1.order c_order,t1.is_display c_is_display,t1.style c_style,t2.item_id i_item_id,t2.item_name i_item_name,t2.item_code i_item_code,t2.order i_order,t2.style i_style,t2.outer_url i_outer_url from auth_group t join auth_classes t1 on t1.group_id=t.group_id and t1.deleted=0 join auth_item t2 on t2.classes_id=t1.classes_id and t2.deleted=0 join auth_rel_role_item t3 on t3.item_id=t2.item_id and t3.deleted=0 join auth_rel_role_user t4 on t4.role_id=t3.role_id and t4.deleted=0 where t.deleted=0 and t.project_type="%s" and t4.user_id=%s order by t.order,t1.order,t2.order', project_type, user_id) end ngx.log(ngx.INFO, '执行SQL查询: ' .. sql) @@ -110,7 +110,7 @@ end table.sort(group_list, comp) -ngx.status = 200 +ngx.deleted = 200 ngx.header.content_type = "application/json; charset=utf-8"; ngx.say(string.format('{"code":0,"msg":null,"data":%s,"success":true}', json.encode(group_list))) ngx.exit(ngx.OK) diff --git a/dice-server/src/main/java/com/bihell/dice/controller/admin/TaskController.java b/dice-server/src/main/java/com/bihell/dice/controller/admin/TaskController.java index 5459cf63..1eb15180 100644 --- a/dice-server/src/main/java/com/bihell/dice/controller/admin/TaskController.java +++ b/dice-server/src/main/java/com/bihell/dice/controller/admin/TaskController.java @@ -28,8 +28,6 @@ public class TaskController extends BaseController { private final TaskMapper taskMapper; private final TaskService taskService; private final TaskLogMapper taskLogMapper; -// private final TaskLogService taskLogService; - /** * 获取定时任务管理列表 diff --git a/dice-server/src/main/java/com/bihell/dice/model/BaseEntity.java b/dice-server/src/main/java/com/bihell/dice/model/BaseEntity.java index ca05b7a7..bc4d83ea 100644 --- a/dice-server/src/main/java/com/bihell/dice/model/BaseEntity.java +++ b/dice-server/src/main/java/com/bihell/dice/model/BaseEntity.java @@ -1,5 +1,6 @@ package com.bihell.dice.model; +import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatisplus.extension.activerecord.Model; import lombok.Data; import lombok.EqualsAndHashCode; @@ -35,5 +36,6 @@ public class BaseEntity> extends Model { /** * 逻辑删除标识 */ - private Integer status = 1; + @TableLogic + private Integer deleted = 0; } diff --git a/dice-server/src/main/java/com/bihell/dice/model/tool/Task.java b/dice-server/src/main/java/com/bihell/dice/model/tool/Task.java index 3bea264f..259ede5c 100644 --- a/dice-server/src/main/java/com/bihell/dice/model/tool/Task.java +++ b/dice-server/src/main/java/com/bihell/dice/model/tool/Task.java @@ -41,4 +41,6 @@ public class Task extends BaseEntity { private Date execAt; private String execResult; + + private Integer status; } diff --git a/dice-server/src/main/java/com/bihell/dice/service/auth/impl/AuthRoleServiceImpl.java b/dice-server/src/main/java/com/bihell/dice/service/auth/impl/AuthRoleServiceImpl.java index de5e5bfd..86b00be7 100644 --- a/dice-server/src/main/java/com/bihell/dice/service/auth/impl/AuthRoleServiceImpl.java +++ b/dice-server/src/main/java/com/bihell/dice/service/auth/impl/AuthRoleServiceImpl.java @@ -1,12 +1,8 @@ package com.bihell.dice.service.auth.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.bihell.dice.exception.TipException; import com.bihell.dice.mapper.auth.AuthItemMapper; -import com.bihell.dice.mapper.auth.AuthRelRoleApiMapper; -import com.bihell.dice.mapper.auth.AuthRelRoleContentMapper; -import com.bihell.dice.mapper.auth.AuthRelRoleUserMapper; import com.bihell.dice.model.auth.*; import com.bihell.dice.service.auth.*; import lombok.RequiredArgsConstructor; @@ -30,10 +26,6 @@ @Transactional(rollbackFor = Throwable.class) @RequiredArgsConstructor(onConstructor_ = @Autowired) public class AuthRoleServiceImpl implements AuthRoleService { - - private final AuthRelRoleApiMapper authRelRoleApiMapper; - private final AuthRelRoleContentMapper authRelRoleContentMapper; - private final AuthRelRoleUserMapper authRelRoleUserMapper; private final AuthItemMapper authItemMapper; private final AuthRelRoleApiService authRelRoleApiService; private final AuthRelRoleContentService authRelRoleContentService; @@ -43,7 +35,9 @@ public class AuthRoleServiceImpl implements AuthRoleService { @Override public AuthRole save(AuthRole authRole) { - if (authRole.selectCount(new QueryWrapper().lambda().eq(AuthRole::getRoleName, authRole.getRoleName()).eq(AuthRole::getStatus, 1)) > 0) { + if (authRole.selectCount(new QueryWrapper().lambda() + .eq(AuthRole::getRoleName, authRole.getRoleName()) + ) > 0) { throw new TipException("内容重复!"); } else { authRole.insert(); @@ -56,7 +50,6 @@ public AuthRole save(AuthRole authRole) { public AuthRole update(AuthRole authRole) { if (authRole.selectCount(new QueryWrapper().lambda() .eq(AuthRole::getRoleName, authRole.getRoleName()) - .eq(AuthRole::getStatus, 1) .ne(AuthRole::getId, authRole.getId())) > 0) { throw new TipException("内容重复!"); } else { @@ -67,9 +60,7 @@ public AuthRole update(AuthRole authRole) { @Override public void assignApi(AuthRole authRole) { - authRelRoleApiMapper.update(null, new UpdateWrapper().lambda() - .eq(AuthRelRoleApi::getRoleId, authRole.getId()) - .set(AuthRelRoleApi::getStatus, 0)); + authRole.deleteById(); if (!CollectionUtils.isEmpty(authRole.getApiIds())) { List authRelRoleApiList = authRole.getApiIds().stream() @@ -82,9 +73,7 @@ public void assignApi(AuthRole authRole) { @Override public void assignContent(AuthRole authRole) { - authRelRoleContentMapper.update(null, new UpdateWrapper().lambda() - .eq(AuthRelRoleContent::getRoleId, authRole.getId()) - .set(AuthRelRoleContent::getStatus, 0)); + authRole.deleteById(); if (!CollectionUtils.isEmpty(authRole.getContentIds())) { List authRelRoleContentList = authRole.getContentIds().stream() @@ -97,9 +86,7 @@ public void assignContent(AuthRole authRole) { @Override public void assignUser(AuthRole authRole) { - authRelRoleUserMapper.update(null, new UpdateWrapper().lambda() - .eq(AuthRelRoleUser::getRoleId, authRole.getId()) - .set(AuthRelRoleUser::getStatus, 0)); + authRole.deleteById(); if (!CollectionUtils.isEmpty(authRole.getUserIds())) { List authRelRoleUserList = authRole.getUserIds().stream() diff --git a/dice-server/src/main/java/com/bihell/dice/service/auth/impl/UserServiceImpl.java b/dice-server/src/main/java/com/bihell/dice/service/auth/impl/UserServiceImpl.java index 63bc7765..68ac3a06 100644 --- a/dice-server/src/main/java/com/bihell/dice/service/auth/impl/UserServiceImpl.java +++ b/dice-server/src/main/java/com/bihell/dice/service/auth/impl/UserServiceImpl.java @@ -142,11 +142,7 @@ public IPage getUserList(QueryParam queryParam) { @Override public void assignRole(User user) { - - authRelRoleUserMapper.update(null, new UpdateWrapper().lambda() - .eq(AuthRelRoleUser::getUserId, user.getId()) - .set(AuthRelRoleUser::getStatus, 0)); - + user.deleteById(); if (!CollectionUtils.isEmpty(user.getRoleIds())) { List authRelRoleUserList = user.getRoleIds().stream() .filter(Objects::nonNull) diff --git a/dice-server/src/main/resources/application.yml b/dice-server/src/main/resources/application.yml index e39bfcad..6cd90f51 100644 --- a/dice-server/src/main/resources/application.yml +++ b/dice-server/src/main/resources/application.yml @@ -26,4 +26,6 @@ mybatis-plus: global-config: db-config: id-type: auto + logic-not-delete-value: 0 + logic-delete-value: 1 mapper-locations: classpath:/mapper/*Mapper.xml diff --git a/dice-server/src/main/resources/init.sql b/dice-server/src/main/resources/init.sql index 21bb5d16..cc2b1009 100644 --- a/dice-server/src/main/resources/init.sql +++ b/dice-server/src/main/resources/init.sql @@ -127,7 +127,7 @@ CREATE TABLE `auth_group` ( `order` int(11) DEFAULT NULL, `is_display` int(11) DEFAULT NULL COMMENT '显示状态(0不显示,1显示)', `style` varchar(255) DEFAULT NULL, - `status` int(11) DEFAULT NULL COMMENT '状态(0无效1有效)', + deleted INT(1) DEFAULT '0' COMMENT '逻辑删除标识(0.未删除,1.已删除)', `creator` int(11) DEFAULT NULL, `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `modifier` int(11) DEFAULT NULL, @@ -144,7 +144,7 @@ CREATE TABLE `auth_classes` ( `order` int(11) DEFAULT NULL, `is_display` int(11) DEFAULT NULL COMMENT '显示状态(0不显示,1显示)', `style` varchar(255) DEFAULT NULL, - `status` int(11) DEFAULT NULL, + deleted INT(1) DEFAULT '0' COMMENT '逻辑删除标识(0.未删除,1.已删除)', `creator` int(11) DEFAULT NULL, `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `modifier` int(11) DEFAULT NULL, @@ -162,7 +162,7 @@ CREATE TABLE `auth_item` ( `style` varchar(255) DEFAULT NULL, `auto_flag` tinyint(4) DEFAULT NULL, `outer_url` varchar(1000) DEFAULT NULL, - `status` int(11) DEFAULT NULL, + deleted INT(1) DEFAULT '0' COMMENT '逻辑删除标识(0.未删除,1.已删除)', `creator` int(11) DEFAULT NULL, `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `modifier` int(11) DEFAULT NULL, @@ -192,7 +192,7 @@ create table auth_api api_type varchar(255) default '' null comment 'API类型', api_path varchar(255) default '' not null, project_type varchar(64) default '' not null comment '类目权限类型', - status int null comment '状态(0无效1有效)', + deleted INT(1) DEFAULT '0' COMMENT '逻辑删除标识(0.未删除,1.已删除)', creator int null, create_time timestamp default CURRENT_TIMESTAMP null, modifier int null, @@ -209,7 +209,7 @@ create table auth_rel_item_api primary key, item_id int not null comment '操作项id', api_id int(4) not null comment 'api id', - status int null, + deleted INT(1) DEFAULT '0' COMMENT '逻辑删除标识(0.未删除,1.已删除)', creator int null comment '创建人', create_time timestamp default CURRENT_TIMESTAMP null comment '创建时间', modifier int null comment '修改人', @@ -225,7 +225,7 @@ create table auth_rel_role_api primary key, role_id int(4) not null comment '角色id', api_id int(4) not null comment '权限项id', - status int null, + deleted INT(1) DEFAULT '0' COMMENT '逻辑删除标识(0.未删除,1.已删除)', creator int null comment '创建人', create_time timestamp default CURRENT_TIMESTAMP null comment '创建时间', modifier int null comment '修改人', @@ -244,7 +244,7 @@ create table auth_role role_type int(4) not null comment '角色类型 1:管理员 2:用户', project_type varchar(255) null comment '系统类型', description varchar(255) null comment '描述', - status int(255) null comment '状态(0无效1有效)', + deleted INT(1) DEFAULT '0' COMMENT '逻辑删除标识(0.未删除,1.已删除)', creator int null, create_time timestamp default CURRENT_TIMESTAMP null, modifier int null, @@ -258,7 +258,7 @@ create table auth_rel_role_user primary key, user_id int not null comment '用户id', role_id int(4) not null comment '角色id', - status int null, + deleted INT(1) DEFAULT '0' COMMENT '逻辑删除标识(0.未删除,1.已删除)', creator int null comment '创建人', create_time timestamp default CURRENT_TIMESTAMP null comment '创建时间', modifier int null comment '修改人', @@ -277,7 +277,7 @@ create table auth_content content_type varchar(255) default '' not null, content_name varchar(255) default '' not null, content_value varchar(255) null, - status tinyint null, + deleted INT(1) DEFAULT '0' COMMENT '逻辑删除标识(0.未删除,1.已删除)', creator int null, create_time timestamp default CURRENT_TIMESTAMP null, modifier int null, @@ -298,7 +298,7 @@ create table auth_rel_role_content primary key, role_id int(4) not null comment '角色id', content_id int(4) not null comment '权限项id', - status int null, + deleted INT(1) DEFAULT '0' COMMENT '逻辑删除标识(0.未删除,1.已删除)', creator int null comment '创建人', create_time timestamp default CURRENT_TIMESTAMP null comment '创建时间', modifier int null comment '修改人', @@ -314,7 +314,7 @@ create table auth_rel_role_item primary key, role_id int(4) not null comment '角色id', item_id int(4) not null comment '权限项id', - status int null, + deleted INT(1) DEFAULT '0' COMMENT '逻辑删除标识(0.未删除,1.已删除)', creator int null comment '创建人', create_time timestamp default CURRENT_TIMESTAMP null comment '创建时间', modifier int null comment '修改人', @@ -337,6 +337,7 @@ create table task name varchar(50) comment '任务名', note varchar(255) null comment '任务说明', status int null comment '状态(0无效1有效)', + deleted INT(1) DEFAULT '0' COMMENT '逻辑删除标识(0.未删除,1.已删除)', creator int comment '创建人', create_time timestamp default CURRENT_TIMESTAMP comment '创建时间/注册时间', modifier int comment '最后更新人', @@ -361,10 +362,10 @@ create table task_log INSERT INTO dice.user (id, username, password_md5, email, screen_name, created, logged) VALUES (1, 'dice', '3e6693e83d186225b85b09e71c974d2d', 'tpxcer@outlook.com', 'admin', '2019-05-16 02:24:35', '2020-01-08 16:13:10'); INSERT INTO dice.user (id, username, password_md5, email, screen_name, created, logged) VALUES (2, 'demo', '3e6693e83d186225b85b09e71c974d2d', 'demo@bihell.com', 'demo用户', '2019-12-27 15:34:01', '2020-01-07 21:10:34'); -INSERT INTO dice.task (id, concurrent, cron, data, exec_at, exec_result, job_class, job_group, name, note, status, creator, create_time, modifier, modify_time) VALUES (1, 0, '0/6 * * * * ?', '{ +INSERT INTO dice.task (id, concurrent, cron, data, exec_at, exec_result, job_class, job_group, name, note, status, creator, create_time, modifier, modify_time, deleted) VALUES (1, 0, '0/6 * * * * ?', '{ "appname": "dice", "version":2 -}', '2020-01-27 14:54:24', '执行成功', 'com.bihell.dice.service.task.job.HelloJob', 'default', '测试任务1', '测试任务1', 0, 1, '2018-12-28 09:54:00', -1, '2019-03-27 11:47:11'); +}', '2020-01-27 14:54:24', '执行成功', 'com.bihell.dice.service.task.job.HelloJob', 'default', '测试任务1', '测试任务1', 0, 1, '2018-12-28 09:54:00', -1, '2019-03-27 11:47:11', 0); INSERT INTO article (title, created, modified, content, author_id, hits, tags, category, status, type) VALUES ('Hello world', now(), now(), ' @@ -406,154 +407,156 @@ VALUES ('关于', now(), now(), '# About me INSERT INTO sys_option (option_key, option_value) VALUES ('dice_init', 'true'); --- 权限相关初始化 - -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (39, '', '/v1/api/admin/article', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (40, '', '/v1/api/admin/article/count', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (41, '', '/v1/api/admin/auth/api/add', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (42, '', '/v1/api/admin/auth/api/get', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (43, '', '/v1/api/admin/auth/api/list', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (44, '', '/v1/api/admin/auth/api/update', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (45, '', '/v1/api/admin/auth/classes/add', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (46, '', '/v1/api/admin/auth/classes/get', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (47, '', '/v1/api/admin/auth/classes/update', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (48, '', '/v1/api/admin/auth/content/add', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (49, '', '/v1/api/admin/auth/content/get', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (50, '', '/v1/api/admin/auth/content/list', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (51, '', '/v1/api/admin/auth/content/update', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (52, '', '/v1/api/admin/auth/group/add', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (53, '', '/v1/api/admin/auth/group/get', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (54, '', '/v1/api/admin/auth/group/list', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (55, '', '/v1/api/admin/auth/group/update', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (56, '', '/v1/api/admin/auth/item/add', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (57, '', '/v1/api/admin/auth/item/assign/api', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (58, '', '/v1/api/admin/auth/item/get', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (59, '', '/v1/api/admin/auth/item/list', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (60, '', '/v1/api/admin/auth/item/update', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (61, '', '/v1/api/admin/auth/login', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (62, '', '/v1/api/admin/auth/logout', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (63, '', '/v1/api/admin/auth/project/project_list', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (64, '', '/v1/api/admin/auth/reset/password', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (65, '', '/v1/api/admin/auth/reset/user', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (66, '', '/v1/api/admin/auth/role/add', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (67, '', '/v1/api/admin/auth/role/assign/api', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (68, '', '/v1/api/admin/auth/role/assign/content', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (69, '', '/v1/api/admin/auth/role/assign/item', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (70, '', '/v1/api/admin/auth/role/assign/user', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (71, '', '/v1/api/admin/auth/role/get', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (72, '', '/v1/api/admin/auth/role/list', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (73, '', '/v1/api/admin/auth/role/update', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (74, '', '/v1/api/admin/auth/user/add', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (75, '', '/v1/api/admin/auth/user/assign/role', 'dice', 1, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (76, '', '/v1/api/admin/auth/user/get', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (77, '', '/v1/api/admin/auth/user/list', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (78, '', '/v1/api/admin/auth/user/list/all', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (79, '', '/v1/api/admin/auth/user/update', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (80, '', '/v1/api/admin/auth/user_info', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (81, '', '/v1/api/admin/comment', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (82, '', '/v1/api/admin/comment/count', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (83, '', '/v1/api/admin/media', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (84, '', '/v1/api/admin/media/upload', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (85, '', '/v1/api/admin/meta', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (86, '', '/v1/api/admin/option/all', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (87, '', '/v1/api/admin/option/save', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (88, '', '/v1/api/admin/page', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (89, '', '/v1/api/admin/snippet', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (90, '', '/v1/api/admin/snippet/snippet_title', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (91, '', '/v1/api/archive', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (92, '', '/v1/api/article', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (93, '', '/v1/api/category', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (94, '', '/v1/api/comment', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (95, '', '/v1/api/comment/assess', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (96, '', '/v1/api/option', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (97, '', '/v1/api/page', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); -INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, status, creator, create_time, modifier, modify_time) VALUES (98, '', '/v1/api/tag', 'dice', 1, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43');INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, status, creator, create_time, modifier, modify_time) VALUES (1, '文章列表', '/blog/article', 1, 0, 1, '', 1, null, '2019-12-24 15:13:20', null, '2019-12-24 15:13:20'); -INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, status, creator, create_time, modifier, modify_time) VALUES (2, '评论列表', '/blog/comment', 1, 0, 1, '', 1, null, '2019-12-24 15:48:57', null, '2019-12-24 15:48:57'); -INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, status, creator, create_time, modifier, modify_time) VALUES (3, '标签分类', '/blog/tag', 1, 0, 1, '', 1, null, '2019-12-24 15:49:06', null, '2019-12-24 15:49:06'); -INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, status, creator, create_time, modifier, modify_time) VALUES (4, '页面列表', '/blog/page', 1, 0, 1, '', 1, null, '2019-12-24 15:49:15', null, '2019-12-24 15:49:15'); -INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, status, creator, create_time, modifier, modify_time) VALUES (5, '网站设置', '/blog/setting', 1, 0, 1, '', 1, null, '2019-12-24 15:49:24', null, '2019-12-24 15:49:24'); -INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, status, creator, create_time, modifier, modify_time) VALUES (6, '代码段', '/snippet/index', 2, 0, 1, '', 1, null, '2019-12-24 15:52:39', null, '2019-12-24 15:52:39'); -INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, status, creator, create_time, modifier, modify_time) VALUES (7, '媒体库', '/media-library/index', 2, 0, 1, '', 1, null, '2019-12-24 15:54:28', null, '2019-12-24 15:54:28'); -INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, status, creator, create_time, modifier, modify_time) VALUES (8, '用户列表', '/auth/user/list', 4, 0, 1, '', 1, null, '2019-12-24 15:55:44', null, '2019-12-24 15:55:44'); -INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, status, creator, create_time, modifier, modify_time) VALUES (9, '菜单管理', '/auth/menu/list', 4, 0, 1, '', 1, null, '2019-12-24 15:56:23', null, '2019-12-24 15:56:23'); -INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, status, creator, create_time, modifier, modify_time) VALUES (11, 'API管理', '', 4, 0, 1, '', 1, null, '2020-01-06 18:22:48', null, '2020-01-06 18:22:48'); -INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, status, creator, create_time, modifier, modify_time) VALUES (12, '角色管理', '', 4, 0, 1, '', 1, null, '2020-01-07 21:21:23', null, '2020-01-07 21:21:23'); -INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, status, creator, create_time, modifier, modify_time) VALUES (13, '内容管理', '', 4, 0, 1, '', 1, null, '2020-01-07 22:10:50', null, '2020-01-07 22:10:50');INSERT INTO dice.auth_group (group_id, group_name, group_url, project_type, `order`, is_display, style, status, creator, create_time, modifier, modify_time) VALUES (1, '博客', '', 'dice', 0, 1, '', 1, null, '2019-12-23 17:56:50', null, '2019-12-23 17:56:50'); -INSERT INTO dice.auth_group (group_id, group_name, group_url, project_type, `order`, is_display, style, status, creator, create_time, modifier, modify_time) VALUES (2, '工具', '', 'dice', 0, 1, '', 1, null, '2019-12-23 18:08:01', null, '2019-12-23 18:08:01'); -INSERT INTO dice.auth_group (group_id, group_name, group_url, project_type, `order`, is_display, style, status, creator, create_time, modifier, modify_time) VALUES (4, '权限', '', 'dice', 0, 1, '', 1, null, '2019-12-23 18:25:39', null, '2019-12-23 18:25:39');INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (1, '新增文章', '/blog/article/new', 1, 0, null, null, '', 1, null, '2019-12-24 16:23:19', null, '2019-12-24 16:23:19'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (2, '编辑文章', '/blog/article/edit', 1, 0, null, null, '', 1, null, '2019-12-24 17:31:55', null, '2019-12-24 17:31:55'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (3, '用户列表', '/auth/user/list', 8, 0, null, null, '', 1, null, '2019-12-31 13:40:22', null, '2019-12-31 13:40:22'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (4, '分配角色', '/auth/user/assign/role', 8, 0, null, null, '', 1, null, '2019-12-31 13:41:49', null, '2019-12-31 13:41:49'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (5, '用户编辑', '/auth/user/update', 8, 0, null, null, '', 1, null, '2019-12-31 13:43:09', null, '2019-12-31 13:43:09'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (6, '添加用户', '/auth/user/add', 8, 0, null, null, '', 1, null, '2019-12-31 13:49:13', null, '2019-12-31 13:49:13'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (7, '添加页面分组', '/auth/menu/addPageGroup', 9, 0, null, null, '', 1, null, '2020-01-06 15:15:10', null, '2020-01-06 15:15:10'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (8, '添加页面', '/auth/menu/addPage', 9, 0, null, null, '', 1, null, '2020-01-06 15:16:30', null, '2020-01-06 15:16:30'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (9, '添加功能', '/auth/menu/addItem', 9, 0, null, null, '', 1, null, '2020-01-06 15:17:09', null, '2020-01-06 15:17:09'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (10, '编辑', '/auth/menu/edit', 9, 0, null, null, '', 1, null, '2020-01-06 15:19:45', null, '2020-01-06 15:19:45'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (11, '删除文章', '/blog/article/delete', 1, 0, null, null, '', 1, null, '2020-01-06 15:26:21', null, '2020-01-06 15:26:21'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (12, '删除评论', '/blog/comment/delete', 2, 0, null, null, '', 1, null, '2020-01-06 15:29:51', null, '2020-01-06 15:29:51'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (13, '删除标签', '/blog/tag/delete', 3, 0, null, null, '', 1, null, '2020-01-06 15:31:29', null, '2020-01-06 15:31:29'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (14, '保存标签', '/blog/tag/save', 3, 0, null, null, '', 1, null, '2020-01-06 15:31:59', null, '2020-01-06 15:31:59'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (15, '新建页面', '/blog/page/new', 4, 0, null, null, '', 1, null, '2020-01-06 15:34:11', null, '2020-01-06 15:34:11'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (16, '编辑页面', '/blog/page/update', 4, 0, null, null, '', 1, null, '2020-01-06 15:34:29', null, '2020-01-06 15:34:29'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (17, '删除页面', '/blog/page/delete', 4, 0, null, null, '', 1, null, '2020-01-06 15:34:47', null, '2020-01-06 15:34:47'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (18, '保存设置', '/blog/setting/save', 5, 0, null, null, '', 1, null, '2020-01-06 15:43:35', null, '2020-01-06 15:43:35'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (19, '邮箱设置', '/blog/setting/mailInfo', 5, 0, null, null, '', 1, null, '2020-01-06 15:46:42', null, '2020-01-06 15:46:42'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (20, '上传', '/tool/media/upload', 7, 0, null, null, '', 1, null, '2020-01-06 15:52:47', null, '2020-01-06 15:52:47'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (21, '菜单列表', '/auth/menu/list', 9, 0, null, null, '', 1, null, '2020-01-06 17:58:38', null, '2020-01-06 17:58:38'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (22, '添加API', '/auth/api/add', 11, 0, null, null, '', 1, null, '2020-01-06 18:23:36', null, '2020-01-06 18:23:36'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (23, 'API 列表', '/auth/api/list', 11, 0, null, null, '', 1, null, '2020-01-06 18:56:58', null, '2020-01-06 18:56:58'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (24, '列表', '/auth/role/list', 12, 0, null, null, '', 1, null, '2020-01-07 21:28:46', null, '2020-01-07 21:28:46'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (25, '新增角色', '/auth/role/list/add', 12, 0, null, null, '', 1, null, '2020-01-07 21:35:06', null, '2020-01-07 21:35:06'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (26, '角色编辑', '/auth/role/update', 12, 0, null, null, '', 1, null, '2020-01-07 21:35:43', null, '2020-01-07 21:35:43'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (27, '分配API', '/auth/role/assign_api', 12, 0, null, null, '', 1, null, '2020-01-07 21:36:36', null, '2020-01-07 21:36:36'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (28, '分配内容', '/auth/role/assign_content', 12, 0, null, null, '', 1, null, '2020-01-07 21:37:15', null, '2020-01-07 21:37:15'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (29, '分配用户', '/auth/role/assign_user', 12, 0, null, null, '', 1, null, '2020-01-07 21:40:38', null, '2020-01-07 21:40:38'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (30, '分配操作项', '/auth/role/assign_item', 12, 0, null, null, '', 1, null, '2020-01-07 21:41:23', null, '2020-01-07 21:41:23'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (31, '查看操作项', '/auth/role/show_item', 12, 0, null, null, '', 1, null, '2020-01-07 21:42:30', null, '2020-01-07 21:42:30'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (32, '新增内容', '/auth/conent/add', 13, 0, null, null, '', 1, null, '2020-01-07 22:11:01', null, '2020-01-07 22:11:01'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (33, '更新内容', '/auth/content/update', 13, 0, null, null, '', 1, null, '2020-01-07 22:14:42', null, '2020-01-07 22:14:42'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (34, '编辑 API', '/auth/api/update', 11, 0, null, null, '', 1, null, '2020-01-07 22:17:48', null, '2020-01-07 22:17:48'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (35, '媒体列表', '/tool/media/list', 7, 0, null, null, '', 1, null, '2020-01-07 22:19:56', null, '2020-01-07 22:19:56'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (36, '删除媒体', '/tool/media/delete', 7, 0, null, null, '', 1, null, '2020-01-07 22:30:23', null, '2020-01-07 22:30:23'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (37, '所有权限', '/tool/snippet', 6, 0, null, null, '', 1, null, '2020-01-07 22:37:20', null, '2020-01-07 22:37:20'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (38, '列表', '/blog/page/list', 4, 0, null, null, '', 1, null, '2020-01-07 22:46:12', null, '2020-01-07 22:46:12'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (39, '列表', '/blog/comment/list', 2, 0, null, null, '', 1, null, '2020-01-07 22:48:43', null, '2020-01-07 22:48:43'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (40, '列表', '/blog/article/list', 1, 0, null, null, '', 1, null, '2020-01-07 22:50:44', null, '2020-01-07 22:50:44'); -INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, status, creator, create_time, modifier, modify_time) VALUES (41, '列表', '/blog/setting/list', 5, 0, null, null, '', 1, null, '2020-01-09 18:41:22', null, '2020-01-09 18:41:22');INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (2, 1, 1, 1, null, '2019-12-26 16:58:28', null, '2019-12-26 16:58:28'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (4, 4, 5, 1, null, '2019-12-31 13:56:51', null, '2019-12-31 13:56:51'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (5, 4, 32, 1, null, '2019-12-31 13:56:51', null, '2019-12-31 13:56:51'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (6, 4, 33, 1, null, '2019-12-31 13:56:51', null, '2019-12-31 13:56:51'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (7, 4, 27, 1, null, '2019-12-31 13:56:51', null, '2019-12-31 13:56:51'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (8, 5, 3, 1, null, '2019-12-31 13:57:28', null, '2019-12-31 13:57:28'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (9, 5, 2, 1, null, '2019-12-31 13:57:28', null, '2019-12-31 13:57:28'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (10, 6, 4, 1, null, '2019-12-31 13:58:32', null, '2019-12-31 13:58:32'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (12, 10, 34, 1, null, '2020-01-06 18:04:27', null, '2020-01-06 18:04:27'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (13, 10, 11, 1, null, '2020-01-06 18:04:28', null, '2020-01-06 18:04:28'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (15, 22, 63, 1, null, '2020-01-06 18:25:20', null, '2020-01-06 18:25:20'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (17, 21, 63, 1, null, '2020-01-06 18:50:39', null, '2020-01-06 18:50:39'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (18, 21, 59, 1, null, '2020-01-06 18:50:39', null, '2020-01-06 18:50:39'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (19, 21, 54, 1, null, '2020-01-06 18:50:39', null, '2020-01-06 18:50:39'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (20, 3, 72, 1, null, '2020-01-06 18:53:32', null, '2020-01-06 18:53:32'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (21, 3, 77, 1, null, '2020-01-06 18:53:32', null, '2020-01-06 18:53:32'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (22, 23, 43, 1, null, '2020-01-06 18:58:49', null, '2020-01-06 18:58:49'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (24, 24, 50, 1, null, '2020-01-07 21:30:29', null, '2020-01-07 21:30:29'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (25, 24, 78, 1, null, '2020-01-07 21:30:29', null, '2020-01-07 21:30:29'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (26, 35, 83, 1, null, '2020-01-07 22:20:18', null, '2020-01-07 22:20:18'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (29, 37, 90, 1, null, '2020-01-07 22:41:16', null, '2020-01-07 22:41:16'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (30, 37, 89, 1, null, '2020-01-07 22:41:16', null, '2020-01-07 22:41:16'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (31, 37, 85, 1, null, '2020-01-07 22:41:16', null, '2020-01-07 22:41:16'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (32, 38, 88, 1, null, '2020-01-07 22:46:32', null, '2020-01-07 22:46:32'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (33, 39, 81, 1, null, '2020-01-07 22:49:13', null, '2020-01-07 22:49:13'); -INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, status, creator, create_time, modifier, modify_time) VALUES (34, 40, 39, 1, null, '2020-01-07 22:51:07', null, '2020-01-07 22:51:07');INSERT INTO dice.auth_rel_role_item (id, role_id, item_id, status, creator, create_time, modifier, modify_time) VALUES (260, 2, 40, 1, null, '2020-01-09 19:00:49', null, '2020-01-09 19:00:49'); -INSERT INTO dice.auth_rel_role_item (id, role_id, item_id, status, creator, create_time, modifier, modify_time) VALUES (261, 2, 38, 1, null, '2020-01-09 19:00:49', null, '2020-01-09 19:00:49'); -INSERT INTO dice.auth_rel_role_item (id, role_id, item_id, status, creator, create_time, modifier, modify_time) VALUES (262, 2, 39, 1, null, '2020-01-09 19:00:49', null, '2020-01-09 19:00:49'); -INSERT INTO dice.auth_rel_role_item (id, role_id, item_id, status, creator, create_time, modifier, modify_time) VALUES (263, 2, 35, 1, null, '2020-01-09 19:00:49', null, '2020-01-09 19:00:49'); -INSERT INTO dice.auth_rel_role_item (id, role_id, item_id, status, creator, create_time, modifier, modify_time) VALUES (265, 2, 37, 1, null, '2020-01-09 19:00:49', null, '2020-01-09 19:00:49'); -INSERT INTO dice.auth_rel_role_item (id, role_id, item_id, status, creator, create_time, modifier, modify_time) VALUES (266, 2, 3, 1, null, '2020-01-09 19:00:49', null, '2020-01-09 19:00:49'); -INSERT INTO dice.auth_rel_role_item (id, role_id, item_id, status, creator, create_time, modifier, modify_time) VALUES (267, 2, 21, 1, null, '2020-01-09 19:00:49', null, '2020-01-09 19:00:49'); -INSERT INTO dice.auth_rel_role_item (id, role_id, item_id, status, creator, create_time, modifier, modify_time) VALUES (268, 2, 31, 1, null, '2020-01-09 19:00:49', null, '2020-01-09 19:00:49'); -INSERT INTO dice.auth_rel_role_item (id, role_id, item_id, status, creator, create_time, modifier, modify_time) VALUES (269, 2, 24, 1, null, '2020-01-09 19:00:49', null, '2020-01-09 19:00:49'); -INSERT INTO dice.auth_rel_role_item (id, role_id, item_id, status, creator, create_time, modifier, modify_time) VALUES (270, 2, 23, 1, null, '2020-01-09 19:00:49', null, '2020-01-09 19:00:49');INSERT INTO dice.auth_rel_role_user (id, user_id, role_id, status, creator, create_time, modifier, modify_time) VALUES (1, 1, 1, 1, null, '2019-12-31 13:33:31', null, '2019-12-31 13:33:31'); -INSERT INTO dice.auth_rel_role_user (id, user_id, role_id, status, creator, create_time, modifier, modify_time) VALUES (3, 2, 2, 1, null, '2019-12-31 14:01:08', null, '2019-12-31 14:01:08');INSERT INTO dice.auth_role (role_id, role_name, user_type, role_type, project_type, description, status, creator, create_time, modifier, modify_time) VALUES (1, '管理员', 1, 1, 'dice', '', 1, null, '2019-12-30 16:02:14', null, '2019-12-30 16:02:14'); -INSERT INTO dice.auth_role (role_id, role_name, user_type, role_type, project_type, description, status, creator, create_time, modifier, modify_time) VALUES (2, 'Demo 用户', 1, 2, 'dice', '', 1, null, '2019-12-30 18:48:44', null, '2019-12-30 18:48:44');INSERT INTO dice.dim_project (id, type, type_name, is_display, style, domain) VALUES (1, 'dice', 'Dice', 1, null, null); +INSERT INTO dice.dim_project (id, type, type_name, is_display, style, domain) VALUES (1, 'dice', 'Dice', 1, null, null); + +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (39, '', '/v1/api/admin/article', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (40, '', '/v1/api/admin/article/count', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (41, '', '/v1/api/admin/auth/api/add', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (42, '', '/v1/api/admin/auth/api/get', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (43, '', '/v1/api/admin/auth/api/list', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (44, '', '/v1/api/admin/auth/api/update', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (45, '', '/v1/api/admin/auth/classes/add', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (46, '', '/v1/api/admin/auth/classes/get', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (47, '', '/v1/api/admin/auth/classes/update', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (48, '', '/v1/api/admin/auth/content/add', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (49, '', '/v1/api/admin/auth/content/get', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (50, '', '/v1/api/admin/auth/content/list', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (51, '', '/v1/api/admin/auth/content/update', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (52, '', '/v1/api/admin/auth/group/add', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (53, '', '/v1/api/admin/auth/group/get', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (54, '', '/v1/api/admin/auth/group/list', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (55, '', '/v1/api/admin/auth/group/update', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (56, '', '/v1/api/admin/auth/item/add', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (57, '', '/v1/api/admin/auth/item/assign/api', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (58, '', '/v1/api/admin/auth/item/get', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (59, '', '/v1/api/admin/auth/item/list', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (60, '', '/v1/api/admin/auth/item/update', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (61, '', '/v1/api/admin/auth/login', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (62, '', '/v1/api/admin/auth/logout', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (63, '', '/v1/api/admin/auth/project/project_list', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (64, '', '/v1/api/admin/auth/reset/password', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (65, '', '/v1/api/admin/auth/reset/user', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (66, '', '/v1/api/admin/auth/role/add', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (67, '', '/v1/api/admin/auth/role/assign/api', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (68, '', '/v1/api/admin/auth/role/assign/content', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (69, '', '/v1/api/admin/auth/role/assign/item', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (70, '', '/v1/api/admin/auth/role/assign/user', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (71, '', '/v1/api/admin/auth/role/get', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (72, '', '/v1/api/admin/auth/role/list', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (73, '', '/v1/api/admin/auth/role/update', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (74, '', '/v1/api/admin/auth/user/add', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (75, '', '/v1/api/admin/auth/user/assign/role', 'dice', 0, null, '2020-01-06 18:24:42', null, '2020-01-06 18:24:42'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (76, '', '/v1/api/admin/auth/user/get', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (77, '', '/v1/api/admin/auth/user/list', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (78, '', '/v1/api/admin/auth/user/list/all', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (79, '', '/v1/api/admin/auth/user/update', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (80, '', '/v1/api/admin/auth/user_info', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (81, '', '/v1/api/admin/comment', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (82, '', '/v1/api/admin/comment/count', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (83, '', '/v1/api/admin/media', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (84, '', '/v1/api/admin/media/upload', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (85, '', '/v1/api/admin/meta', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (86, '', '/v1/api/admin/option/all', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (87, '', '/v1/api/admin/option/save', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (88, '', '/v1/api/admin/page', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (89, '', '/v1/api/admin/snippet', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (90, '', '/v1/api/admin/snippet/snippet_title', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (91, '', '/v1/api/archive', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (92, '', '/v1/api/article', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (93, '', '/v1/api/category', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (94, '', '/v1/api/comment', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (95, '', '/v1/api/comment/assess', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (96, '', '/v1/api/option', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (97, '', '/v1/api/page', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43'); +INSERT INTO dice.auth_api (api_id, api_type, api_path, project_type, deleted, creator, create_time, modifier, modify_time) VALUES (98, '', '/v1/api/tag', 'dice', 0, null, '2020-01-06 18:24:43', null, '2020-01-06 18:24:43');INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, deleted, creator, create_time, modifier, modify_time) VALUES (1, '文章列表', '/blog/article', 1, 0, 1, '', 0, null, '2019-12-24 15:13:20', null, '2019-12-24 15:13:20'); +INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, deleted, creator, create_time, modifier, modify_time) VALUES (2, '评论列表', '/blog/comment', 1, 0, 1, '', 0, null, '2019-12-24 15:48:57', null, '2019-12-24 15:48:57'); +INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, deleted, creator, create_time, modifier, modify_time) VALUES (3, '标签分类', '/blog/tag', 1, 0, 1, '', 0, null, '2019-12-24 15:49:06', null, '2019-12-24 15:49:06'); +INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, deleted, creator, create_time, modifier, modify_time) VALUES (4, '页面列表', '/blog/page', 1, 0, 1, '', 0, null, '2019-12-24 15:49:15', null, '2019-12-24 15:49:15'); +INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, deleted, creator, create_time, modifier, modify_time) VALUES (5, '网站设置', '/blog/setting', 1, 0, 1, '', 0, null, '2019-12-24 15:49:24', null, '2019-12-24 15:49:24'); +INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, deleted, creator, create_time, modifier, modify_time) VALUES (6, '代码段', '/snippet/index', 2, 0, 1, '', 0, null, '2019-12-24 15:52:39', null, '2019-12-24 15:52:39'); +INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, deleted, creator, create_time, modifier, modify_time) VALUES (7, '媒体库', '/media-library/index', 2, 0, 1, '', 0, null, '2019-12-24 15:54:28', null, '2019-12-24 15:54:28'); +INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, deleted, creator, create_time, modifier, modify_time) VALUES (8, '用户列表', '/auth/user/list', 4, 0, 1, '', 0, null, '2019-12-24 15:55:44', null, '2019-12-24 15:55:44'); +INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, deleted, creator, create_time, modifier, modify_time) VALUES (9, '菜单管理', '/auth/menu/list', 4, 0, 1, '', 0, null, '2019-12-24 15:56:23', null, '2019-12-24 15:56:23'); +INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, deleted, creator, create_time, modifier, modify_time) VALUES (11, 'API管理', '', 4, 0, 1, '', 0, null, '2020-01-06 18:22:48', null, '2020-01-06 18:22:48'); +INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, deleted, creator, create_time, modifier, modify_time) VALUES (12, '角色管理', '', 4, 0, 1, '', 0, null, '2020-01-07 21:21:23', null, '2020-01-07 21:21:23'); +INSERT INTO dice.auth_classes (classes_id, classes_name, classes_url, group_id, `order`, is_display, style, deleted, creator, create_time, modifier, modify_time) VALUES (13, '内容管理', '', 4, 0, 1, '', 0, null, '2020-01-07 22:10:50', null, '2020-01-07 22:10:50');INSERT INTO dice.auth_group (group_id, group_name, group_url, project_type, `order`, is_display, style, deleted, creator, create_time, modifier, modify_time) VALUES (1, '博客', '', 'dice', 0, 1, '', 0, null, '2019-12-23 17:56:50', null, '2019-12-23 17:56:50'); +INSERT INTO dice.auth_group (group_id, group_name, group_url, project_type, `order`, is_display, style, deleted, creator, create_time, modifier, modify_time) VALUES (2, '工具', '', 'dice', 0, 1, '', 0, null, '2019-12-23 18:08:01', null, '2019-12-23 18:08:01'); +INSERT INTO dice.auth_group (group_id, group_name, group_url, project_type, `order`, is_display, style, deleted, creator, create_time, modifier, modify_time) VALUES (4, '权限', '', 'dice', 0, 1, '', 0, null, '2019-12-23 18:25:39', null, '2019-12-23 18:25:39');INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (1, '新增文章', '/blog/article/new', 1, 0, null, null, '', 0, null, '2019-12-24 16:23:19', null, '2019-12-24 16:23:19'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (2, '编辑文章', '/blog/article/edit', 1, 0, null, null, '', 0, null, '2019-12-24 17:31:55', null, '2019-12-24 17:31:55'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (3, '用户列表', '/auth/user/list', 8, 0, null, null, '', 0, null, '2019-12-31 13:40:22', null, '2019-12-31 13:40:22'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (4, '分配角色', '/auth/user/assign/role', 8, 0, null, null, '', 0, null, '2019-12-31 13:41:49', null, '2019-12-31 13:41:49'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (5, '用户编辑', '/auth/user/update', 8, 0, null, null, '', 0, null, '2019-12-31 13:43:09', null, '2019-12-31 13:43:09'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (6, '添加用户', '/auth/user/add', 8, 0, null, null, '', 0, null, '2019-12-31 13:49:13', null, '2019-12-31 13:49:13'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (7, '添加页面分组', '/auth/menu/addPageGroup', 9, 0, null, null, '', 0, null, '2020-01-06 15:15:10', null, '2020-01-06 15:15:10'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (8, '添加页面', '/auth/menu/addPage', 9, 0, null, null, '', 0, null, '2020-01-06 15:16:30', null, '2020-01-06 15:16:30'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (9, '添加功能', '/auth/menu/addItem', 9, 0, null, null, '', 0, null, '2020-01-06 15:17:09', null, '2020-01-06 15:17:09'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (10, '编辑', '/auth/menu/edit', 9, 0, null, null, '', 0, null, '2020-01-06 15:19:45', null, '2020-01-06 15:19:45'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (11, '删除文章', '/blog/article/delete', 1, 0, null, null, '', 0, null, '2020-01-06 15:26:21', null, '2020-01-06 15:26:21'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (12, '删除评论', '/blog/comment/delete', 2, 0, null, null, '', 0, null, '2020-01-06 15:29:51', null, '2020-01-06 15:29:51'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (13, '删除标签', '/blog/tag/delete', 3, 0, null, null, '', 0, null, '2020-01-06 15:31:29', null, '2020-01-06 15:31:29'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (14, '保存标签', '/blog/tag/save', 3, 0, null, null, '', 0, null, '2020-01-06 15:31:59', null, '2020-01-06 15:31:59'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (15, '新建页面', '/blog/page/new', 4, 0, null, null, '', 0, null, '2020-01-06 15:34:11', null, '2020-01-06 15:34:11'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (16, '编辑页面', '/blog/page/update', 4, 0, null, null, '', 0, null, '2020-01-06 15:34:29', null, '2020-01-06 15:34:29'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (17, '删除页面', '/blog/page/delete', 4, 0, null, null, '', 0, null, '2020-01-06 15:34:47', null, '2020-01-06 15:34:47'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (18, '保存设置', '/blog/setting/save', 5, 0, null, null, '', 0, null, '2020-01-06 15:43:35', null, '2020-01-06 15:43:35'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (19, '邮箱设置', '/blog/setting/mailInfo', 5, 0, null, null, '', 0, null, '2020-01-06 15:46:42', null, '2020-01-06 15:46:42'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (20, '上传', '/tool/media/upload', 7, 0, null, null, '', 0, null, '2020-01-06 15:52:47', null, '2020-01-06 15:52:47'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (21, '菜单列表', '/auth/menu/list', 9, 0, null, null, '', 0, null, '2020-01-06 17:58:38', null, '2020-01-06 17:58:38'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (22, '添加API', '/auth/api/add', 11, 0, null, null, '', 0, null, '2020-01-06 18:23:36', null, '2020-01-06 18:23:36'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (23, 'API 列表', '/auth/api/list', 11, 0, null, null, '', 0, null, '2020-01-06 18:56:58', null, '2020-01-06 18:56:58'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (24, '列表', '/auth/role/list', 12, 0, null, null, '', 0, null, '2020-01-07 21:28:46', null, '2020-01-07 21:28:46'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (25, '新增角色', '/auth/role/list/add', 12, 0, null, null, '', 0, null, '2020-01-07 21:35:06', null, '2020-01-07 21:35:06'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (26, '角色编辑', '/auth/role/update', 12, 0, null, null, '', 0, null, '2020-01-07 21:35:43', null, '2020-01-07 21:35:43'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (27, '分配API', '/auth/role/assign_api', 12, 0, null, null, '', 0, null, '2020-01-07 21:36:36', null, '2020-01-07 21:36:36'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (28, '分配内容', '/auth/role/assign_content', 12, 0, null, null, '', 0, null, '2020-01-07 21:37:15', null, '2020-01-07 21:37:15'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (29, '分配用户', '/auth/role/assign_user', 12, 0, null, null, '', 0, null, '2020-01-07 21:40:38', null, '2020-01-07 21:40:38'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (30, '分配操作项', '/auth/role/assign_item', 12, 0, null, null, '', 0, null, '2020-01-07 21:41:23', null, '2020-01-07 21:41:23'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (31, '查看操作项', '/auth/role/show_item', 12, 0, null, null, '', 0, null, '2020-01-07 21:42:30', null, '2020-01-07 21:42:30'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (32, '新增内容', '/auth/conent/add', 13, 0, null, null, '', 0, null, '2020-01-07 22:11:01', null, '2020-01-07 22:11:01'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (33, '更新内容', '/auth/content/update', 13, 0, null, null, '', 0, null, '2020-01-07 22:14:42', null, '2020-01-07 22:14:42'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (34, '编辑 API', '/auth/api/update', 11, 0, null, null, '', 0, null, '2020-01-07 22:17:48', null, '2020-01-07 22:17:48'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (35, '媒体列表', '/tool/media/list', 7, 0, null, null, '', 0, null, '2020-01-07 22:19:56', null, '2020-01-07 22:19:56'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (36, '删除媒体', '/tool/media/delete', 7, 0, null, null, '', 0, null, '2020-01-07 22:30:23', null, '2020-01-07 22:30:23'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (37, '所有权限', '/tool/snippet', 6, 0, null, null, '', 0, null, '2020-01-07 22:37:20', null, '2020-01-07 22:37:20'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (38, '列表', '/blog/page/list', 4, 0, null, null, '', 0, null, '2020-01-07 22:46:12', null, '2020-01-07 22:46:12'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (39, '列表', '/blog/comment/list', 2, 0, null, null, '', 0, null, '2020-01-07 22:48:43', null, '2020-01-07 22:48:43'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (40, '列表', '/blog/article/list', 1, 0, null, null, '', 0, null, '2020-01-07 22:50:44', null, '2020-01-07 22:50:44'); +INSERT INTO dice.auth_item (item_id, item_name, item_code, classes_id, `order`, style, auto_flag, outer_url, deleted, creator, create_time, modifier, modify_time) VALUES (41, '列表', '/blog/setting/list', 5, 0, null, null, '', 0, null, '2020-01-09 18:41:22', null, '2020-01-09 18:41:22');INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (2, 1, 1, 0, null, '2019-12-26 16:58:28', null, '2019-12-26 16:58:28'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (4, 4, 5, 0, null, '2019-12-31 13:56:51', null, '2019-12-31 13:56:51'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (5, 4, 32, 0, null, '2019-12-31 13:56:51', null, '2019-12-31 13:56:51'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (6, 4, 33, 0, null, '2019-12-31 13:56:51', null, '2019-12-31 13:56:51'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (7, 4, 27, 0, null, '2019-12-31 13:56:51', null, '2019-12-31 13:56:51'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (8, 5, 3, 0, null, '2019-12-31 13:57:28', null, '2019-12-31 13:57:28'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (9, 5, 2, 0, null, '2019-12-31 13:57:28', null, '2019-12-31 13:57:28'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (10, 6, 4, 0, null, '2019-12-31 13:58:32', null, '2019-12-31 13:58:32'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (12, 10, 34, 0, null, '2020-01-06 18:04:27', null, '2020-01-06 18:04:27'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (13, 10, 11, 0, null, '2020-01-06 18:04:28', null, '2020-01-06 18:04:28'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (15, 22, 63, 0, null, '2020-01-06 18:25:20', null, '2020-01-06 18:25:20'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (17, 21, 63, 0, null, '2020-01-06 18:50:39', null, '2020-01-06 18:50:39'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (18, 21, 59, 0, null, '2020-01-06 18:50:39', null, '2020-01-06 18:50:39'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (19, 21, 54, 0, null, '2020-01-06 18:50:39', null, '2020-01-06 18:50:39'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (20, 3, 72, 0, null, '2020-01-06 18:53:32', null, '2020-01-06 18:53:32'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (21, 3, 77, 0, null, '2020-01-06 18:53:32', null, '2020-01-06 18:53:32'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (22, 23, 43, 0, null, '2020-01-06 18:58:49', null, '2020-01-06 18:58:49'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (26, 35, 83, 0, null, '2020-01-07 22:20:18', null, '2020-01-07 22:20:18'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (29, 37, 90, 0, null, '2020-01-07 22:41:16', null, '2020-01-07 22:41:16'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (30, 37, 89, 0, null, '2020-01-07 22:41:16', null, '2020-01-07 22:41:16'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (31, 37, 85, 0, null, '2020-01-07 22:41:16', null, '2020-01-07 22:41:16'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (32, 38, 88, 0, null, '2020-01-07 22:46:32', null, '2020-01-07 22:46:32'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (33, 39, 81, 0, null, '2020-01-07 22:49:13', null, '2020-01-07 22:49:13'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (35, 24, 78, 0, null, '2020-01-27 18:05:52', null, '2020-01-27 18:05:52'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (36, 24, 50, 0, null, '2020-01-27 18:05:52', null, '2020-01-27 18:05:52'); +INSERT INTO dice.auth_rel_item_api (id, item_id, api_id, deleted, creator, create_time, modifier, modify_time) VALUES (37, 40, 39, 0, null, '2020-01-27 18:06:38', null, '2020-01-27 18:06:38');INSERT INTO dice.auth_rel_role_item (id, role_id, item_id, deleted, creator, create_time, modifier, modify_time) VALUES (293, 2, 40, 0, null, '2020-01-27 18:49:55', null, '2020-01-27 18:49:55'); +INSERT INTO dice.auth_rel_role_item (id, role_id, item_id, deleted, creator, create_time, modifier, modify_time) VALUES (294, 2, 38, 0, null, '2020-01-27 18:49:55', null, '2020-01-27 18:49:55'); +INSERT INTO dice.auth_rel_role_item (id, role_id, item_id, deleted, creator, create_time, modifier, modify_time) VALUES (295, 2, 39, 0, null, '2020-01-27 18:49:55', null, '2020-01-27 18:49:55'); +INSERT INTO dice.auth_rel_role_item (id, role_id, item_id, deleted, creator, create_time, modifier, modify_time) VALUES (296, 2, 35, 0, null, '2020-01-27 18:49:55', null, '2020-01-27 18:49:55'); +INSERT INTO dice.auth_rel_role_item (id, role_id, item_id, deleted, creator, create_time, modifier, modify_time) VALUES (297, 2, 6, 0, null, '2020-01-27 18:49:55', null, '2020-01-27 18:49:55'); +INSERT INTO dice.auth_rel_role_item (id, role_id, item_id, deleted, creator, create_time, modifier, modify_time) VALUES (298, 2, 37, 0, null, '2020-01-27 18:49:55', null, '2020-01-27 18:49:55'); +INSERT INTO dice.auth_rel_role_item (id, role_id, item_id, deleted, creator, create_time, modifier, modify_time) VALUES (299, 2, 3, 0, null, '2020-01-27 18:49:55', null, '2020-01-27 18:49:55'); +INSERT INTO dice.auth_rel_role_item (id, role_id, item_id, deleted, creator, create_time, modifier, modify_time) VALUES (300, 2, 6, 0, null, '2020-01-27 18:49:55', null, '2020-01-27 18:49:55'); +INSERT INTO dice.auth_rel_role_item (id, role_id, item_id, deleted, creator, create_time, modifier, modify_time) VALUES (301, 2, 21, 0, null, '2020-01-27 18:49:55', null, '2020-01-27 18:49:55'); +INSERT INTO dice.auth_rel_role_item (id, role_id, item_id, deleted, creator, create_time, modifier, modify_time) VALUES (302, 2, 31, 0, null, '2020-01-27 18:49:55', null, '2020-01-27 18:49:55'); +INSERT INTO dice.auth_rel_role_item (id, role_id, item_id, deleted, creator, create_time, modifier, modify_time) VALUES (303, 2, 24, 0, null, '2020-01-27 18:49:55', null, '2020-01-27 18:49:55'); +INSERT INTO dice.auth_rel_role_item (id, role_id, item_id, deleted, creator, create_time, modifier, modify_time) VALUES (304, 2, 23, 0, null, '2020-01-27 18:49:55', null, '2020-01-27 18:49:55');INSERT INTO dice.auth_rel_role_user (id, user_id, role_id, deleted, creator, create_time, modifier, modify_time) VALUES (1, 1, 1, 0, null, '2019-12-31 13:33:31', null, '2019-12-31 13:33:31'); +INSERT INTO dice.auth_rel_role_user (id, user_id, role_id, deleted, creator, create_time, modifier, modify_time) VALUES (10, 2, 2, 0, null, '2020-01-27 18:59:31', null, '2020-01-27 18:59:31');INSERT INTO dice.auth_role (role_id, role_name, user_type, role_type, project_type, description, deleted, creator, create_time, modifier, modify_time) VALUES (1, '管理员', 1, 1, 'dice', '', 0, null, '2019-12-30 16:02:14', null, '2019-12-30 16:02:14'); +INSERT INTO dice.auth_role (role_id, role_name, user_type, role_type, project_type, description, deleted, creator, create_time, modifier, modify_time) VALUES (2, 'Demo 用户', 1, 2, 'dice', '', 0, null, '2019-12-30 18:48:44', null, '2019-12-30 18:48:44'); diff --git a/dice-server/src/main/resources/mapper/AuthApiMapper.xml b/dice-server/src/main/resources/mapper/AuthApiMapper.xml index 6b718e19..067d3d8d 100644 --- a/dice-server/src/main/resources/mapper/AuthApiMapper.xml +++ b/dice-server/src/main/resources/mapper/AuthApiMapper.xml @@ -8,7 +8,7 @@ - + @@ -21,11 +21,11 @@ SELECT t.* FROM auth_api t - t.status = 1 + t.deleted = 0 AND (t.api_path like concat("%",#{queryParam.criteria},"%")) AND t.project_type = #{queryParam.projectType} - AND t.api_id in (select distinct api_id from auth_rel_role_api where role_id=#{queryParam.roleId} and status=1) - AND t.api_id in (select distinct api_id from auth_rel_item_api where item_id=#{queryParam.itemId} and status=1) + AND t.api_id in (select distinct api_id from auth_rel_role_api where role_id=#{queryParam.roleId} and deleted=0) + AND t.api_id in (select distinct api_id from auth_rel_item_api where item_id=#{queryParam.itemId} and deleted=0) ORDER BY t.api_id desc diff --git a/dice-server/src/main/resources/mapper/AuthClassesMapper.xml b/dice-server/src/main/resources/mapper/AuthClassesMapper.xml index 86eb2e88..7505612b 100644 --- a/dice-server/src/main/resources/mapper/AuthClassesMapper.xml +++ b/dice-server/src/main/resources/mapper/AuthClassesMapper.xml @@ -10,7 +10,7 @@ - + @@ -32,8 +32,8 @@ select t.classes_id,t.classes_name,t.classes_url,t.group_id,t.order,t.is_display,t.style ,t1.classes_id i_classes_id,t1.item_id i_item_id,t1.item_name i_item_name,t1.item_code i_item_code,t1.auto_flag i_auto_flag,t1.outer_url i_outer_url from auth_classes t - left join auth_item t1 on t.classes_id=t1.classes_id and t1.status=1 - where t.status=1 and t.group_id = #{groupId} + left join auth_item t1 on t.classes_id=t1.classes_id and t1.deleted=0 + where t.deleted=0 and t.group_id = #{groupId} order by t.order,t1.order diff --git a/dice-server/src/main/resources/mapper/AuthContentMapper.xml b/dice-server/src/main/resources/mapper/AuthContentMapper.xml index 00729dbf..0b9c2d3e 100644 --- a/dice-server/src/main/resources/mapper/AuthContentMapper.xml +++ b/dice-server/src/main/resources/mapper/AuthContentMapper.xml @@ -9,7 +9,7 @@ - + @@ -21,10 +21,10 @@ SELECT t.* FROM auth_content t - t.status = 1 + t.deleted = 0 AND (t.content_name like concat("%",#{queryParam.criteria},"%")) AND t.project_type = #{queryParam.projectType} - AND t.id in (select distinct content_id from auth_rel_role_content where role_id=#{queryParam.roleId} and status=1) + AND t.id in (select distinct content_id from auth_rel_role_content where role_id=#{queryParam.roleId} and deleted=0) ORDER BY t.id desc diff --git a/dice-server/src/main/resources/mapper/AuthGroupMapper.xml b/dice-server/src/main/resources/mapper/AuthGroupMapper.xml index c4d42e5b..a42f66c2 100644 --- a/dice-server/src/main/resources/mapper/AuthGroupMapper.xml +++ b/dice-server/src/main/resources/mapper/AuthGroupMapper.xml @@ -10,7 +10,7 @@ SELECT t.* FROM auth_group t - t.status = 1 + t.deleted = 0 AND (t.group_name like concat("%",#{criteria},"%")) AND t.project_type = #{projectType} diff --git a/dice-server/src/main/resources/mapper/AuthItemMapper.xml b/dice-server/src/main/resources/mapper/AuthItemMapper.xml index 247925bc..3495e210 100644 --- a/dice-server/src/main/resources/mapper/AuthItemMapper.xml +++ b/dice-server/src/main/resources/mapper/AuthItemMapper.xml @@ -10,13 +10,13 @@ select * from auth_item t - join auth_classes t1 on t.classes_id=t1.classes_id and t1.status=1 - join auth_group t2 on t1.group_id=t2.group_Id and t2.status=1 - where t.status=1 and t2.project_type = #{projectType} + join auth_classes t1 on t.classes_id=t1.classes_id and t1.deleted=0 + join auth_group t2 on t1.group_id=t2.group_Id and t2.deleted=0 + where t.deleted=0 and t2.project_type = #{projectType} - update auth_rel_role_item set status=0 where role_id = #{roleId} + update auth_rel_role_item set deleted=1 where role_id = #{roleId} AND item_id in #{item} diff --git a/dice-server/src/main/resources/mapper/AuthRoleMapper.xml b/dice-server/src/main/resources/mapper/AuthRoleMapper.xml index 0a9915ae..064e7829 100644 --- a/dice-server/src/main/resources/mapper/AuthRoleMapper.xml +++ b/dice-server/src/main/resources/mapper/AuthRoleMapper.xml @@ -12,7 +12,7 @@ - + @@ -23,12 +23,12 @@ diff --git a/dice-server/src/test/java/com/bihell/dice/service/ArticleServiceTests.java b/dice-server/src/test/java/com/bihell/dice/service/ArticleServiceTests.java index 19b6b080..1242b43f 100644 --- a/dice-server/src/test/java/com/bihell/dice/service/ArticleServiceTests.java +++ b/dice-server/src/test/java/com/bihell/dice/service/ArticleServiceTests.java @@ -8,6 +8,8 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; +import java.util.List; + @RunWith(SpringRunner.class) @SpringBootTest public class ArticleServiceTests { @@ -45,4 +47,23 @@ public void saveArticle(){ public void getFrontPage(){ System.out.println(articleService.getFrontPage(6)); } + + @Test + // 查询链式调用 + public void chain(){ + List
articleList = articleService.lambdaQuery().eq(Article::getId,1).list(); + articleList.forEach(System.out::println); + } + + @Test + // 更新链式调用 + public void chainUpdate(){ + articleService.lambdaUpdate().eq(Article::getId,1).set(Article::getId,1).update(); + } + + @Test + // 链式调用删除 + public void chainDelete(){ + articleService.lambdaUpdate().eq(Article::getId,999).remove(); + } }