From 25edb6b5b732ceb2277e9fc9932b25bd9752f811 Mon Sep 17 00:00:00 2001 From: hoteas Date: Fri, 4 Nov 2022 03:22:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/makecode.go | 2 +- example/config/adminDB.json | 614 ++++++++++++++++++------------------ 2 files changed, 308 insertions(+), 308 deletions(-) diff --git a/code/makecode.go b/code/makecode.go index 74d99b1..5f3f10e 100644 --- a/code/makecode.go +++ b/code/makecode.go @@ -908,7 +908,7 @@ func (that *MakeCode) Search(table string, userData Map, data Map, req *http.Req // } // reqValue := req.FormValue(v.GetString("name")) - if reqValue != "" { + if v.GetString("name") != "parent_id" && reqValue != "" { data[table+"."+v.GetString("name")] = reqValue } // diff --git a/example/config/adminDB.json b/example/config/adminDB.json index 2e9c6bb..0f89ba6 100644 --- a/example/config/adminDB.json +++ b/example/config/adminDB.json @@ -74,7 +74,7 @@ "show" ], "icon": "Setting", - "label": "飘窗", + "label": "栏目管理", "menus": [ { "auth": [ @@ -85,8 +85,8 @@ "info", "download" ], - "label": "飘窗", - "table": "swiper_fly" + "label": "栏目管理", + "table": "ctg_copy" }, { "auth": [ @@ -97,8 +97,8 @@ "info", "download" ], - "label": "底部", - "table": "swiper_bottom" + "label": "关联栏目", + "table": "ctg_article" }, { "auth": [ @@ -109,55 +109,31 @@ "info", "download" ], - "label": "关联专题", - "table": "swiper_point" - }, - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "中间", - "table": "swiper_center" - }, - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "顶部", - "table": "swiper_top" - }, - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "外部系统", - "table": "swiper_sys" + "label": "栏目管理", + "table": "ctg" } ], - "name": "sys:swiper" + "name": "sys:ctg" }, { "auth": [ "show" ], "icon": "Setting", - "label": "ebw_news", + "label": "ebw_jobs", "menus": [ + { + "auth": [ + "show", + "add", + "delete", + "edit", + "info", + "download" + ], + "label": "ebw_jobs", + "table": "ebw_jobs" + }, { "auth": [ "show", @@ -170,54 +146,6 @@ "label": "ebw_news", "table": "ebw_news" }, - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "ebw_news_addition_res", - "table": "ebw_news_addition_res" - }, - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "ebw_res", - "table": "ebw_res" - }, - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "ebw_customer", - "table": "ebw_customer" - }, - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "ebw_vote_option", - "table": "ebw_vote_option" - }, { "auth": [ "show", @@ -239,8 +167,44 @@ "info", "download" ], - "label": "ebw_jobs", - "table": "ebw_jobs" + "label": "ebw_items", + "table": "ebw_items" + }, + { + "auth": [ + "show", + "add", + "delete", + "edit", + "info", + "download" + ], + "label": "ebw_res", + "table": "ebw_res" + }, + { + "auth": [ + "show", + "add", + "delete", + "edit", + "info", + "download" + ], + "label": "ebw_vote_option", + "table": "ebw_vote_option" + }, + { + "auth": [ + "show", + "add", + "delete", + "edit", + "info", + "download" + ], + "label": "ebw_news_addition_res", + "table": "ebw_news_addition_res" }, { "auth": [ @@ -275,20 +239,8 @@ "info", "download" ], - "label": "ebw_attachment", - "table": "ebw_attachment" - }, - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "ebw_items", - "table": "ebw_items" + "label": "ebw_customer", + "table": "ebw_customer" }, { "auth": [ @@ -301,6 +253,18 @@ ], "label": "ebw_vote", "table": "ebw_vote" + }, + { + "auth": [ + "show", + "add", + "delete", + "edit", + "info", + "download" + ], + "label": "ebw_attachment", + "table": "ebw_attachment" } ], "name": "sys:ebw" @@ -310,15 +274,19 @@ "show" ], "icon": "Setting", - "label": "系统管理", + "label": "底部", "menus": [ { "auth": [ "show", + "add", + "delete", + "edit", + "info", "download" ], - "label": "日志管理", - "table": "logs" + "label": "底部", + "table": "swiper_bottom" }, { "auth": [ @@ -329,8 +297,8 @@ "info", "download" ], - "label": "人员管理", - "table": "admin" + "label": "顶部", + "table": "swiper_top" }, { "auth": [ @@ -341,8 +309,8 @@ "info", "download" ], - "label": "组织管理", - "table": "org" + "label": "关联专题", + "table": "swiper_point" }, { "auth": [ @@ -353,8 +321,8 @@ "info", "download" ], - "label": "文章管理", - "table": "article" + "label": "中间", + "table": "swiper_center" }, { "auth": [ @@ -365,18 +333,30 @@ "info", "download" ], - "label": "角色管理", - "table": "role" + "label": "外部系统", + "table": "swiper_sys" + }, + { + "auth": [ + "show", + "add", + "delete", + "edit", + "info", + "download" + ], + "label": "飘窗", + "table": "swiper_fly" } ], - "name": "sys" + "name": "sys:swiper" }, { "auth": [ "show" ], "icon": "Setting", - "label": "党委书记信箱", + "label": "总经理信箱", "menus": [ { "auth": [ @@ -387,8 +367,8 @@ "info", "download" ], - "label": "党委书记信箱", - "table": "mail_part" + "label": "总经理信箱", + "table": "mail" }, { "auth": [ @@ -411,8 +391,8 @@ "info", "download" ], - "label": "总经理信箱", - "table": "mail" + "label": "党委书记信箱", + "table": "mail_part" } ], "name": "sys:mail" @@ -422,7 +402,7 @@ "show" ], "icon": "Setting", - "label": "栏目管理", + "label": "系统管理", "menus": [ { "auth": [ @@ -433,8 +413,8 @@ "info", "download" ], - "label": "栏目管理", - "table": "ctg" + "label": "人员管理", + "table": "admin" }, { "auth": [ @@ -445,8 +425,16 @@ "info", "download" ], - "label": "栏目管理", - "table": "ctg_copy" + "label": "文章管理", + "table": "article" + }, + { + "auth": [ + "show", + "download" + ], + "label": "日志管理", + "table": "logs" }, { "auth": [ @@ -457,11 +445,23 @@ "info", "download" ], - "label": "关联栏目", - "table": "ctg_article" + "label": "组织管理", + "table": "org" + }, + { + "auth": [ + "show", + "add", + "delete", + "edit", + "info", + "download" + ], + "label": "角色管理", + "table": "role" } ], - "name": "sys:ctg" + "name": "sys" } ], "name": "admin", @@ -573,14 +573,14 @@ "name": "ID", "value": "id" }, - { - "name": "职位", - "value": "title" - }, { "name": "名称", "value": "name" }, + { + "name": "职位", + "value": "title" + }, { "name": "手机号", "value": "phone" @@ -788,18 +788,22 @@ "name": "无", "value": null }, - { - "name": "描述", - "value": "description" - }, { "name": "id", "value": "id" }, + { + "name": "描述", + "value": "description" + }, { "name": "标题", "value": "title" }, + { + "name": "来源", + "value": "origin" + }, { "name": "正文", "value": "content" @@ -807,10 +811,6 @@ { "name": "编号", "value": "sn" - }, - { - "name": "来源", - "value": "origin" } ], "type": "search", @@ -1016,24 +1016,24 @@ "value": null }, { - "name": "源链接", - "value": "url" - }, - { - "name": "文章", - "value": "article_id" - }, - { - "name": "ID", - "value": "id" + "name": "板块名称", + "value": "name" }, { "name": "编码", "value": "sn" }, { - "name": "板块名称", - "value": "name" + "name": "源链接", + "value": "url" + }, + { + "name": "ID", + "value": "id" + }, + { + "name": "文章", + "value": "article_id" } ], "type": "search", @@ -1047,13 +1047,13 @@ "name": "无", "value": null }, - { - "name": "创建时间", - "value": "create_time" - }, { "name": "变更时间", "value": "modify_time" + }, + { + "name": "创建时间", + "value": "create_time" } ], "type": "search", @@ -1201,10 +1201,6 @@ "name": "无", "value": null }, - { - "name": "文章", - "value": "article_id" - }, { "name": "id", "value": "id" @@ -1212,6 +1208,10 @@ { "name": "编号", "value": "sn" + }, + { + "name": "文章", + "value": "article_id" } ], "type": "search", @@ -1412,22 +1412,22 @@ "name": "无", "value": null }, - { - "name": "源链接", - "value": "url" - }, { "name": "文章", "value": "article_id" }, - { - "name": "ID", - "value": "id" - }, { "name": "板块名称", "value": "name" }, + { + "name": "源链接", + "value": "url" + }, + { + "name": "ID", + "value": "id" + }, { "name": "编码", "value": "sn" @@ -1444,13 +1444,13 @@ "name": "无", "value": null }, - { - "name": "变更时间", - "value": "modify_time" - }, { "name": "创建时间", "value": "create_time" + }, + { + "name": "变更时间", + "value": "modify_time" } ], "type": "search", @@ -2456,6 +2456,18 @@ "name": "无", "value": null }, + { + "name": "mail", + "value": "mail" + }, + { + "name": "type", + "value": "type" + }, + { + "name": "id", + "value": "id" + }, { "name": "no", "value": "no" @@ -2465,28 +2477,16 @@ "value": "account" }, { - "name": "adrress", - "value": "adrress" - }, - { - "name": "tel", - "value": "tel" - }, - { - "name": "type", - "value": "type" + "name": "name", + "value": "name" }, { "name": "depNo", "value": "depNo" }, { - "name": "id", - "value": "id" - }, - { - "name": "name", - "value": "name" + "name": "depName", + "value": "depName" }, { "name": "pass", @@ -2497,12 +2497,12 @@ "value": "mpass" }, { - "name": "mail", - "value": "mail" + "name": "adrress", + "value": "adrress" }, { - "name": "depName", - "value": "depName" + "name": "tel", + "value": "tel" } ], "type": "search", @@ -2944,16 +2944,16 @@ "value": null }, { - "name": "IP地址", - "value": "ip" + "name": "其他内容", + "value": "name" }, { "name": "ID", "value": "id" }, { - "name": "其他内容", - "value": "name" + "name": "IP地址", + "value": "ip" } ], "type": "search", @@ -3176,26 +3176,6 @@ "name": "无", "value": null }, - { - "name": "id", - "value": "id" - }, - { - "name": "标题", - "value": "title" - }, - { - "name": "内容", - "value": "content" - }, - { - "name": "姓名", - "value": "name" - }, - { - "name": "编号", - "value": "sn" - }, { "name": "手机号", "value": "phone" @@ -3203,6 +3183,26 @@ { "name": "IP", "value": "not_show_ip" + }, + { + "name": "编号", + "value": "sn" + }, + { + "name": "标题", + "value": "title" + }, + { + "name": "姓名", + "value": "name" + }, + { + "name": "id", + "value": "id" + }, + { + "name": "内容", + "value": "content" } ], "type": "search", @@ -3216,13 +3216,13 @@ "name": "无", "value": null }, - { - "name": "创建时间", - "value": "create_time" - }, { "name": "变更时间", "value": "modify_time" + }, + { + "name": "创建时间", + "value": "create_time" } ], "type": "search", @@ -3246,6 +3246,27 @@ "type": "search", "value": null }, + { + "label": "是否展示", + "name": "show", + "options": [ + { + "name": "否", + "value": "0" + }, + { + "name": "是", + "value": "1" + }, + { + "name": "全部", + "value": null + } + ], + "sortable": true, + "type": "select", + "value": null + }, { "label": "进展", "name": "status", @@ -3270,27 +3291,6 @@ "type": "select", "value": null }, - { - "label": "是否展示", - "name": "show", - "options": [ - { - "name": "否", - "value": "0" - }, - { - "name": "是", - "value": "1" - }, - { - "name": "全部", - "value": null - } - ], - "sortable": true, - "type": "select", - "value": null - }, { "label": "状态", "name": "state", @@ -3441,25 +3441,13 @@ "name": "无", "value": null }, - { - "name": "标题", - "value": "title" - }, - { - "name": "手机号", - "value": "phone" - }, - { - "name": "IP", - "value": "not_show_ip" - }, { "name": "id", "value": "id" }, { - "name": "编号", - "value": "sn" + "name": "标题", + "value": "title" }, { "name": "内容", @@ -3468,6 +3456,18 @@ { "name": "姓名", "value": "name" + }, + { + "name": "IP", + "value": "not_show_ip" + }, + { + "name": "编号", + "value": "sn" + }, + { + "name": "手机号", + "value": "phone" } ], "type": "search", @@ -3481,13 +3481,13 @@ "name": "无", "value": null }, - { - "name": "变更时间", - "value": "modify_time" - }, { "name": "创建时间", "value": "create_time" + }, + { + "name": "变更时间", + "value": "modify_time" } ], "type": "search", @@ -3511,6 +3511,26 @@ "type": "search", "value": null }, + { + "label": "状态", + "name": "state", + "options": [ + { + "name": "已启用", + "value": "0" + }, + { + "name": "未启用", + "value": "1" + }, + { + "name": "全部", + "value": null + } + ], + "type": "select", + "value": null + }, { "label": "是否展示", "name": "show", @@ -3532,26 +3552,6 @@ "type": "select", "value": null }, - { - "label": "状态", - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - }, { "label": "进展", "name": "status", @@ -3707,13 +3707,21 @@ "value": null }, { - "name": "id", - "value": "id" + "name": "标题", + "value": "title" }, { "name": "内容", "value": "content" }, + { + "name": "id", + "value": "id" + }, + { + "name": "编号", + "value": "sn" + }, { "name": "姓名", "value": "name" @@ -3722,14 +3730,6 @@ "name": "手机号", "value": "phone" }, - { - "name": "编号", - "value": "sn" - }, - { - "name": "标题", - "value": "title" - }, { "name": "IP", "value": "not_show_ip" @@ -4428,13 +4428,13 @@ "name": "无", "value": null }, - { - "name": "变更时间", - "value": "modify_time" - }, { "name": "创建时间", "value": "create_time" + }, + { + "name": "变更时间", + "value": "modify_time" } ], "type": "search", @@ -4592,6 +4592,10 @@ "name": "无", "value": null }, + { + "name": "名称", + "value": "name" + }, { "name": "ID", "value": "id" @@ -4599,10 +4603,6 @@ { "name": "链接", "value": "url" - }, - { - "name": "名称", - "value": "name" } ], "type": "search", @@ -4780,6 +4780,10 @@ "name": "无", "value": null }, + { + "name": "链接", + "value": "url" + }, { "name": "ID", "value": "id" @@ -4787,10 +4791,6 @@ { "name": "名称", "value": "name" - }, - { - "name": "链接", - "value": "url" } ], "type": "search",