diff --git a/doc/5.2.6-up-5.2.7.sql b/doc/5.2.6-up-5.2.7.sql deleted file mode 100644 index c89e3ac3..00000000 --- a/doc/5.2.6-up-5.2.7.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `model` DROP COLUMN `manager_id`; -ALTER TABLE `cms_category` DROP COLUMN `category_datetime`; -ALTER TABLE `logger` MODIFY COLUMN `id` bigint(20) UNSIGNED NOT NULL; -ALTER TABLE `mdiy_page` ADD COLUMN `NOT_DEL` int(1) DEFAULT 0 COMMENT '删除标记'; -ALTER TABLE `mdiy_model` DROP INDEX `indx_model_name`; \ No newline at end of file diff --git a/doc/5.2.7-up-5.2.8.sql b/doc/5.2.7-up-5.2.8.sql new file mode 100644 index 00000000..96d3f8a5 --- /dev/null +++ b/doc/5.2.7-up-5.2.8.sql @@ -0,0 +1,112 @@ +SET FOREIGN_KEY_CHECKS = 0; +ALTER TABLE `mdiy_page` ADD INDEX `idx_page_model_id`(`page_model_id`) USING BTREE; +DROP TABLE `mdiy_form`; +UPDATE mdiy_model SET MODEL_CUSTOM_TYPE = 'form' WHERE MODEL_CUSTOM_TYPE = 'post'; +UPDATE `mdiy_tag` SET `TAG_SQL` = '<#assign _typeid=\'\'/>\n<#assign _typetitle=\'\'/>\n<#assign _size=\'20\'/>\n\n<#if column?? && column.id?? && column.id?number gt 0>\n <#assign _typeid=\'${column.id}\'>\n\n\n<#if typeid??>\n <#assign _typeid=\'${typeid}\'>\n\n\n<#if typetitle??>\n <#assign _typetitle=\'${typetitle}\'>\n\n\n<#if size??>\n <#assign _size=\'${size}\'>\n\n\n<#if orderby?? >\n <#if orderby==\'date\'>\n <#assign _orderby=\'content_datetime\'>\n <#elseif orderby==\'updatedate\'>\n <#assign _orderby=\'content_updatetime\'>\n <#elseif orderby==\'hit\'>\n <#assign _orderby=\'content_hit\'>\n <#elseif orderby==\'sort\'>\n <#assign _orderby=\'content_sort\'>\n <#else>\n <#assign _orderby=\'cms_content.id\'>\n \n<#else>\n <#assign _orderby=\'cms_content.id\'>\n\n\nSELECT\n cms_content.id AS id,\n content_title AS title,\n content_title AS fulltitle,\n content_author AS author,\n content_source AS source,\n category.category_title AS typetitle,\n category.id AS typeid,\n category.category_path AS typepath,\n category.category_img AS typelitpic,\n category.category_keyword as typekeyword,\n category.top_id as topId,\n category.category_parent_ids as parentids,\n category.category_type AS \"type\",\n\n <#--列表页动态链接-->\n <#if isDo?? && isDo>\n CONCAT(\'${modelName}/list.do?style=${appTemplate!\"\"}&typeid=\', category.category_id) as typelink,\n <#else>\n (SELECT CONCAT(category_path,\'/index.html\')) AS typelink,\n \n content_description AS descrip,\n content_hit AS hit,\n content_type AS flag,\n cms_content.content_keyword AS keyword,\n content_img AS litpic,\n\n <#--内容页动态链接-->\n <#if isDo?? && isDo>\n CONCAT(\'${modelName}/view.do?style=${appTemplate!\"\"}&id=\', cms_content.id) as \"link\",\n <#else>\n CONCAT(category.category_path,\'/\',cms_content.id,\'.html\') AS \"link\",\n \n\n <#if tableName??>${tableName}.*,\n content_datetime AS \"date\"\nFROM\n cms_content LEFT JOIN cms_category as category\nON cms_content.category_id = category.id\n\n <#--判断是否有自定义模型表-->\n <#if tableName??>\n LEFT JOIN ${tableName} ON ${tableName}.link_id=cms_content.id\n \nWHERE\n progress_status=\'终审通过\'\n and content_display=0\n and cms_content.del=0\n\n <#--gov 判断发布到-->\n <#if style?? >\n and(\n <#list style?split(\',\') as item>\n <#if item?index gt 0> or\n FIND_IN_SET(\'${item}\',cms_content.content_style)\n )\n \n <#--根据站点编号查询-->\n <#if appId?? >\n and cms_content.app_id=${appId}\n and cms_content.id>0\n \n <#--判断是否有搜索分类集合-->\n <#if search?? && _typeid==\"\">\n <#if search.categoryIds?has_content>and FIND_IN_SET(category.id,\'${search.categoryIds}\')\n <#--标题-->\n <#if search.content_title??> and content_title like CONCAT(\'%\',\'${search.content_title}\',\'%\')\n <#--作者-->\n <#if search.content_author??> and content_author like CONCAT(\'%\',\'${search.content_author}\',\'%\')\n <#--来源-->\n <#if search.content_source??> and content_source like CONCAT(\'%\',\'${search.content_source}\',\'%\')\n <#--属性-->\n <#if search.content_type??> and (\n <#list search.content_type?split(\',\') as item>\n <#if item?index gt 0> or\n FIND_IN_SET(\'${item}\',cms_content.content_type)\n )\n \n\n <#--描述-->\n <#if search.content_description??>\n and content_description like CONCAT(\'%\',\'${search.content_description}\',\'%\')\n \n\n <#--关键字-->\n <#if search.content_keyword??> and content_keyword like CONCAT(\'%\',\'${search.content_keyword}\',\'%\')\n\n <#--内容-->\n <#if search.content_details??> and content_details like CONCAT(\'%\',\'${search.content_details}\',\'%\')\n\n <#--自定义顺序-->\n <#if search.content_sort??> and content_sort=${search.content_sort}\n <#--时间范围-->\n <#if search.content_datetime_start??&&search.content_datetime_end??>\n and content_datetime between \'${search.content_datetime_start}\' and \'${search.content_datetime_end}\'\n \n <#else>\n <#--查询栏目-->\n <#if _typeid?has_content>\n and (cms_content.category_id=${_typeid}\n or FIND_IN_SET(\'${_typeid}\', cms_content.category_ids)\n or cms_content.category_id in (select id FROM cms_category where cms_category.del=0\n <#if _typetitle?has_content>\n and cms_category.category_title=\'${_typetitle}\' and FIND_IN_SET(${_typeid},CATEGORY_PARENT_IDS)))\n \n \n <#--标题-->\n <#if content_title??> and content_title like CONCAT(\'%\',\'${content_title}\',\'%\')\n <#--作者-->\n <#if content_author??> and content_author like CONCAT(\'%\',\'${content_author}\',\'%\')\n <#--来源-->\n <#if content_source??> and content_source like CONCAT(\'%\',\'${content_source}\',\'%\')\n <#--属性-->\n <#if content_type??> and content_type like CONCAT(\'%\',\'${content_type}\',\'%\')\n <#--描述-->\n <#if content_description??> and content_description like CONCAT(\'%\',\'${content_description}\',\'%\')\n <#--关键字-->\n <#if content_keyword??> and content_keyword like CONCAT(\'%\',\'${content_keyword}\',\'%\')\n <#--内容-->\n <#if content_details??> and content_details like CONCAT(\'%\',\'${content_details}\',\'%\')\n <#--自定义顺序-->\n <#if content_sort??> and content_sort=${content_sort}\n <#--自定义模型-->\n <#if diyModel??>\n <#list diyModel as dm>\n <#assign json=\"${dm}\"?eval />\n and ${tableName}.${json.key} like CONCAT(\'%\',\'${json.value}\',\'%\')\n \n \n <#--文章属性-->\n <#if flag?? >\n and(\n <#list flag?split(\',\') as item>\n <#if item?index gt 0> or\n FIND_IN_SET(\'${item}\',cms_content.content_type)\n )\n \n <#if noflag??>\n and(\n <#list noflag?split(\',\') as item>\n <#if item?index gt 0> and\n FIND_IN_SET(\'${item}\',cms_content.content_type)=0\n or cms_content.content_type is null)\n \n\n <#--字段排序-->\n <#if orderby?? >\nORDER BY\n <#if orderby==\'date\'> content_datetime\n <#elseif orderby==\'updatedate\'> content_updatetime\n <#elseif orderby==\'hit\'> content_hit\n <#elseif orderby==\'sort\'> content_sort\n <#else>\n cms_content.id\n \n <#else>\nORDER BY cms_content.id\n \n\n <#if order?? >\n <#if order==\'desc\'> desc\n <#if order==\'asc\'> asc\n <#else>\n desc\n \n LIMIT\n <#--判断是否分页-->\n <#if ispaging?? && (pageTag.pageNo)??>\n ${((pageTag.pageNo-1)*_size?eval)?c},${_size?default(20)}\n <#else>\n ${_size?default(20)}\n \n' WHERE `TAG_NAME` = 'arclist'; +DROP TABLE IF EXISTS `model`; +CREATE TABLE `model` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id主键', + `model_id` int(22) DEFAULT NULL COMMENT '模块的父模块id', + `model_parent_ids` varchar(300) DEFAULT NULL COMMENT '父级编号集合,从小到大排序', + `model_code` varchar(255) DEFAULT NULL COMMENT '模块编码', + `model_title` varchar(150) DEFAULT NULL COMMENT '模块标题', + `model_url` varchar(255) DEFAULT NULL COMMENT '模块连接地址', + `model_icon` varchar(120) DEFAULT NULL COMMENT '模块图标', + `model_sort` int(11) DEFAULT NULL COMMENT '模块的排序', + `model_ismenu` int(1) DEFAULT '0' COMMENT '模块是否是菜单', + `IS_CHILD` varchar(300) DEFAULT NULL COMMENT '扩展字段', + `model_datetime` datetime DEFAULT NULL, + `UPDATE_BY` varchar(11) DEFAULT NULL COMMENT '更新人', + `UPDATE_DATE` datetime DEFAULT NULL COMMENT '更新时间', + `CREATE_BY` varchar(11) DEFAULT NULL COMMENT '创建人', + `CREATE_DATE` datetime DEFAULT NULL COMMENT '创建时间', + `DEL` int(1) DEFAULT '0' COMMENT '删除标记', + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_model_id` (`model_id`) USING BTREE, + KEY `idx_model_title` (`model_title`,`model_url`), + CONSTRAINT `fk_model_id` FOREIGN KEY (`model_id`) REFERENCES `model` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION +) ENGINE=InnoDB AUTO_INCREMENT=1768 DEFAULT CHARSET=utf8 COMMENT='模块表'; + +-- ---------------------------- +-- Records of model +-- ---------------------------- +BEGIN; +INSERT INTO `model` VALUES (23, NULL, NULL, '01000000', '权限管理', '', 'icon-quanxianguanli', 5, 1, NULL, '2014-09-09 10:12:22', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (84, NULL, NULL, '12000000', '系统设置', '', 'icon-xitongguanli', 3, 1, NULL, '2014-12-19 22:30:24', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (86, 84, '84', '12010000', '应用设置', 'app/-1/edit.do', '', 2, 1, NULL, '2014-12-19 22:31:59', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (87, 84, '84', '12020000', '模版管理', 'template/index.do', '', 1, 1, NULL, '2014-12-19 22:32:50', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (182, 86, '84,86', '12010004', '修改', 'app:update', '', 0, 0, NULL, '2017-09-05 16:14:42', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (183, 23, '23', '01030000', '菜单管理', 'model/index.do', '', 0, 1, NULL, '2017-09-05 13:09:26', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (184, 183, '23,183', '01030001', '查看', 'model:view', '', 0, 0, NULL, '2017-09-05 13:10:43', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (201, 183, '23,183', '01030002', '新增', 'model:save', NULL, 0, 0, NULL, '2019-12-28 14:26:29', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (202, 183, '23,183', '01030004', '修改', 'model:update', NULL, 0, 0, NULL, '2019-12-28 14:26:33', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (204, 87, '84,87', '12020002', '上传', 'template:upload', '', 0, 0, '', '2019-12-28 14:26:37', '', NULL, '', NULL, 0); +INSERT INTO `model` VALUES (406, 23, '23', '406', '角色管理', 'basic/role/index.do', '', 0, 1, NULL, '2019-08-03 19:18:47', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (407, 406, '23,406', '407', '新增', 'role:save', '', 0, 0, NULL, '2019-08-03 19:19:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (408, 406, '23,406', '408', '修改', 'role:update', '', 0, 0, NULL, '2019-08-03 19:19:34', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (409, 406, '23,406', '409', '删除', 'role:del', '', 0, 0, NULL, '2019-08-03 19:19:59', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (411, 23, '23', '411', '管理员管理', 'basic/manager/index.do', '', 0, 1, NULL, '2019-08-04 12:54:38', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (412, 411, '23,411', '412', '查看', 'manager:view', '', 0, 0, NULL, '2019-08-04 12:56:13', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (663, 411, '23,411', '15737980803547570', '删除', 'manager:del', '', 0, 0, NULL, '2019-11-19 18:19:35', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (664, 411, '23,411', '15737980853527702', '更新', 'manager:update', '', 0, 0, NULL, '2019-11-19 18:21:08', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (665, 411, '23,411', '15735981803267702', '新增', 'manager:save', '', 0, 0, NULL, '2019-11-19 18:21:42', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (668, 183, '23,183', '668', '删除', 'model:del', '', 0, 0, NULL, '2019-11-19 18:35:49', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (672, 87, '84,87', '5434345', '删除', 'template:del', '', 0, 0, '', '2019-11-19 19:05:09', '', NULL, '', NULL, 0); +INSERT INTO `model` VALUES (673, 87, '84,87', '452435345', '更新', 'template:update', '', 0, 0, '', '2019-11-19 19:05:35', '', NULL, '', NULL, 0); +INSERT INTO `model` VALUES (685, 84, '84', '65123656532', '系统日志', 'basic/log/index.do', '', 0, 1, NULL, '2019-11-22 21:13:50', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (686, 685, '84,685', '351463145634', '查看', 'basic:log:view', '', 0, 0, NULL, '2019-11-22 21:14:24', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (706, NULL, NULL, '02000000', '内容管理', '', 'icon-neirongguanli', 5, 1, NULL, '2019-11-23 20:14:59', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (707, 706, '706', '02980000', '文章管理', 'cms/content/index.do', '', 3, 1, NULL, '2019-11-23 20:16:25', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (708, 706, '706', '02990000', '栏目管理', 'cms/category/index.do', '', 2, 1, NULL, '2019-11-23 20:16:50', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (709, 706, '706', '02020000', '静态化', 'cms/generate/index.do', '', 1, 1, NULL, '2019-11-23 20:17:15', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (710, 709, '706,709', '02020004', '生成文章', 'cms:generate:article', '', 0, 0, NULL, '2019-11-23 20:17:39', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (711, 709, '706,709', '02020003', '生成栏目', 'cms:generate:column', '', 0, 0, NULL, '2019-11-23 20:18:05', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (713, 709, '706,709', '02020001', '查看', 'cms:generate:view', '', 0, 0, NULL, '2019-11-23 20:18:48', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (714, 709, '706,709', '56454656', '生成主页', 'cms:generate:index', '', 0, 0, NULL, '2019-11-23 20:20:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (715, 708, '706,708', '02990004', '新增', 'cms:category:save', '', 0, 0, NULL, '2019-11-23 20:20:42', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (716, 708, '706,708', '02990003', '修改', 'cms:category:update', '', 0, 0, NULL, '2019-11-23 20:21:36', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (717, 708, '706,708', '02990001', '查看', 'cms:category:view', '', 0, 0, NULL, '2019-11-23 20:22:05', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (718, 707, '706,707', '02980002', '新增', 'cms:content:save', '', 0, 0, NULL, '2019-11-23 20:22:35', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (719, 707, '706,707', '02980004', '修改', 'cms:content:update', '', 0, 0, NULL, '2019-11-23 20:22:57', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (720, 707, '706,707', '02980001', '查看', 'cms:content:view', '', 0, 0, NULL, '2019-11-23 20:23:15', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (721, 707, '706,707', '721', '删除', 'cms:content:del', '', 0, 0, NULL, '2019-11-23 21:02:28', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1653, 708, '706,708', '1320', '删除', 'cms:category:del', '', 0, 0, NULL, '2020-09-22 07:41:21', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1700, NULL, NULL, '16197622071887865', '自定义模块', '', 'icon-zhanqun', 0, 1, '', '2021-05-25 22:07:10', '57', '2022-02-28 09:40:50', '', NULL, 0); +INSERT INTO `model` VALUES (1701, 1700, '1700', '16197622071885990', '自定义页面', 'mdiy/page/index.do', '', 0, 1, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1702, 1701, '1700,1701', '16197622071882306', '新增', 'mdiy:page:save', NULL, 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1703, 1701, '1700,1701', '16197622071889774', '删除', 'mdiy:page:del', NULL, 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1704, 1701, '1700,1701', '16197622071883980', '更新', 'mdiy:page:update', NULL, 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1705, 1701, '1700,1701', '16197622071888834', '查看', 'mdiy:page:view', NULL, 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1706, 1701, '1700,1701', '161976235700096088', '导入', 'mdiy:form:importJson', '', 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1707, 1700, '1700', '16197622071880623', '自定义模型', 'mdiy/model/index.do', '', 0, 1, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1708, 1707, '1700,1707', '16197622071887303', '新增', 'mdiy:model:save', NULL, 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1709, 1707, '1700,1707', '16197622071881168', '删除', 'mdiy:model:del', NULL, 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1710, 1707, '1700,1707', '16197622071881215', '更新', 'mdiy:model:update', NULL, 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1711, 1707, '1700,1707', '16197622071884291', '查看', 'mdiy:model:view', NULL, 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1712, 1707, '1700,1707', '161976234500028132', '导入', 'mdiy:model:importJson', '', 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1713, 1700, '1700', '16197622071884456', '自定义配置', 'mdiy/config/index.do', '', 0, 1, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1714, 1713, '1700,1713', '16197622071881449', '新增', 'mdiy:config:save', NULL, 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1715, 1713, '1700,1713', '16197622071889126', '删除', 'mdiy:config:del', NULL, 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1716, 1713, '1700,1713', '16197622071888369', '更新', 'mdiy:config:update', NULL, 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1717, 1713, '1700,1713', '16197622071882134', '查看', 'mdiy:config:view', NULL, 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1718, 1713, '1700,1713', '161976231700026503', '导入', 'mdiy:config:importJson', '', 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1719, 1700, '1700', '15725929177747726', '自定义字典', 'mdiy/dict/index.do', '', 0, 1, NULL, '2021-05-25 22:07:10', '0', NULL, '0', NULL, 0); +INSERT INTO `model` VALUES (1720, 1719, '1700,1719', '15725929177745034', '查看', 'mdiy:dict:view', NULL, 0, 0, NULL, '2021-05-25 22:07:10', '0', NULL, '0', NULL, 0); +INSERT INTO `model` VALUES (1721, 1719, '1700,1719', '15725929177742474', '新增', 'mdiy:dict:save', NULL, 0, 0, NULL, '2021-05-25 22:07:10', '0', NULL, '0', NULL, 0); +INSERT INTO `model` VALUES (1722, 1719, '1700,1719', '15725929177744138', '修改', 'mdiy:dict:update', NULL, 0, 0, NULL, '2021-05-25 22:07:10', '0', NULL, '0', NULL, 0); +INSERT INTO `model` VALUES (1723, 1719, '1700,1719', '15725929177748034', '删除', 'mdiy:dict:del', NULL, 0, 0, NULL, '2021-05-25 22:07:10', '0', NULL, '0', NULL, 0); +INSERT INTO `model` VALUES (1724, 1700, '1700', '162034834200049578', '自定义业务', 'mdiy/form/index.do', 'icon-caidan', 0, 1, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1725, 1724, '1700,1724', '162034839300098062', '导入', 'mdiy:form:importJson', '', 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1726, 1724, '1700,1724', '162034842600047746', '删除', 'mdiy:form:del', '', 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1727, 1724, '1700,1724', '16203484400006602', '查看', 'mdiy:form:view', '', 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1728, 1724, '1700,1724', '162034845600099530', '保存', 'mdiy:form:save', '', 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1729, 1724, '1700,1724', '162034847100023820', '更新', 'mdiy:form:update', '', 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1730, 1724, '1700,1724', '162143180100032708', '新增业务数据', 'mdiy:formData:save', '', 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1731, 1724, '1700,1724', '162143181700031623', '删除业务数据', 'mdiy:formData:del', 'icon-caidan', 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1732, 1724, '1700,1724', '162143576500025187', '更新业务数据', 'mdiy:formData:update', 'icon-caidan', 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1733, 1713, '1700,1713', '', '更新数据', 'mdiy:configData:update', '', 0, 0, '', '2021-12-28 22:05:33', '57', '2021-12-28 22:06:19', '', '2021-12-28 22:05:33', 0); +INSERT INTO `model` VALUES (1764, 406, '406', '409', '查看', 'role:view', NULL, 0, 0, NULL, '2022-05-07 14:12:58', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1765, 86, '86', '12010004', '查看', 'app:view', NULL, 0, 0, NULL, '2022-05-07 14:13:36', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1767, 87, '84,87', '12010004', '查看', 'template:view', '', 0, 0, '', '2022-05-07 14:17:03', '57', '2022-05-07 14:17:18', '', NULL, 0); +COMMIT; +SET FOREIGN_KEY_CHECKS = 1; diff --git a/doc/mcms-5.2.7.sql b/doc/mcms-5.2.8.sql similarity index 98% rename from doc/mcms-5.2.7.sql rename to doc/mcms-5.2.8.sql index 8606be11..b1ecc61a 100644 --- a/doc/mcms-5.2.7.sql +++ b/doc/mcms-5.2.8.sql @@ -1,4 +1,3 @@ - SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; @@ -32,7 +31,7 @@ CREATE TABLE `app` ( -- Records of app -- ---------------------------- BEGIN; -INSERT INTO `app` VALUES (1, '铭飞MCms(5.2.7)', 'http://localhost:8080/', '[{\"url\":\"/upload/1/appLogo/1609397756549.png\",\"name\":\"1593834123492.png\",\"path\":\"/upload/1/appLogo/1609397756549.png\",\"uid\":1609397756411,\"status\":\"success\"}]', '铭飞MCMS', '版权所有 ©铭飞科技有限公司2012-2019 保留一切权利。', 'default', '铭飞MCMS', '', 0, NULL, '2019-11-17 00:00:00', 'web', '2022-02-28 10:28:55', '57', NULL, '', 0); +INSERT INTO `app` VALUES (1, '铭飞MCms(5.2.8)', 'http://localhost:8080/', '[{\"url\":\"/upload/1/appLogo/1609397756549.png\",\"name\":\"1593834123492.png\",\"path\":\"/upload/1/appLogo/1609397756549.png\",\"uid\":1609397756411,\"status\":\"success\"}]', '铭飞MCMS', '版权所有 ©铭飞科技有限公司2012-2019 保留一切权利。', 'default', '铭飞MCMS', '', 0, NULL, '2019-11-17 00:00:00', 'web', '2022-02-28 10:28:55', '57', NULL, '', 0); COMMIT; -- ---------------------------- @@ -356,6 +355,10 @@ INSERT INTO `logger` VALUES (1498129549716054017, NULL, '{\n \"result\":true,\n INSERT INTO `logger` VALUES (1498129595425579010, NULL, '{\n \"result\":true,\n \"code\":200,\n \"data\":{\n \"id\":\"1\"\n }\n}', '{\n \"createBy\":[\"57\"],\n \"createDate\":[\"2022-02-28 10:54:43\"],\n \"del\":[\"0\"],\n \"id\":[\"1\"],\n \"remarks\":[\"\"],\n \"updateBy\":[\"57\"],\n \"updateDate\":[\"2022-02-28 10:54:53\"],\n \"order\":[\"\"],\n \"pagePath\":[\"index.htm\"],\n \"pageTitle\":[\"测试\"],\n \"notDel\":[\"0\"],\n \"pageKey\":[\"test\"],\n \"pageType\":[\"cms\"]\n}', '内网IP', 'msopen', 'manage', 'update', 'success', '/ms/mdiy/page/update.do', 'POST', 'net.mingsoft.mdiy.action.PageAction.update()', '127.0.0.1', '更新自定义页面接口', NULL, NULL, '2022-02-28 10:55:04', NULL, 0); INSERT INTO `logger` VALUES (1498143202888605697, NULL, '{\n \"result\":true,\n \"code\":200\n}', '[\n {\n \"createBy\":\"57\",\n \"createDate\":\"2022-02-28 10:54:43\",\n \"del\":0,\n \"id\":\"1\",\n \"notDel\":0,\n \"pageKey\":\"test\",\n \"pagePath\":\"index.htm\",\n \"pageTitle\":\"测试\",\n \"pageType\":\"cms\",\n \"sqlWhereList\":[],\n \"updateBy\":\"57\",\n \"updateDate\":\"2022-02-28 10:55:04\"\n }\n]', '内网IP', 'msopen', 'manage', 'delete', 'success', '/ms/mdiy/page/delete.do', 'POST', 'net.mingsoft.mdiy.action.PageAction.delete()', '127.0.0.1', '批量删除自定义页面接口', NULL, NULL, '2022-02-28 11:49:08', NULL, 0); INSERT INTO `logger` VALUES (1498175866450436097, NULL, '{\n \"result\":true,\n \"code\":200\n}', '{\n \"url\":[\"index.htm\"],\n \"position\":[\"index\"]\n}', '内网IP', '', 'manage', 'update', 'success', '/ms/cms/generate//generateIndex.do', 'POST', 'net.mingsoft.cms.action.GeneraterAction.generateIndex()', '127.0.0.1', '生成主页', NULL, NULL, '2022-02-28 13:58:56', NULL, 0); +INSERT INTO `logger` VALUES (1522822675485765634, NULL, '{\n \"result\":true,\n \"code\":200,\n \"data\":\"1766\"\n}', '{\n \"id\":[\"0\"],\n \"modelId\":[\"87\"],\n \"modelTitle\":[\"查看\"],\n \"modelIcon\":[\"\"],\n \"modelUrl\":[\"template:view\"],\n \"isChild\":[\"\"],\n \"modelCode\":[\"\"],\n \"modelSort\":[\"0\"],\n \"modelIsMenu\":[\"1\"]\n}', '内网IP', 'msopen', 'manage', 'insert', 'success', '/ms/model/save.do', 'POST', 'net.mingsoft.basic.action.ModelAction.save()', '127.0.0.1', '保存模块表实体', NULL, NULL, '2022-05-07 14:16:33', NULL, 0); +INSERT INTO `logger` VALUES (1522822730477285377, NULL, '{\n \"result\":false,\n \"msg\":\"菜单不能修改为功能按钮\",\n \"code\":500\n}', '{\n \"createBy\":[\"\"],\n \"createDate\":[\"\"],\n \"del\":[\"0\"],\n \"id\":[\"1766\"],\n \"remarks\":[\"\"],\n \"updateBy\":[\"\"],\n \"updateDate\":[\"\"],\n \"order\":[\"\"],\n \"modelTitle\":[\"查看\"],\n \"modelId\":[\"87\"],\n \"modelUrl\":[\"template:view\"],\n \"modelCode\":[\"\"],\n \"isChild\":[\"\"],\n \"modelIcon\":[\"\"],\n \"modelSort\":[\"0\"],\n \"modelIsMenu\":[\"0\"],\n \"chick\":[\"0\"],\n \"depth\":[\"2\"],\n \"modelParentIds\":[\"84,87\"]\n}', '内网IP', 'msopen', 'manage', 'update', 'success', '/ms/model/update.do', 'POST', 'net.mingsoft.basic.action.ModelAction.update()', '127.0.0.1', '更新模块表信息模块表', NULL, NULL, '2022-05-07 14:16:46', NULL, 0); +INSERT INTO `logger` VALUES (1522822772340633601, NULL, '{\n \"result\":true,\n \"code\":200\n}', '{\n \"ids\":[\"1766\"]\n}', '内网IP', 'msopen', 'manage', 'delete', 'success', '/ms/model/delete.do', 'POST', 'net.mingsoft.basic.action.ModelAction.delete()', '127.0.0.1', '批量删除模块表', NULL, NULL, '2022-05-07 14:16:56', NULL, 0); +INSERT INTO `logger` VALUES (1522822866217545730, NULL, '{\n \"result\":true,\n \"code\":200,\n \"data\":\"1767\"\n}', '{\n \"createBy\":[\"\"],\n \"createDate\":[\"\"],\n \"del\":[\"0\"],\n \"id\":[\"1767\"],\n \"remarks\":[\"\"],\n \"updateBy\":[\"\"],\n \"updateDate\":[\"\"],\n \"order\":[\"\"],\n \"modelTitle\":[\"查看\"],\n \"modelId\":[\"87\"],\n \"modelUrl\":[\"template:view\"],\n \"modelCode\":[\"12010004\"],\n \"isChild\":[\"\"],\n \"modelIcon\":[\"\"],\n \"modelSort\":[\"0\"],\n \"modelIsMenu\":[\"0\"],\n \"chick\":[\"0\"],\n \"depth\":[\"1\"],\n \"modelParentIds\":[\"87\"]\n}', '内网IP', 'msopen', 'manage', 'update', 'success', '/ms/model/update.do', 'POST', 'net.mingsoft.basic.action.ModelAction.update()', '127.0.0.1', '更新模块表信息模块表', NULL, NULL, '2022-05-07 14:17:19', NULL, 0); COMMIT; -- ---------------------------- @@ -403,7 +406,7 @@ CREATE TABLE `mdiy_config` ( `NOT_DEL` int(1) DEFAULT '0' COMMENT '1为不能删除,主要用于系统默认数据,0为一般数据,主要是前端控制', PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `idx_config_name` (`config_name`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='自定义配置'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='自定义配置'; -- ---------------------------- -- Records of mdiy_config @@ -451,30 +454,6 @@ INSERT INTO `mdiy_dict` VALUES (643, 'c', '推荐', '栏目属性', NULL, NULL, INSERT INTO `mdiy_dict` VALUES (644, 'nav', '导航', '栏目属性', NULL, NULL, '1', NULL, 0, NULL, NULL, NULL, NULL, 3, 1); COMMIT; --- ---------------------------- --- Table structure for mdiy_form --- ---------------------------- -DROP TABLE IF EXISTS `mdiy_form`; -CREATE TABLE `mdiy_form` ( - `form_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增长id', - `form_tips_name` varchar(30) NOT NULL COMMENT '自定义表单提示文字', - `form_table_name` varchar(30) NOT NULL COMMENT '自定义表单表名', - `form_app_id` int(11) NOT NULL COMMENT '自定义表单关联的应用编号', - `create_by` int(11) DEFAULT NULL, - `create_date` datetime DEFAULT NULL, - `update_by` int(11) DEFAULT NULL, - `update_date` datetime DEFAULT NULL, - PRIMARY KEY (`form_id`) USING BTREE, - KEY `fk_mdiy_form` (`form_app_id`) USING BTREE, - CONSTRAINT `mdiy_form_ibfk_1` FOREIGN KEY (`form_app_id`) REFERENCES `app` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='自定义表单表'; - --- ---------------------------- --- Records of mdiy_form --- ---------------------------- -BEGIN; -COMMIT; - -- ---------------------------- -- Table structure for mdiy_model -- ---------------------------- @@ -494,7 +473,7 @@ CREATE TABLE `mdiy_model` ( `del` int(1) DEFAULT '0' COMMENT '删除标记', `NOT_DEL` int(1) DEFAULT '0' COMMENT '1为不能删除,主要用于系统默认数据,0为一般数据,主要是前端控制', PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COMMENT='自定义模型'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='自定义模型'; -- ---------------------------- -- Records of mdiy_model @@ -520,8 +499,9 @@ CREATE TABLE `mdiy_page` ( `DEL` int(1) DEFAULT '0' COMMENT '删除标记', `NOT_DEL` int(1) DEFAULT '0' COMMENT '删除标记', PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `idx_page_key` (`page_key`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='自定义页面表'; + UNIQUE KEY `idx_page_key` (`page_key`), + KEY `idx_page_model_id` (`page_model_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='自定义页面表'; -- ---------------------------- -- Records of mdiy_page @@ -553,7 +533,7 @@ CREATE TABLE `mdiy_tag` ( -- Records of mdiy_tag -- ---------------------------- BEGIN; -INSERT INTO `mdiy_tag` VALUES (3, 'arclist', 'list', ' <#assign _typeid=\'\'/>\n<#assign _typetitle=\'\'/>\n<#assign _size=\'20\'/>\n\n<#if column?? && column.id?? && column.id?number gt 0>\n <#assign _typeid=\'${column.id}\'>\n\n\n<#if typeid??>\n <#assign _typeid=\'${typeid}\'>\n\n\n<#if typetitle??>\n <#assign _typetitle=\'${typetitle}\'>\n\n\n<#if size??>\n <#assign _size=\'${size}\'>\n\n\n<#if orderby?? >\n <#if orderby==\'date\'>\n <#assign _orderby=\'content_datetime\'>\n <#elseif orderby==\'updatedate\'>\n <#assign _orderby=\'content_updatetime\'>\n <#elseif orderby==\'hit\'>\n <#assign _orderby=\'content_hit\'>\n <#elseif orderby==\'sort\'>\n <#assign _orderby=\'content_sort\'>\n <#else>\n <#assign _orderby=\'cms_content.id\'>\n \n<#else>\n <#assign _orderby=\'cms_content.id\'>\n\n\nSELECT\n cms_content.id AS id,\n content_title AS title,\n content_title AS fulltitle,\n content_author AS author,\n content_source AS source,\n content_details AS content,\n category.category_title AS typetitle,\n category.id AS typeid,\ncategory.category_path AS typepath,\n category.category_img AS typelitpic,\n category.category_keyword as typekeyword,\n category.top_id as topId,\n category.category_parent_ids as parentids,\n category.category_type AS \"type\",\n\n <#--列表页动态链接-->\n <#if isDo?? && isDo>\n CONCAT(\'/${modelName}/list.do?typeid=\', category.category_id) as typelink,\n <#else>\n (SELECT \'index.html\') AS typelink,\n \n content_description AS descrip,\n content_hit AS hit,\n content_type AS flag,\n cms_content.content_keyword AS keyword,\n content_img AS litpic,\n \n <#--内容页动态链接-->\n <#if isDo?? && isDo>\n CONCAT(\'/${modelName}/view.do?id=\', cms_content.id,\'&orderby=${_orderby}\',\'&order=${order!\'ASC\'}\',\'&typeid=${typeid}\') as \"link\",\n <#else>\n CONCAT(category.category_path,\'/\',if(category_type=2,\"index\",cms_content.id),\'.html\') AS \"link\",\n \n\n <#if tableName??>${tableName}.*,\n content_datetime AS \"date\"\nFROM\n cms_content LEFT JOIN cms_category as category\n ON cms_content.category_id = category.id\n\n <#--判断是否有自定义模型表-->\n <#if tableName??>\n LEFT JOIN ${tableName} ON ${tableName}.link_id=cms_content.id\n \n WHERE \n content_display=0\n and cms_content.del=0\n <#--根据站点编号查询-->\n <#if appId?? >\n and cms_content.app_id=${appId}\n and cms_content.id>0\n \n <#--判断是否有搜索分类集合-->\n <#if search?? && _typeid==\"\">\n <#if search.categoryIds?has_content>and FIND_IN_SET(category.id,\'${search.categoryIds}\')\n <#--标题-->\n <#if search.content_title??> and content_title like CONCAT(\'%\',\'${search.content_title}\',\'%\')\n <#--作者-->\n <#if search.content_author??> and content_author like CONCAT(\'%\',\'${search.content_author}\',\'%\')\n <#--来源-->\n <#if search.content_source??> and content_source like CONCAT(\'%\',\'${search.content_source}\',\'%\')\n <#--属性-->\n <#if search.content_type??> and (\n <#list search.content_type?split(\',\') as item>\n <#if item?index gt 0> or\n FIND_IN_SET(\'${item}\',cms_content.content_type)\n )\n \n\n <#--描述-->\n <#if search.content_description??>\n and content_description like CONCAT(\'%\',\'${search.content_description}\',\'%\')\n \n\n <#--关键字-->\n <#if search.content_keyword??> and content_keyword like CONCAT(\'%\',\'${search.content_keyword}\',\'%\')\n\n <#--内容-->\n <#if search.content_details??> and content_details like CONCAT(\'%\',\'${search.content_details}\',\'%\')\n\n <#--自定义顺序-->\n <#if search.content_sort??> and content_sort=${search.content_sort}\n <#--时间范围-->\n <#if search.content_datetime_start??&&search.content_datetime_end??>\n and content_datetime between \'${search.content_datetime_start}\' and \'${search.content_datetime_end}\'\n \n <#else>\n <#--查询栏目-->\n <#if _typeid?has_content> \n and (cms_content.category_id=${_typeid} or cms_content.category_id in (select id FROM cms_category where cms_category.del=0 \n <#if _typetitle?has_content>\n and cms_category.category_title=\'${_typetitle}\' and FIND_IN_SET(${_typeid},CATEGORY_PARENT_IDS))) \n \n \n <#--标题-->\n <#if content_title??> and content_title like CONCAT(\'%\',\'${content_title}\',\'%\')\n <#--作者-->\n <#if content_author??> and content_author like CONCAT(\'%\',\'${content_author}\',\'%\')\n <#--来源-->\n <#if content_source??> and content_source like CONCAT(\'%\',\'${content_source}\',\'%\')\n <#--属性-->\n <#if content_type??> and content_type like CONCAT(\'%\',\'${content_type}\',\'%\')\n <#--描述-->\n <#if content_description??> and content_description like CONCAT(\'%\',\'${content_description}\',\'%\')\n <#--关键字-->\n <#if content_keyword??> and content_keyword like CONCAT(\'%\',\'${content_keyword}\',\'%\')\n <#--内容-->\n <#if content_details??> and content_details like CONCAT(\'%\',\'${content_details}\',\'%\')\n <#--自定义顺序-->\n <#if content_sort??> and content_sort=${content_sort}\n <#--自定义模型-->\n <#if diyModel??>\n <#list diyModel as dm>\n and ${tableName}.${dm.key} like CONCAT(\'%\',\'${dm.value}\',\'%\') \n \n \n <#--文章属性-->\n <#if flag?? >\n and(\n <#list flag?split(\',\') as item>\n <#if item?index gt 0> or\n FIND_IN_SET(\'${item}\',cms_content.content_type)\n )\n \n <#if noflag??>\n and(\n <#list noflag?split(\',\') as item>\n <#if item?index gt 0> and\n FIND_IN_SET(\'${item}\',cms_content.content_type)=0\n or cms_content.content_type is null)\n \n\n <#--字段排序-->\n <#if orderby?? >\n ORDER BY\n <#if orderby==\'date\'> content_datetime\n <#elseif orderby==\'updatedate\'> content_updatetime\n <#elseif orderby==\'hit\'> content_hit\n <#elseif orderby==\'sort\'> content_sort\n <#else>\n cms_content.id\n \n <#else>\n ORDER BY cms_content.id\n \n\n <#if order?? >\n <#if order==\'desc\'> desc\n <#if order==\'asc\'> asc\n <#else>\n desc\n \n LIMIT \n <#--判断是否分页-->\n <#if ispaging?? && (pageTag.pageNo)??>\n ${((pageTag.pageNo-1)*_size?eval)?c},${_size?default(20)}\n <#else>\n ${_size?default(20)}\n ', NULL, '文章列表', NULL, NULL, NULL, NULL, 0, 1); +INSERT INTO `mdiy_tag` VALUES (3, 'arclist', 'list', '<#assign _typeid=\'\'/>\n<#assign _typetitle=\'\'/>\n<#assign _size=\'20\'/>\n\n<#if column?? && column.id?? && column.id?number gt 0>\n <#assign _typeid=\'${column.id}\'>\n\n\n<#if typeid??>\n <#assign _typeid=\'${typeid}\'>\n\n\n<#if typetitle??>\n <#assign _typetitle=\'${typetitle}\'>\n\n\n<#if size??>\n <#assign _size=\'${size}\'>\n\n\n<#if orderby?? >\n <#if orderby==\'date\'>\n <#assign _orderby=\'content_datetime\'>\n <#elseif orderby==\'updatedate\'>\n <#assign _orderby=\'content_updatetime\'>\n <#elseif orderby==\'hit\'>\n <#assign _orderby=\'content_hit\'>\n <#elseif orderby==\'sort\'>\n <#assign _orderby=\'content_sort\'>\n <#else>\n <#assign _orderby=\'cms_content.id\'>\n \n<#else>\n <#assign _orderby=\'cms_content.id\'>\n\n\nSELECT\n cms_content.id AS id,\n content_title AS title,\n content_title AS fulltitle,\n content_author AS author,\n content_source AS source,\n category.category_title AS typetitle,\n category.id AS typeid,\n category.category_path AS typepath,\n category.category_img AS typelitpic,\n category.category_keyword as typekeyword,\n category.top_id as topId,\n category.category_parent_ids as parentids,\n category.category_type AS \"type\",\n\n <#--列表页动态链接-->\n <#if isDo?? && isDo>\n CONCAT(\'${modelName}/list.do?style=${appTemplate!\"\"}&typeid=\', category.category_id) as typelink,\n <#else>\n (SELECT CONCAT(category_path,\'/index.html\')) AS typelink,\n \n content_description AS descrip,\n content_hit AS hit,\n content_type AS flag,\n cms_content.content_keyword AS keyword,\n content_img AS litpic,\n\n <#--内容页动态链接-->\n <#if isDo?? && isDo>\n CONCAT(\'${modelName}/view.do?style=${appTemplate!\"\"}&id=\', cms_content.id) as \"link\",\n <#else>\n CONCAT(category.category_path,\'/\',cms_content.id,\'.html\') AS \"link\",\n \n\n <#if tableName??>${tableName}.*,\n content_datetime AS \"date\"\nFROM\n cms_content LEFT JOIN cms_category as category\nON cms_content.category_id = category.id\n\n <#--判断是否有自定义模型表-->\n <#if tableName??>\n LEFT JOIN ${tableName} ON ${tableName}.link_id=cms_content.id\n \nWHERE\n progress_status=\'终审通过\'\n and content_display=0\n and cms_content.del=0\n\n <#--gov 判断发布到-->\n <#if style?? >\n and(\n <#list style?split(\',\') as item>\n <#if item?index gt 0> or\n FIND_IN_SET(\'${item}\',cms_content.content_style)\n )\n \n <#--根据站点编号查询-->\n <#if appId?? >\n and cms_content.app_id=${appId}\n and cms_content.id>0\n \n <#--判断是否有搜索分类集合-->\n <#if search?? && _typeid==\"\">\n <#if search.categoryIds?has_content>and FIND_IN_SET(category.id,\'${search.categoryIds}\')\n <#--标题-->\n <#if search.content_title??> and content_title like CONCAT(\'%\',\'${search.content_title}\',\'%\')\n <#--作者-->\n <#if search.content_author??> and content_author like CONCAT(\'%\',\'${search.content_author}\',\'%\')\n <#--来源-->\n <#if search.content_source??> and content_source like CONCAT(\'%\',\'${search.content_source}\',\'%\')\n <#--属性-->\n <#if search.content_type??> and (\n <#list search.content_type?split(\',\') as item>\n <#if item?index gt 0> or\n FIND_IN_SET(\'${item}\',cms_content.content_type)\n )\n \n\n <#--描述-->\n <#if search.content_description??>\n and content_description like CONCAT(\'%\',\'${search.content_description}\',\'%\')\n \n\n <#--关键字-->\n <#if search.content_keyword??> and content_keyword like CONCAT(\'%\',\'${search.content_keyword}\',\'%\')\n\n <#--内容-->\n <#if search.content_details??> and content_details like CONCAT(\'%\',\'${search.content_details}\',\'%\')\n\n <#--自定义顺序-->\n <#if search.content_sort??> and content_sort=${search.content_sort}\n <#--时间范围-->\n <#if search.content_datetime_start??&&search.content_datetime_end??>\n and content_datetime between \'${search.content_datetime_start}\' and \'${search.content_datetime_end}\'\n \n <#else>\n <#--查询栏目-->\n <#if _typeid?has_content>\n and (cms_content.category_id=${_typeid}\n or FIND_IN_SET(\'${_typeid}\', cms_content.category_ids)\n or cms_content.category_id in (select id FROM cms_category where cms_category.del=0\n <#if _typetitle?has_content>\n and cms_category.category_title=\'${_typetitle}\' and FIND_IN_SET(${_typeid},CATEGORY_PARENT_IDS)))\n \n \n <#--标题-->\n <#if content_title??> and content_title like CONCAT(\'%\',\'${content_title}\',\'%\')\n <#--作者-->\n <#if content_author??> and content_author like CONCAT(\'%\',\'${content_author}\',\'%\')\n <#--来源-->\n <#if content_source??> and content_source like CONCAT(\'%\',\'${content_source}\',\'%\')\n <#--属性-->\n <#if content_type??> and content_type like CONCAT(\'%\',\'${content_type}\',\'%\')\n <#--描述-->\n <#if content_description??> and content_description like CONCAT(\'%\',\'${content_description}\',\'%\')\n <#--关键字-->\n <#if content_keyword??> and content_keyword like CONCAT(\'%\',\'${content_keyword}\',\'%\')\n <#--内容-->\n <#if content_details??> and content_details like CONCAT(\'%\',\'${content_details}\',\'%\')\n <#--自定义顺序-->\n <#if content_sort??> and content_sort=${content_sort}\n <#--自定义模型-->\n <#if diyModel??>\n <#list diyModel as dm>\n <#assign json=\"${dm}\"?eval />\n and ${tableName}.${json.key} like CONCAT(\'%\',\'${json.value}\',\'%\')\n \n \n <#--文章属性-->\n <#if flag?? >\n and(\n <#list flag?split(\',\') as item>\n <#if item?index gt 0> or\n FIND_IN_SET(\'${item}\',cms_content.content_type)\n )\n \n <#if noflag??>\n and(\n <#list noflag?split(\',\') as item>\n <#if item?index gt 0> and\n FIND_IN_SET(\'${item}\',cms_content.content_type)=0\n or cms_content.content_type is null)\n \n\n <#--字段排序-->\n <#if orderby?? >\nORDER BY\n <#if orderby==\'date\'> content_datetime\n <#elseif orderby==\'updatedate\'> content_updatetime\n <#elseif orderby==\'hit\'> content_hit\n <#elseif orderby==\'sort\'> content_sort\n <#else>\n cms_content.id\n \n <#else>\nORDER BY cms_content.id\n \n\n <#if order?? >\n <#if order==\'desc\'> desc\n <#if order==\'asc\'> asc\n <#else>\n desc\n \n LIMIT\n <#--判断是否分页-->\n <#if ispaging?? && (pageTag.pageNo)??>\n ${((pageTag.pageNo-1)*_size?eval)?c},${_size?default(20)}\n <#else>\n ${_size?default(20)}\n \n', NULL, '文章列表', NULL, NULL, NULL, NULL, 0, 1); INSERT INTO `mdiy_tag` VALUES (4, 'channel', 'list', '<#assign _typeid=\'0\'/>\n<#if column?? && column.id?? && column.id?number gt 0>\n <#assign _typeid=\'${column.id}\'>\n <#assign selfid=\'${column.id}\'>\n\n\n<#if typeid??>\n <#assign _typeid=\'${typeid}\'>\n\n\nselect\n id,\n id as typeid,\n category_title as typetitle,\n <#--动态链接-->\n <#if isDo?? && isDo>\n CONCAT(\'/${modelName}/list.do?typeid=\', id) as typelink,\n <#else>\n <#--栏目类型为链接-->\n CONCAT(category_path,\'/index.html\') as typelink,\n \n category_keyword as typekeyword,\n category_diy_url as typeurl,\n category_flag as flag,\n category_parent_ids as parentids,\n category_descrip as typedescrip,\n category_type as type,\n category_path as typepath,\n leaf as typeleaf,\n category_img as typelitpic ,\n ( SELECT count(*) FROM cms_category cc WHERE cc.category_id = cms_category.id AND cc.del = 0 ) AS childsize \n from cms_category\n where\n cms_category.del=0\n <#--根据站点编号查询-->\n <#if appId?? >\n and cms_category.app_id=${appId}\n \n\n <#--栏目属性-->\n <#if flag?? >\n and\n (<#list flag?split(\',\') as item>\n <#if item?index gt 0> or\n FIND_IN_SET(\'${item}\',category_flag)\n )\n \n\n <#if noflag?? >\n and\n (<#list noflag?split(\',\') as item>\n <#if item?index gt 0> and\n FIND_IN_SET(\'${item}\',category_flag)=0\n or category_flag is null)\n \n\n <#--type默认son-->\n <#if !type??||!type?has_content>\n <#assign type=\'son\'/>\n \n\n <#if type?has_content>\n <#--顶级栏目(单个)-->\n <#if type==\'top\'>\n <#if _typeid != \'0\'>\n and (id = top_id or top_id = 0)\n \n\n <#elseif type==\'nav\'>\n and(category_id=0 or category_id is null)\n\n <#--同级栏目(多个)-->\n <#elseif type==\'level\'>\n and\n <#if _typeid != \'0\'>\n category_id=(select category_id from cms_category where id=${_typeid})\n <#else>\n 1=1\n \n\n <#--当前栏目(单个)-->\n <#elseif type==\'self\'>\n and\n <#if _typeid != \'0\'>\n id=${_typeid}\n <#else>\n 1=1\n \n\n <#--当前栏目的所属栏目(多个)-->\n <#elseif type==\'path\'>\n and\n <#if _typeid != \'0\'>\n id in (<#if column?? && column.categoryParentIds??>${column.categoryParentIds},${_typeid})\n <#else>\n 1=1\n \n <#--子栏目(多个)-->\n\n <#elseif type==\'son\'>\n and\n <#if _typeid != \'0\'>\n category_id=${_typeid}\n <#else>\n 1=1\n \n\n <#--上一级栏目没有则取当前栏目(单个)-->\n <#elseif type==\'parent\'>\n and\n <#if _typeid != \'0\'>\n <#if column?? && column.categoryId??>\n id=${column.categoryId}\n <#else>\n id=${_typeid}\n \n <#else>\n 1=1\n \n \n\n<#else> <#--默认顶级栏目-->\n and\n <#if _typeid != \'0\'>\n id=${_typeid}\n <#else>\n (category_id=0 or category_id is null)\n \n\n\n\n<#--字段排序-->\n<#if orderby?? >\n ORDER BY\n <#if orderby==\'date\'> category_datetime\n <#elseif orderby==\'sort\'> category_sort\n <#else>id\n\n\n<#if order?? >\n <#if order==\'desc\'> desc\n <#if order==\'asc\'> asc\n', NULL, '通用栏目', NULL, NULL, NULL, NULL, 0, 1); INSERT INTO `mdiy_tag` VALUES (5, 'global', 'single', 'select\nAPP_NAME as name,\napp_logo as logo,\napp_keyword as keyword,\napp_description as descrip,\napp_copyright as copyright,\n<#--动态解析 -->\n<#if isDo?? && isDo>\nCONCAT(\'${url}\',\'${html}/\',app_dir) as url,\n\'${url}\' as host,\n<#--使用地址栏的域名 -->\n<#elseif url??>\nCONCAT(\'${url}\',\'${html}/\',app_dir) as url,\n\'${url}\' as host,\n<#else>\nCONCAT(REPLACE(REPLACE(TRIM(substring_index(app_url,\'\\n\',1)), CHAR(10),\'\'), CHAR(13),\'\'),\'/html/\',app_dir) as url,\nREPLACE(REPLACE(TRIM(substring_index(app_url,\'\\n\',1)), CHAR(10),\'\'), CHAR(13),\'\') as host,\n\nCONCAT(\'template/\',id,\'/\',app_style) as \"style\" <#-- 判断是否为手机端 -->\nfrom app\n<#--根据站点编号查询-->\n<#if appId?? >\n where id = ${appId}\n', NULL, '全局', NULL, NULL, NULL, NULL, 0, 1); INSERT INTO `mdiy_tag` VALUES (7, 'field', 'single', 'SELECT\ncms_content.id as id,\ncontent_title as title,\ncontent_author as author, \ncontent_source as source, \ncontent_details as content,\ncms_category.id as typeid,\ncms_category.leaf as typeleaf,\ncms_category.category_title as typetitle,\ncms_category.category_img AS typelitpic,\ncms_category.top_id as topId,\ncms_category.category_flag as typeflag,\ncms_category.category_parent_ids as parentids,\ncms_category.category_keyword as typekeyword,\ncms_category.category_descrip as typedescrip,\ncms_category.category_diy_url as typeurl,\n<#--动态链接-->\n<#if isDo?? && isDo>\nCONCAT(\'/${modelName}/list.do?typeid=\', cms_category.id) as typelink,\n<#else>\n <#--栏目类型为链接-->\n CONCAT(cms_category.category_path,\'/index.html\') as typelink,\n\ncms_content.content_img AS litpic,\n<#--内容页动态链接-->\n<#if isDo?? && isDo>\nCONCAT(\'/mcms/view.do?id=\', cms_content.id) as \"link\",\n<#else>\nCONCAT(cms_category.category_path,\'/\',cms_content.id,\'.html\') AS \"link\",\n\ncontent_datetime as \"date\",\ncontent_description as descrip,\nCONCAT(\'\') as hit,\ncontent_type as flag,\ncategory_title as typetitle,\n<#if tableName??>${tableName}.*,\ncontent_keyword as keyword\nFROM cms_content\nLEFT JOIN cms_category ON\ncms_category.id = cms_content.category_id\n<#--判断是否有自定义模型表-->\n<#if tableName??>left join ${tableName} on ${tableName}.link_id=cms_content.id\nWHERE\n<#--如果是栏目列表页没有文章id所以只取栏目id-->\n<#if column??&&column.id??&&!id??>\ncms_category.id=${column.id} and\n\n cms_content.del=0\n<#if id??> and cms_content.id=${id}', NULL, '文章内容', NULL, NULL, NULL, NULL, 0, 1); @@ -587,7 +567,7 @@ CREATE TABLE `model` ( KEY `idx_model_id` (`model_id`) USING BTREE, KEY `idx_model_title` (`model_title`,`model_url`), CONSTRAINT `fk_model_id` FOREIGN KEY (`model_id`) REFERENCES `model` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION -) ENGINE=InnoDB AUTO_INCREMENT=1764 DEFAULT CHARSET=utf8 COMMENT='模块表'; +) ENGINE=InnoDB AUTO_INCREMENT=1768 DEFAULT CHARSET=utf8 COMMENT='模块表'; -- ---------------------------- -- Records of model @@ -667,6 +647,9 @@ INSERT INTO `model` VALUES (1730, 1724, '1700,1724', '162143180100032708', '新 INSERT INTO `model` VALUES (1731, 1724, '1700,1724', '162143181700031623', '删除业务数据', 'mdiy:formData:del', 'icon-caidan', 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); INSERT INTO `model` VALUES (1732, 1724, '1700,1724', '162143576500025187', '更新业务数据', 'mdiy:formData:update', 'icon-caidan', 0, 0, NULL, '2021-05-25 22:07:10', NULL, NULL, NULL, NULL, 0); INSERT INTO `model` VALUES (1733, 1713, '1700,1713', '', '更新数据', 'mdiy:configData:update', '', 0, 0, '', '2021-12-28 22:05:33', '57', '2021-12-28 22:06:19', '', '2021-12-28 22:05:33', 0); +INSERT INTO `model` VALUES (1764, 406, '406', '409', '查看', 'role:view', NULL, 0, 0, NULL, '2022-05-07 14:12:58', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1765, 86, '86', '12010004', '查看', 'app:view', NULL, 0, 0, NULL, '2022-05-07 14:13:36', NULL, NULL, NULL, NULL, 0); +INSERT INTO `model` VALUES (1767, 87, '84,87', '12010004', '查看', 'template:view', '', 0, 0, '', '2022-05-07 14:17:03', '57', '2022-05-07 14:17:18', '', NULL, 0); COMMIT; -- ---------------------------- @@ -814,6 +797,9 @@ INSERT INTO `role_model` VALUES (1707, 48); INSERT INTO `role_model` VALUES (1713, 48); INSERT INTO `role_model` VALUES (1719, 48); INSERT INTO `role_model` VALUES (1724, 48); +INSERT INTO `role_model` VALUES (1764, 48); +INSERT INTO `role_model` VALUES (1765, 48); +INSERT INTO `role_model` VALUES (1767, 48); COMMIT; SET FOREIGN_KEY_CHECKS = 1;