diff --git a/doc/5.3.2-up-5.3.3.sql b/doc/5.3.2-up-5.3.3.sql deleted file mode 100644 index dbcea30b..00000000 --- a/doc/5.3.2-up-5.3.3.sql +++ /dev/null @@ -1,42 +0,0 @@ - -SET NAMES utf8mb4; -SET FOREIGN_KEY_CHECKS = 0; - --- ---------------------------- --- Table structure for mdiy_tag --- ---------------------------- -DROP TABLE IF EXISTS `mdiy_tag`; -CREATE TABLE `mdiy_tag` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `tag_name` varchar(255) DEFAULT NULL COMMENT '标签名称', - `tag_type` varchar(255) DEFAULT NULL COMMENT '标签类型', - `tag_sql` text COMMENT '标签sql', - `tag_class` varchar(255) DEFAULT NULL COMMENT '标签类', - `tag_description` varchar(255) DEFAULT NULL COMMENT '描述', - `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 '删除标记', - `NOT_DEL` int(1) DEFAULT '0' COMMENT '1为不能删除,主要用于系统默认数据,0为一般数据,主要是前端控制', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='标签'; - --- ---------------------------- --- Records of mdiy_tag --- ---------------------------- -BEGIN; -INSERT INTO `mdiy_tag` (`id`, `tag_name`, `tag_type`, `tag_sql`, `tag_class`, `tag_description`, `UPDATE_BY`, `UPDATE_DATE`, `CREATE_BY`, `CREATE_DATE`, `DEL`, `NOT_DEL`) VALUES (3, 'arclist', 'list', '<#assign _typeid=\'\'/>\n<#assign _typetitle=\'\'/>\n<#-- 分页数,默认返回20条数据 -->\n<#assign _size=\'20\'/>\n<#if column?? && column.id?? && column.id?number gt 0>\n <#assign _typeid=\'${column.id}\'>\n\n<#if typeid??>\n <#assign _typeid=\'${typeid}\'>\n\n<#if typetitle??>\n <#assign _typetitle=\'${typetitle}\'>\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=\'cms_content.update_date\'>\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.content_datetime\'>\n \n<#else>\n <#assign _orderby=\'cms_content.content_datetime\'>\n\n\nSELECT\n cms_content.id AS \"id\",\n content_title AS \"title\",\n content_short_title AS \"shorttitle\",\n content_author AS \"author\",\n content_source AS \"source\",\n content_out_link AS \"outlink\",\n\n category.category_title AS \"typetitle\",\n category.category_short_title AS \"typeshorttitle\",\n category.id AS \"typeid\",\n category.category_path AS \"typepath\",\n category.category_img AS \"typelitpic\",\n category.category_ico AS \"typeico\",\n category.category_keyword as \"typekeyword\",\n category.top_id as \"topid\",\n category.category_id as \"parentid\",\n category.category_parent_ids as \"parentids\",\n category.category_type AS \"type\",\n <#--列表页动态链接-->\n <#if isDo?? && isDo>\n CONCAT(\'${modelName}/list.do?style=${templateName!\"\"}&typeid=\', category.category_id) as \"typelink\",\n <#else>\n <#--栏目类型为链接-->\n <#if shortSwitch?? && shortSwitch>\n CONCAT(category.category_pinyin,\'.html\') AS \"typelink\",\n <#else>\n CONCAT(category.category_path,\'/index.html\') AS \"typelink\",\n \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 <#if isDo?? && isDo>\n CONCAT(\'${modelName}/view.do?style=${templateName!\"\"}&id=\', cms_content.id) as \"link\",\n <#else>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(cms_content.id,\'.html\') AS \"link\",\n <#else>\n CONCAT(CONCAT( category.category_path, \'/\' ), CONCAT(CASE category_type WHEN \'2\' THEN \'index\' ELSE cms_content.id END , \'.html\' )) as \"link\",\n \n \n <#if tableName??>${tableName}.*,\n content_datetime AS \"date\"\nFROM\n cms_content\nLEFT JOIN\n cms_category as category\nON cms_content.category_id = category.id\n<#--判断是否有自定义模型表-->\n<#if tableName??>\n LEFT JOIN ${tableName} ON ${tableName}.link_id=cms_content.id\n\nWHERE\n content_display=0\n and category_display=\'enable\'\n and cms_content.del=0\n\n<#--文章审核-->\n<#if contentApprove?? && contentApprove>\n and cms_content.progress_status=\'终审通过\'\n\n<#--根据站点编号查询-->\n<#if appId?? >\n and cms_content.app_id=${appId}\n and cms_content.id>0\n\n<#--判断是否有搜索分类集合,暂时移除 _typeid=\"\" 条件-->\n<#if search??>\n and category_is_search=\'enable\'\n <#-- 文章标签 -->\n <#if search.content_tag??>and FIND_IN_SET(\'${search.content_tag}\',content_tags) > 0\n <#if search.categoryIds?has_content>and FIND_IN_SET(category.id,\'${search.categoryIds}\') > 0\n <#--标题-->\n <#if search.content_title??> and content_title like CONCAT(CONCAT(\'%\',\'${search.content_title}\'),\'%\')\n <#--作者-->\n <#if search.content_author??> and content_author like CONCAT(CONCAT(\'%\',\'${search.content_author}\'),\'%\')\n <#--来源-->\n <#if search.content_source??> and content_source like CONCAT(CONCAT(\'%\',\'${search.content_source}\'),\'%\')\n <#--属性-->\n <#if search.content_type??>\n and(<#list search.content_type?split(\',\') as item>\n <#if item?index gt 0> or\n FIND_IN_SET(\'${item}\',cms_content.content_type) > 0\n )\n \n <#--描述-->\n <#if search.content_description??>\n and content_description like CONCAT(CONCAT(\'%\',\'${search.content_description}\'),\'%\')\n \n <#--关键字-->\n <#if search.content_keyword??> and content_keyword like CONCAT(CONCAT(\'%\',\'${search.content_keyword}\'),\'%\')\n <#--内容-->\n <#if search.content_details??> and content_details like CONCAT(CONCAT(\'%\',\'${search.content_details}\'),\'%\')\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 && _typeid?string != \'0\'>\n and (cms_content.category_id=${_typeid}\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}\'\n \n and FIND_IN_SET(${_typeid},CATEGORY_PARENT_IDS) > 0))\n <#elseif typeids?has_content>\n and (\n <#list typeids?split(\",\") as item>\n <#if item.index > 1>\n or\n \n (cms_content.category_id=${item}\n or FIND_IN_SET(\'${item}\', cms_content.category_ids) > 0\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}\'\n \n and FIND_IN_SET(${item},CATEGORY_PARENT_IDS) > 0)\n )\n \n )\n \n\n<#--判断搜索分类结束-->\n<#--标题-->\n<#if content_title??> and content_title like CONCAT(CONCAT(\'%\',\'${content_title}\'),\'%\')\n<#--作者-->\n<#if content_author??> and content_author like CONCAT(CONCAT(\'%\',\'${content_author}\'),\'%\')\n<#--来源-->\n<#if content_source??> and content_source like CONCAT(CONCAT(\'%\',\'${content_source}\'),\'%\')\n<#--属性-->\n<#if content_type??> and content_type like CONCAT(CONCAT(\'%\',\'${content_type}\'),\'%\')\n<#--描述-->\n<#if content_description??> and content_description like CONCAT(CONCAT(\'%\',\'${content_description}\'),\'%\')\n<#--关键字-->\n<#if content_keyword??> and content_keyword like CONCAT(CONCAT(\'%\',\'${content_keyword}\'),\'%\')\n<#--内容-->\n<#if content_details??> and content_details like CONCAT(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(CONCAT(\'%\',\'${json.value}\'),\'%\')\n \n\n<#--文章属性-->\n<#if flag?? >\n and(<#list flag?split(\',\') as item>\n <#if item?index gt 0> or\n FIND_IN_SET(\'${item}\',cms_content.content_type) > 0\n )\n\n<#if noflag??>\n and(<#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 ORDER BY\n <#if topflag??>\n CASE\n <#list topflag?split(\",\") as item>\n WHEN FIND_IN_SET(\'${item}\',cms_content.content_type)>0 THEN\n ${item?index}\n \n ELSE 100\n END,\n \n ${_orderby}\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` (`id`, `tag_name`, `tag_type`, `tag_sql`, `tag_class`, `tag_description`, `UPDATE_BY`, `UPDATE_DATE`, `CREATE_BY`, `CREATE_DATE`, `DEL`, `NOT_DEL`) VALUES (4, 'channel', 'list', '<#assign _typeid=\'0\'/>\n<#assign _size=\'9999\'/>\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<#if size??>\n <#assign _size=\'${size}\'>\n\n\nselect\n cms_category.id as \"id\",\n cms_category.id as \"typeid\",\n cms_category.category_title as \"typetitle\",\n cms_category.category_short_title as \"typeshorttitle\",\n <#--动态链接-->\n <#if isDo?? && isDo>\n IF(cms_category.category_type=2,CONCAT(\'${modelName}/view.do?style=${templateName!\"\"}&typeid=\', cms_category.id),CONCAT(\'${modelName}/list.do?style=${templateName!\"\"}&typeid=\', cms_category.id)) as \"typelink\",\n <#else>\n <#--栏目类型为链接-->\n <#if shortSwitch?? && shortSwitch>\n CONCAT(cms_category.category_pinyin,\'.html\') AS \"typelink\",\n <#else>\n CONCAT(cms_category.category_path,\'/index.html\') as \"typelink\",\n \n \n cms_category.category_keyword as \"typekeyword\",\n cms_category.category_diy_url as \"typeurl\",\n cms_category.category_flag as \"flag\",\n cms_category.category_id as \"parentid\",\n cms_category.category_parent_ids as \"parentids\",\n cms_category.category_descrip as \"typedescrip\",\n cms_category.category_type as \"type\",\n cms_category.category_path as \"typepath\",\n cms_category.leaf as \"typeleaf\",\n cms_category.category_img as \"typelitpic\" ,\n cms_category.category_ico as \"typeico\" ,\n <#if tableName??>${tableName}.*,\n ( SELECT count(*) FROM cms_category cc WHERE cc.category_id = cms_category.id AND cc.del = 0 ) AS \"childsize\"\nfrom\n cms_category\n <#--判断是否有自定义模型表-->\n <#if tableName??>LEFT JOIN ${tableName} ON ${tableName}.link_id=cms_category.id\nwhere\n cms_category.del=0\n and cms_category.category_display = \'enable\'\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 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}\',cms_category.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}\',cms_category.category_flag)=0\n or cms_category.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 (cms_category.id = cms_category.top_id or cms_category.top_id = 0)\n \n\n <#elseif type==\'nav\'>\n and(cms_category.category_id=0 or cms_category.category_id is null)\n\n <#--同级栏目(多个)-->\n <#elseif type==\'level\'>\n <#if _typeid != \'0\'>\n and cms_category.category_id=(select category_id from cms_category where id=${_typeid})\n \n\n <#--当前栏目(单个)-->\n <#elseif type==\'self\'>\n <#if _typeid != \'0\'>\n and cms_category.id=${_typeid}\n \n\n <#--当前栏目的所属栏目(多个)-->\n <#elseif type==\'path\'>\n <#if _typeid != \'0\'>\n and cms_category.id in\n (<#if column?? && column.categoryParentIds??>${column.categoryParentIds},${_typeid})\n \n\n <#--子栏目(多个)-->\n <#elseif type==\'son\'>\n <#if _typeid != \'0\'>\n and cms_category.category_id=${_typeid}\n \n\n <#--上一级栏目没有则取当前栏目(单个)-->\n <#elseif type==\'parent\'>\n <#if _typeid != \'0\'>\n and\n <#if column?? && column.categoryId??>\n cms_category.id=${column.categoryId}\n <#else>\n cms_category.id=${_typeid}\n \n \n \n\n <#else> <#--默认顶级栏目-->\n and\n <#if _typeid != \'0\'>\n cms_category.id=${_typeid}\n <#else>\n (cms_category.category_id=0 or cms_category.category_id is null)\n \n \n\n <#--字段排序-->\n <#if type == \'path\'>\n ORDER BY cms_category.category_path asc\n <#else>\n <#if orderby?? >\n ORDER BY\n <#if orderby==\'date\'> cms_category.create_date\n <#elseif orderby==\'sort\'> cms_category.category_sort\n <#else>cms_category.id\n \n \n\n <#if order?? >\n <#if order==\'desc\'> desc\n <#if order==\'asc\'> asc\n \n \n LIMIT\n ${_size?default(9999)}', NULL, '通用栏目', NULL, NULL, NULL, NULL, 0, 1); -INSERT INTO `mdiy_tag` (`id`, `tag_name`, `tag_type`, `tag_sql`, `tag_class`, `tag_description`, `UPDATE_BY`, `UPDATE_DATE`, `CREATE_BY`, `CREATE_DATE`, `DEL`, `NOT_DEL`) VALUES (5, 'global', 'single', 'select\n APP_NAME as \"name\",\n app_logo as \"logo\",\n app_keyword as \"keyword\",\n app_description as \"descrip\",\n app_copyright as \"copyright\",\n \'${contextPath}\' as \"contextpath\",\n <#--动态解析 -->\n <#if isDo?? && isDo>\n \'${url}\' as \"url\",\n \'${url}\' as \"host\",\n \'/\' as \"html\",\n <#--使用地址栏的域名 -->\n <#else>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(\'${url}\',\'${appDir}<#if appDir?has_content>/\') as \"url\",\n \'<#if appDir?has_content>/${appDir}/\' as \"html\",\n <#else>\n CONCAT(CONCAT(\'${url}\',\'${html}\'),\'<#if appDir?has_content>/${appDir}\') as \"url\",\n CONCAT(CONCAT(\'/${html}\',\'<#if appDir?has_content>/${appDir}\'),\'/\') as \"html\",\n \n \'${url}\' as \"host\",\n \n CONCAT(CONCAT(CONCAT(CONCAT(\'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` (`id`, `tag_name`, `tag_type`, `tag_sql`, `tag_class`, `tag_description`, `UPDATE_BY`, `UPDATE_DATE`, `CREATE_BY`, `CREATE_DATE`, `DEL`, `NOT_DEL`) VALUES (7, 'field', 'single', 'SELECT\n cms_content.id as \"id\",\n <#--这里会存在id覆盖的情况,所以需要在cms_content.id下面-->\n <#if tableName??>${tableName}.*,\n <#--查询站点编号-->\n <#if appId??>\n cms_content.app_id as \"appId\",\n \n content_title as \"title\",\n content_short_title AS \"shorttitle\",\n content_author as \"author\",\n content_source as \"source\",\n content_details as \"content\",\n content_datetime as \"date\",\n content_description as \"descrip\",\n content_keyword as \"keyword\",\n <#if contextPath?? && contextPath != \"/\">\n CONCAT(CONCAT( \'\') as \"hit\",\n <#else>\n CONCAT(CONCAT( \'\') as \"hit\",\n \n content_type as \"flag\",\n category_title as \"typetitle\",\n cms_content.content_img as \"litpic\",\n <#--内容页动态链接-->\n <#if isDo?? && isDo>\n CONCAT(\'/mcms/view.do?id=\', cms_content.id) as \"link\",\n <#else>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(cms_content.id, \'.html\' ) as \"link\",\n <#else>\n CONCAT(CONCAT( cms_category.category_path, \'/\' ), CONCAT(cms_content.id, \'.html\' )) as \"link\",\n \n \n cms_category.id as \"typeid\",\n cms_category.leaf as \"typeleaf\",\n cms_category.category_title as \"typetitle\",\n cms_category.category_short_title AS \"typeshorttitle\",\n cms_category.category_img as \"typelitpic\",\n cms_category.category_ico as \"typeico\",\n cms_category.category_path as \"typepath\",\n cms_category.top_id as \"topid\",\n cms_category.category_flag as \"typeflag\",\n cms_category.category_id as \"parentid\",\n cms_category.category_parent_ids as \"parentids\",\n cms_category.category_keyword as \"typekeyword\",\n cms_category.category_descrip as \"typedescrip\",\n <#--动态链接-->\n <#if isDo?? && isDo>\n CONCAT(\'/${modelName}/list.do?typeid=\', cms_category.id) as \"typelink\"\n <#else>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(category_pinyin,\'.html\') AS \"typelink\"\n <#else>\n CONCAT(category_path,\'/index.html\') AS \"typelink\"\n \n \n\nFROM cms_content\n LEFT JOIN cms_category ON\n cms_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??>\n cms_category.id=${column.id} and\n \n <#--根据站点编号查询-->\n <#if appId??>\n cms_content.app_id = ${appId} and\n \n cms_content.del=0\n <#if id??> and cms_content.id=${id}\n', NULL, '文章内容', NULL, NULL, NULL, NULL, 0, 1); -INSERT INTO `mdiy_tag` (`id`, `tag_name`, `tag_type`, `tag_sql`, `tag_class`, `tag_description`, `UPDATE_BY`, `UPDATE_DATE`, `CREATE_BY`, `CREATE_DATE`, `DEL`, `NOT_DEL`) VALUES (8, 'pre', 'single', '<#assign select=\"\'\'\"/>\n<#if orderby?? >\n <#if orderby==\"date\">\n <#assign _orderby=\"content_datetime\">\n <#elseif orderby==\"updatedate\">\n <#assign _orderby=\"cms_content.update_date\">\n <#elseif orderby==\"hit\">\n <#assign _orderby=\"content_hit\">\n <#elseif orderby==\"sort\">\n <#assign _orderby=\"content_sort\">\n <#else><#assign _orderby=\"cms_content.id\">\n<#else>\n <#assign _orderby=\"cms_content.id\">\n\n<#--上一页-->\n<#if pageTag.preId??>\n SELECT\n cms_content.id as \"id\",\n content_title as \"title\",\n content_author as \"author\",\n content_source as \"source\",\n content_details as \"content\",\n category.category_title as \"typename\",\n category.category_id as \"typeid\",\n <#if isDo?? && isDo>\n CONCAT(\'/${modelName}/list.do?typeid=\', cms_category.id) as \"typelink\",\n <#else>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(category.category_pinyin,\'.html\') AS \"typelink\",\n <#else>\n CONCAT(category.category_path,\'/index.html\') AS \"typelink\",\n \n \n content_img as \"litpic\",\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 <#if shortSwitch?? && shortSwitch>\n CONCAT(cms_content.id,\'.html\') AS \"link\",\n <#else>\n CONCAT(CONCAT(category_path,\'/\'),CONCAT(cms_content.id,\'.html\')) AS \"link\",\n \n \n content_description as \"descrip\",\n content_hit as \"hit\",\n content_type as \"flag\",\n content_keyword as \"keyword\"\n FROM cms_content\n LEFT JOIN cms_category category ON cms_content.category_id=category.id\n WHERE cms_content.id=${pageTag.preId}\n<#else>\n SELECT\n ${select} as \"id\",\n \'没有了\' as \"title\",\n ${select} as \"author\",\n ${select} as \"source\",\n ${select} as \"content\",\n ${select} as \"typename\",\n ${select} as \"typeid\",\n ${select} as \"typelink\",\n ${select} as \"litpic\",\n ${select} as \"typelink\",\n ${select} as \"date\",\n ${select} as \"descrip\",\n ${select} as \"hit\",\n ${select} as \"flag\",\n ${select} as \"keyword\"\n FROM dual\n\n', NULL, '文章上一篇', NULL, NULL, NULL, NULL, 0, 1); -INSERT INTO `mdiy_tag` (`id`, `tag_name`, `tag_type`, `tag_sql`, `tag_class`, `tag_description`, `UPDATE_BY`, `UPDATE_DATE`, `CREATE_BY`, `CREATE_DATE`, `DEL`, `NOT_DEL`) VALUES (9, 'page', 'single', '<#if pageTag??>\nselect\n <#--是否开启短链接-->\n <#if shortSwitch?? && shortSwitch>\n \'${shortSwitch?string(\'true\',\'false\')}\' as \"shortSwitch\",\n \n <#if !(pageTag.indexUrl??)>\n <#--判断是否有栏目对象,用于搜索不传栏目-->\n <#if column??>\n <#if shortSwitch?? && shortSwitch>\n <#assign path=column.categoryPinyin/>\n <#else>\n <#assign path=column.categoryPath/>\n \n <#else>\n <#assign path=\'\' />\n \n <#--总记录数、总页数-->\n \'${pageTag.total}\' as \"total\",\n \'${pageTag.size}\' as \"size\",\n\n <#--记录总数-->\n \'${pageTag.rcount}\' as \"rcount\",\n <#--当前页码-->\n \'${pageTag.pageNo}\' as \"cur\",\n <#--首页-->\n <#if shortSwitch?? && shortSwitch>\n CONCAT(\'${path}\', \'.html\') as \"index\",\n <#else>\n CONCAT(\'${path}\', \'/index.html\') as \"index\",\n \n <#--上一页-->\n <#if (pageTag.pageNo?eval-1) gt 1>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(\'${path}\',\'-${pageTag.pageNo?eval-1}.html\') as \"pre\",\n <#else>\n CONCAT(\'${path}\',\'/list-${pageTag.pageNo?eval-1}.html\') as \"pre\",\n \n <#else>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(\'${path}\',\'.html\') as \"pre\",\n <#else>\n CONCAT(\'${path}\',\'/index.html\') as \"pre\",\n \n \n <#--下一页-->\n <#if pageTag.total lte 1>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(\'${path}\', \'.html\') as \"next\",\n CONCAT(\'${path}\', \'.html\') as \"last\"\n <#else>\n CONCAT(\'${path}\', \'/index.html\') as \"next\",\n CONCAT(\'${path}\', \'/index.html\') as \"last\"\n \n <#else>\n <#if pageTag.pageNo?eval gte pageTag.total>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(\'${path}\',\'-${pageTag.total}.html\') as \"next\",\n <#else>\n CONCAT(\'${path}\',\'/list-${pageTag.total}.html\') as \"next\",\n \n <#else>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(\'${path}\',\'-${pageTag.pageNo?eval+1}.html\') as \"next\",\n <#else>\n CONCAT(\'${path}\',\'/list-${pageTag.pageNo?eval+1}.html\') as \"next\",\n \n \n <#--最后一页-->\n <#if shortSwitch?? && shortSwitch>\n CONCAT(\'${path}\',\'-${pageTag.total}.html\') as \"last\"\n <#else>\n CONCAT(\'${path}\',\'/list-${pageTag.total}.html\') as \"last\"\n \n \n <#else>\n <#--判断是否是搜索页面-->\n \'${pageTag.indexUrl}\' as \"index\",\n \'${pageTag.lastUrl}\' as \"last\",\n \'${pageTag.preUrl}\' as \"pre\",\n \'${pageTag.nextUrl}\' as \"next\",\n \'${pageTag.total}\' as \"total\",\n \'${pageTag.size}\' as \"size\",\n \'${pageTag.rcount}\' as \"rcount\",\n \'${pageTag.pageNo}\' as \"cur\"\n \n from dual\n', NULL, '通用分页', NULL, NULL, NULL, NULL, 0, 1); -INSERT INTO `mdiy_tag` (`id`, `tag_name`, `tag_type`, `tag_sql`, `tag_class`, `tag_description`, `UPDATE_BY`, `UPDATE_DATE`, `CREATE_BY`, `CREATE_DATE`, `DEL`, `NOT_DEL`) VALUES (10, 'next', 'single', '<#assign select=\"\'\'\"/>\n<#if orderby?? >\n <#if orderby==\"date\">\n <#assign _orderby=\"content_datetime\">\n <#elseif orderby==\"updatedate\">\n <#assign _orderby=\"cms_content.update_date\">\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 <#else>\n <#assign _orderby=\"cms_content.id\">\n \n<#--开始-->\n<#if pageTag.nextId??>\n SELECT\n cms_content.id as \"id\",\n content_title as \"title\",\n content_author as \"author\",\n content_source as \"source\",\n content_details as \"content\",\n category.category_title as \"typename\",\n category.category_id as \"typeid\",\n <#if isDo?? && isDo>\n CONCAT(\'/${modelName}/list.do?typeid=\', cms_category.id) as \"typelink\",\n <#else>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(category.category_pinyin,\'.html\') AS \"typelink\",\n <#else>\n CONCAT(category.category_path,\'/index.html\') AS \"typelink\",\n \n \n content_img as \"litpic\",\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 <#if shortSwitch?? && shortSwitch>\n CONCAT(cms_content.id,\'.html\') AS \"link\",\n <#else>\n CONCAT(CONCAT(category_path,\'/\'),CONCAT(cms_content.id,\'.html\')) AS \"link\",\n \n \n content_description as \"descrip\",\n content_hit as \"hit\",\n content_type as \"flag\",\n content_keyword as \"keyword\"\n FROM cms_content\n LEFT JOIN cms_category category ON cms_content.category_id=category.id\n WHERE cms_content.id=${pageTag.nextId}\n<#else>\n SELECT\n ${select} as \"id\",\n \'没有了\' as \"title\",\n ${select} as \"author\",\n ${select} as \"source\",\n ${select} as \"content\",\n ${select} as \"typename\",\n ${select} as \"typeid\",\n ${select} as \"typelink\",\n ${select} as \"litpic\",\n ${select} as \"link\",\n ${select} as \"date\",\n ${select} as \"descrip\",\n ${select} as \"hit\",\n ${select} as \"flag\",\n ${select} as \"keyword\"\n FROM dual\n\n', NULL, '文章下一篇', NULL, NULL, NULL, NULL, 0, 1); -INSERT INTO `mdiy_tag` (`id`, `tag_name`, `tag_type`, `tag_sql`, `tag_class`, `tag_description`, `UPDATE_BY`, `UPDATE_DATE`, `CREATE_BY`, `CREATE_DATE`, `DEL`, `NOT_DEL`) VALUES (11, 'diyform', 'macro', '<#macro ms_diyform formName>\n
\n
\n \n
\n \n \n \n \n \n \n \n \n \n \n
\n \n
\n 看不清?换一张\n
\n
\n
\n
\n \n \n {{isLoading ? \'保存中\' : \'保存\'}}\n \n \n
\n
\n\n', NULL, '智能表单', '57', '2022-11-15 16:10:49', NULL, NULL, 0, 1); -INSERT INTO `mdiy_tag` (`id`, `tag_name`, `tag_type`, `tag_sql`, `tag_class`, `tag_description`, `UPDATE_BY`, `UPDATE_DATE`, `CREATE_BY`, `CREATE_DATE`, `DEL`, `NOT_DEL`) VALUES (12, 'data', 'list', 'SELECT\n cms_content.id AS \"id\",\n content_title AS \"title\",\n content_author AS \"author\",\n content_source AS \"source\",\n content_details AS \"content\",\n content_out_link AS \"outlink\",\n content_short_title AS \"shorttitle\",\n category.category_title AS \"typetitle\",\n category.category_short_title AS \"typeshorttitle\",\n category.id AS \"typeid\",\n category.category_path AS \"typepath\",\n category.category_img AS \"typelitpic\",\n category.category_ico AS \"typeico\",\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 <#if isDo?? && isDo>\n CONCAT(\'/${modelName}/list.do?style=${templateName!\"\"}&typeid=\', category.category_id) AS \"typelink\",\n <#else>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(category_pinyin,\'.html\') AS \"typelink\",\n <#else>\n CONCAT(category_path,\'/index.html\') AS \"typelink\",\n \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 <#if isDo?? && isDo>\n CONCAT(\'/${modelName}/view.do?style=${templateName!\"\"}&id=\', cms_content.id) AS \"link\",\n <#else>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(cms_content.id,\'.html\') AS \"link\",\n <#else>\n CONCAT(CONCAT(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 category ON cms_content.category_id = category.id\n <#--判断是否有自定义模型表-->\n <#if tableName??>\n LEFT JOIN ${tableName} ON ${tableName}.link_id=cms_content.id\n \nWHERE\n content_display=0\n and category_display=\'enable\'\n and cms_content.del=0\n <#--根据站点编号查询-->\n <#if appId?? >\n and cms_content.app_id=${appId}\n \n and cms_content.id=${dataid}\n\n', NULL, '单篇', '57', '2022-11-15 16:10:49', NULL, NULL, 0, 1); -INSERT INTO `mdiy_tag` (`id`, `tag_name`, `tag_type`, `tag_sql`, `tag_class`, `tag_description`, `UPDATE_BY`, `UPDATE_DATE`, `CREATE_BY`, `CREATE_DATE`, `DEL`, `NOT_DEL`) VALUES (17, 'tag', 'single', '<#assign _typeid=\'0\'/>\n<#assign order=\'desc\'/>\n<#assign _size=\'99\'/>\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<#if size??>\n <#assign _size=\'${size}\'>\n\n\nSELECT\n GROUP_CONCAT( content_tags ) AS tags\nFROM\n cms_content\nLEFT JOIN cms_category ON cms_content.category_id = cms_category.id\nWHERE\n cms_category.category_display = \'enable\'\n AND cms_content.del = 0\n AND cms_content.content_display = 0\n AND LENGTH( cms_content.content_tags )>0\n <#if _typeid != \'0\'>\n AND (cms_category.id = ${_typeid} or FIND_IN_SET(${_typeid},cms_category.category_parent_ids))\n \n <#if appId??>\n AND cms_content.app_id = ${appId}\n \nORDER BY CONTENT_HIT DESC\nLimit ${_size}', '', '文章标签配置,不提供模板使用', '', '2023-06-12 17:26:19', '57', '2023-05-23 09:31:49', 57, 1); -INSERT INTO `mdiy_tag` (`id`, `tag_name`, `tag_type`, `tag_sql`, `tag_class`, `tag_description`, `UPDATE_BY`, `UPDATE_DATE`, `CREATE_BY`, `CREATE_DATE`, `DEL`, `NOT_DEL`) VALUES (18, 'tags', 'macro', '<#assign tags=\"\">\n<#macro ms_tags>\n <#if tag??>\n <#assign ___tags = tag.tags?split(\",\")>\n <#list ___tags as tag>\n <#list ___tags as _tag>\n <#if tag == _tag>\n <#if tag_index == _tag_index>\n <#assign tags+=tag+\",\">\n <#else>\n <#break>\n \n \n \n \n \n', '', '文章标签', '', '2023-06-12 17:26:21', '57', '2023-05-23 09:31:40', 57, 1); -COMMIT; - -SET FOREIGN_KEY_CHECKS = 1; diff --git a/pom.xml b/pom.xml index af8b7b5e..05130a98 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ 4.0.0 net.mingsoft ms-mcms - 5.3.3 + 5.3.4 ${project.groupId}:${project.artifactId} @@ -44,24 +44,24 @@ net.mingsoft ms-base - 2.1.22 + 2.1.23 net.mingsoft ms-basic - 2.1.22.1 + 2.1.23 net.mingsoft ms-mdiy - 2.1.22 + 2.1.23 net.mingsoft store-client - 2.1.22 + 2.1.23 com.github.oshi diff --git a/src/main/java/net/mingsoft/cms/action/BaseAction.java b/src/main/java/net/mingsoft/cms/action/BaseAction.java index 350d63af..4995cb0f 100755 --- a/src/main/java/net/mingsoft/cms/action/BaseAction.java +++ b/src/main/java/net/mingsoft/cms/action/BaseAction.java @@ -20,6 +20,8 @@ */ + + package net.mingsoft.cms.action; import java.util.MissingResourceException; diff --git a/src/main/java/net/mingsoft/cms/action/CategoryAction.java b/src/main/java/net/mingsoft/cms/action/CategoryAction.java index 50ff2c24..c054051d 100755 --- a/src/main/java/net/mingsoft/cms/action/CategoryAction.java +++ b/src/main/java/net/mingsoft/cms/action/CategoryAction.java @@ -7,10 +7,10 @@ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: - *

+ * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. - *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR @@ -20,6 +20,8 @@ */ + + package net.mingsoft.cms.action; import cn.hutool.core.io.file.FileNameUtil; @@ -74,6 +76,7 @@ public class CategoryAction extends BaseAction { * 返回主界面index * @return */ + @ApiIgnore @GetMapping("/index") @RequiresPermissions("cms:category:view") public String index() { @@ -102,6 +105,7 @@ public class CategoryAction extends BaseAction { * @param category 栏目 * @return */ + @ApiIgnore @GetMapping("/form") public String form(@ModelAttribute CategoryEntity category, ModelMap model) { model.addAttribute("appId", BasicUtil.getApp().getAppId()); @@ -261,10 +265,6 @@ public class CategoryAction extends BaseAction { return ResultData.build().error(getResString("err.length", this.getResString("category.title"), "1", "100")); } - // 判断前端拼音传值是否正常 - if (!StringUtil.checkLength(category.getCategoryPinyin() + "", 1, 100)) { - return ResultData.build().error(getResString("err.length", this.getResString("category.pinyin"), "1", "100")); - } if (!StringUtil.checkLength(category.getCategoryParentIds() + "", 0, 100)) { return ResultData.build().error(getResString("err.length", this.getResString("category.parent.id"), "1", "100")); } @@ -286,7 +286,7 @@ public class CategoryAction extends BaseAction { } String pingYin = PinYinUtil.getPingYin(category.getCategoryTitle()); //如果用户填写了拼音则使用用户填写的 - if (StrUtil.isNotBlank(category.getCategoryPinyin())) { + if (StrUtil.isNotBlank(category.getCategoryPinyin()) && StringUtil.checkLength(category.getCategoryPinyin() + "", 1, 100)) { pingYin = category.getCategoryPinyin(); } CategoryEntity categoryEntity = new CategoryEntity(); diff --git a/src/main/java/net/mingsoft/cms/action/ContentAction.java b/src/main/java/net/mingsoft/cms/action/ContentAction.java index e7b20da5..d58ff0c4 100755 --- a/src/main/java/net/mingsoft/cms/action/ContentAction.java +++ b/src/main/java/net/mingsoft/cms/action/ContentAction.java @@ -20,6 +20,8 @@ */ + + package net.mingsoft.cms.action; import io.swagger.annotations.Api; @@ -126,6 +128,7 @@ public class ContentAction extends BaseAction { /** * 返回编辑界面content_form */ + @ApiIgnore @GetMapping("/form") public String form(@ModelAttribute ContentEntity content, ModelMap model){ model.addAttribute("appId", BasicUtil.getApp().getAppId()); diff --git a/src/main/java/net/mingsoft/cms/action/GeneraterAction.java b/src/main/java/net/mingsoft/cms/action/GeneraterAction.java index d1d5523b..bb0d1df8 100755 --- a/src/main/java/net/mingsoft/cms/action/GeneraterAction.java +++ b/src/main/java/net/mingsoft/cms/action/GeneraterAction.java @@ -22,6 +22,8 @@ + + package net.mingsoft.cms.action; import cn.hutool.core.bean.BeanUtil; diff --git a/src/main/java/net/mingsoft/cms/action/web/CategoryAction.java b/src/main/java/net/mingsoft/cms/action/web/CategoryAction.java index 7d485dcb..59646437 100755 --- a/src/main/java/net/mingsoft/cms/action/web/CategoryAction.java +++ b/src/main/java/net/mingsoft/cms/action/web/CategoryAction.java @@ -1,23 +1,25 @@ -/** - * The MIT License (MIT) - * Copyright (c) 2012-present 铭软科技(mingsoft.net) - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: +/** + * The MIT License (MIT) + * Copyright (c) 2012-present 铭软科技(mingsoft.net) + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ package net.mingsoft.cms.action.web; diff --git a/src/main/java/net/mingsoft/cms/action/web/ContentAction.java b/src/main/java/net/mingsoft/cms/action/web/ContentAction.java index 7eb1f01e..dbf88373 100755 --- a/src/main/java/net/mingsoft/cms/action/web/ContentAction.java +++ b/src/main/java/net/mingsoft/cms/action/web/ContentAction.java @@ -1,23 +1,25 @@ -/** - * The MIT License (MIT) - * Copyright (c) 2012-present 铭软科技(mingsoft.net) - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +/** + * The MIT License (MIT) + * Copyright (c) 2012-present 铭软科技(mingsoft.net) + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + package net.mingsoft.cms.action.web; diff --git a/src/main/java/net/mingsoft/cms/action/web/MCmsAction.java b/src/main/java/net/mingsoft/cms/action/web/MCmsAction.java index 70673a08..5eeb4ef0 100755 --- a/src/main/java/net/mingsoft/cms/action/web/MCmsAction.java +++ b/src/main/java/net/mingsoft/cms/action/web/MCmsAction.java @@ -19,6 +19,8 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + + package net.mingsoft.cms.action.web; import cn.hutool.core.util.ObjectUtil; @@ -130,32 +132,10 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction { categoryIds = null; } - //List categoryIdList = CollectionUtil.newArrayList(); - //当传递了栏目编号,但不是栏目集合 if (StringUtils.isNotBlank(categoryIds) && !categoryIds.contains(",")) { typeId = categoryIds; } -// else { -// //取出所有的子栏目 -// String[] ids = categoryIds.split(","); -// List categoryList = categoryBiz.list(Wrappers.lambdaQuery().ne(CategoryEntity::getCategoryType, CategoryTypeEnum.LINK.toString())); -// -// categoryIdList = CollectionUtil.newArrayList(ids); -// for(CategoryEntity c:categoryList) { -// if(StringUtils.isNotEmpty(c.getParentids())) { -// for(String id:ids) { -// if(c.getParentids().indexOf(id)>-1) { -// categoryIdList.add(c.getId()); -// break; -// } -// } -// } -// } -// } - - //重新组织 ID - //categoryIds = StringUtils.join(categoryIdList, ","); //根据栏目确定自定义模型 diff --git a/src/main/java/net/mingsoft/cms/aop/CategoryAop.java b/src/main/java/net/mingsoft/cms/aop/CategoryAop.java old mode 100644 new mode 100755 index 03a8cdb1..234b5e7f --- a/src/main/java/net/mingsoft/cms/aop/CategoryAop.java +++ b/src/main/java/net/mingsoft/cms/aop/CategoryAop.java @@ -1,9 +1,26 @@ /** + * The MIT License (MIT) * Copyright (c) 2012-present 铭软科技(mingsoft.net) - * 本软件及相关文档文件(以下简称“软件”)的版权归 铭软科技 所有 - * 遵循铭软科技《保密协议》 + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + + package net.mingsoft.cms.aop; import cn.hutool.core.collection.CollectionUtil; diff --git a/src/main/java/net/mingsoft/cms/aop/ContentAop.java b/src/main/java/net/mingsoft/cms/aop/ContentAop.java index 598c25b6..1729ccac 100755 --- a/src/main/java/net/mingsoft/cms/aop/ContentAop.java +++ b/src/main/java/net/mingsoft/cms/aop/ContentAop.java @@ -7,10 +7,10 @@ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: - *

+ * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. - *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR @@ -20,6 +20,8 @@ */ + + package net.mingsoft.cms.aop; import cn.hutool.core.io.FileUtil; diff --git a/src/main/java/net/mingsoft/cms/bean/CategoryBean.java b/src/main/java/net/mingsoft/cms/bean/CategoryBean.java index f0e8c155..381af54e 100755 --- a/src/main/java/net/mingsoft/cms/bean/CategoryBean.java +++ b/src/main/java/net/mingsoft/cms/bean/CategoryBean.java @@ -20,6 +20,8 @@ */ + + package net.mingsoft.cms.bean; import com.fasterxml.jackson.annotation.JsonFormat; diff --git a/src/main/java/net/mingsoft/cms/bean/ContentBean.java b/src/main/java/net/mingsoft/cms/bean/ContentBean.java index ec8c59a0..b1fe0dff 100755 --- a/src/main/java/net/mingsoft/cms/bean/ContentBean.java +++ b/src/main/java/net/mingsoft/cms/bean/ContentBean.java @@ -1,23 +1,25 @@ -/** - * The MIT License (MIT) - * Copyright (c) 2012-present 铭软科技(mingsoft.net) - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +/** + * The MIT License (MIT) + * Copyright (c) 2012-present 铭软科技(mingsoft.net) + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + package net.mingsoft.cms.bean; diff --git a/src/main/java/net/mingsoft/cms/biz/ICategoryBiz.java b/src/main/java/net/mingsoft/cms/biz/ICategoryBiz.java index 1e0b91e6..c46adac5 100755 --- a/src/main/java/net/mingsoft/cms/biz/ICategoryBiz.java +++ b/src/main/java/net/mingsoft/cms/biz/ICategoryBiz.java @@ -20,6 +20,8 @@ */ + + package net.mingsoft.cms.biz; import net.mingsoft.base.biz.IBaseBiz; diff --git a/src/main/java/net/mingsoft/cms/biz/IContentBiz.java b/src/main/java/net/mingsoft/cms/biz/IContentBiz.java index 0cdb4743..56500c0f 100755 --- a/src/main/java/net/mingsoft/cms/biz/IContentBiz.java +++ b/src/main/java/net/mingsoft/cms/biz/IContentBiz.java @@ -20,6 +20,8 @@ */ + + package net.mingsoft.cms.biz; import net.mingsoft.base.biz.IBaseBiz; @@ -54,7 +56,16 @@ public interface IContentBiz extends IBaseBiz { */ List queryContent(ContentBean contentBean); - int getSearchCount(ModelEntity contentModel, List diyList, Map whereMap, int appId, String categoryIds); + /** + * 文章搜索结果总数,提供搜索使用 + * @param contentModel 文章模型, + * @param diyList 扩展模型字段 List key:自定义模型字段:值 + * @param whereMap 条件 + * @param websiteId 站点编号 + * @param categoryIds 栏目编号集合 格式:1,2,3 + * @return + */ + int getSearchCount(ModelEntity contentModel, List diyList, Map whereMap, String websiteId, String categoryIds); /** * 根据文章属性查询,不包括单篇 * @param contentBean diff --git a/src/main/java/net/mingsoft/cms/biz/IHistoryLogBiz.java b/src/main/java/net/mingsoft/cms/biz/IHistoryLogBiz.java index efc098ef..f1af513f 100755 --- a/src/main/java/net/mingsoft/cms/biz/IHistoryLogBiz.java +++ b/src/main/java/net/mingsoft/cms/biz/IHistoryLogBiz.java @@ -20,6 +20,8 @@ */ + + package net.mingsoft.cms.biz; import net.mingsoft.base.biz.IBaseBiz; diff --git a/src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java b/src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java index 14ade9ce..abb07503 100755 --- a/src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java +++ b/src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java @@ -22,6 +22,8 @@ + + package net.mingsoft.cms.biz.impl; import cn.hutool.core.collection.CollUtil; diff --git a/src/main/java/net/mingsoft/cms/biz/impl/ContentBizImpl.java b/src/main/java/net/mingsoft/cms/biz/impl/ContentBizImpl.java index 85e15fa5..fdd32efe 100755 --- a/src/main/java/net/mingsoft/cms/biz/impl/ContentBizImpl.java +++ b/src/main/java/net/mingsoft/cms/biz/impl/ContentBizImpl.java @@ -22,6 +22,8 @@ + + package net.mingsoft.cms.biz.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -92,7 +94,7 @@ public class ContentBizImpl extends BaseBizImpl imp } @Override - public int getSearchCount(ModelEntity contentModel, List diyList, Map whereMap, int appId, String categoryIds) { + public int getSearchCount(ModelEntity contentModel, List diyList, Map whereMap, String appId, String categoryIds) { if (contentModel!=null) { return contentDao.getSearchCount(contentModel.getModelTableName(),diyList,whereMap, appId,categoryIds); } diff --git a/src/main/java/net/mingsoft/cms/biz/impl/HistoryLogBizImpl.java b/src/main/java/net/mingsoft/cms/biz/impl/HistoryLogBizImpl.java index aefb84e5..2f89006f 100755 --- a/src/main/java/net/mingsoft/cms/biz/impl/HistoryLogBizImpl.java +++ b/src/main/java/net/mingsoft/cms/biz/impl/HistoryLogBizImpl.java @@ -1,23 +1,25 @@ -/** - * The MIT License (MIT) - * Copyright (c) 2012-present 铭软科技(mingsoft.net) - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +/** + * The MIT License (MIT) + * Copyright (c) 2012-present 铭软科技(mingsoft.net) + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + diff --git a/src/main/java/net/mingsoft/cms/constant/Const.java b/src/main/java/net/mingsoft/cms/constant/Const.java index 73e9bba8..089004a5 100755 --- a/src/main/java/net/mingsoft/cms/constant/Const.java +++ b/src/main/java/net/mingsoft/cms/constant/Const.java @@ -20,6 +20,8 @@ */ + + package net.mingsoft.cms.constant; /** diff --git a/src/main/java/net/mingsoft/cms/constant/e/CategoryDisplayEnum.java b/src/main/java/net/mingsoft/cms/constant/e/CategoryDisplayEnum.java old mode 100644 new mode 100755 index 2c194566..fb277e53 --- a/src/main/java/net/mingsoft/cms/constant/e/CategoryDisplayEnum.java +++ b/src/main/java/net/mingsoft/cms/constant/e/CategoryDisplayEnum.java @@ -1,9 +1,26 @@ /** + * The MIT License (MIT) * Copyright (c) 2012-present 铭软科技(mingsoft.net) - * 本软件及相关文档文件(以下简称“软件”)的版权归 铭软科技 所有 - * 遵循铭软科技《保密协议》 + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + + package net.mingsoft.cms.constant.e; import net.mingsoft.base.constant.e.BaseEnum; diff --git a/src/main/java/net/mingsoft/cms/constant/e/CategoryIsSearchEnum.java b/src/main/java/net/mingsoft/cms/constant/e/CategoryIsSearchEnum.java old mode 100644 new mode 100755 index 5be998e1..5ef5c0f8 --- a/src/main/java/net/mingsoft/cms/constant/e/CategoryIsSearchEnum.java +++ b/src/main/java/net/mingsoft/cms/constant/e/CategoryIsSearchEnum.java @@ -1,9 +1,26 @@ /** + * The MIT License (MIT) * Copyright (c) 2012-present 铭软科技(mingsoft.net) - * 本软件及相关文档文件(以下简称“软件”)的版权归 铭软科技 所有 - * 遵循铭软科技《保密协议》 + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + + package net.mingsoft.cms.constant.e; import net.mingsoft.base.constant.e.BaseEnum; diff --git a/src/main/java/net/mingsoft/cms/constant/e/CategoryTypeEnum.java b/src/main/java/net/mingsoft/cms/constant/e/CategoryTypeEnum.java index 51db7d86..e64793ea 100755 --- a/src/main/java/net/mingsoft/cms/constant/e/CategoryTypeEnum.java +++ b/src/main/java/net/mingsoft/cms/constant/e/CategoryTypeEnum.java @@ -21,6 +21,8 @@ + + package net.mingsoft.cms.constant.e; import net.mingsoft.base.constant.e.BaseEnum; diff --git a/src/main/java/net/mingsoft/cms/constant/e/ContentEnum.java b/src/main/java/net/mingsoft/cms/constant/e/ContentEnum.java old mode 100644 new mode 100755 index e02449b3..0b047cbf --- a/src/main/java/net/mingsoft/cms/constant/e/ContentEnum.java +++ b/src/main/java/net/mingsoft/cms/constant/e/ContentEnum.java @@ -1,3 +1,24 @@ +/** + * The MIT License (MIT) + * Copyright (c) 2012-present 铭软科技(mingsoft.net) + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + package net.mingsoft.cms.constant.e; import net.mingsoft.base.constant.e.BaseEnum; diff --git a/src/main/java/net/mingsoft/cms/dao/ICategoryDao.java b/src/main/java/net/mingsoft/cms/dao/ICategoryDao.java index 19cddd54..01b17e90 100755 --- a/src/main/java/net/mingsoft/cms/dao/ICategoryDao.java +++ b/src/main/java/net/mingsoft/cms/dao/ICategoryDao.java @@ -20,6 +20,8 @@ */ + + package net.mingsoft.cms.dao; import net.mingsoft.base.dao.IBaseDao; diff --git a/src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml b/src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml index 923ffa23..e22e7186 100755 --- a/src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml +++ b/src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml @@ -54,10 +54,10 @@ category_url=#{categoryUrl}, category_keyword=#{categoryKeyword}, category_descrip=#{categoryDescrip}, - category_img=#{categoryImg}, + category_img=#{categoryImg}, category_display=#{categoryDisplay}, category_is_search=#{categoryIsSearch}, - category_ico=#{categoryIco}, + category_ico=#{categoryIco}, category_diy_url=#{categoryDiyUrl}, dict_id=#{dictId}, category_flag=#{categoryFlag}, diff --git a/src/main/java/net/mingsoft/cms/dao/ICmsHistoryLogDao.java b/src/main/java/net/mingsoft/cms/dao/ICmsHistoryLogDao.java index a158ffb7..09ef851e 100755 --- a/src/main/java/net/mingsoft/cms/dao/ICmsHistoryLogDao.java +++ b/src/main/java/net/mingsoft/cms/dao/ICmsHistoryLogDao.java @@ -20,6 +20,8 @@ */ + + package net.mingsoft.cms.dao; import net.mingsoft.base.dao.IBaseDao; diff --git a/src/main/java/net/mingsoft/cms/dao/IContentDao.java b/src/main/java/net/mingsoft/cms/dao/IContentDao.java index 250b105f..6e85e6e6 100755 --- a/src/main/java/net/mingsoft/cms/dao/IContentDao.java +++ b/src/main/java/net/mingsoft/cms/dao/IContentDao.java @@ -20,6 +20,8 @@ */ + + package net.mingsoft.cms.dao; import net.mingsoft.base.dao.IBaseDao; @@ -73,7 +75,7 @@ public interface IContentDao extends IBaseDao { * @return 文章实体总数 */ int getSearchCount(@Param("tableName") String tableName, @Param("diyList") List diyList, @Param("map") Map map, - @Param("websiteId") int websiteId, @Param("ids") String ids); + @Param("websiteId") String websiteId, @Param("ids") String categoryIds); /** * 分类编号删除文章 diff --git a/src/main/java/net/mingsoft/cms/dao/IContentDao.xml b/src/main/java/net/mingsoft/cms/dao/IContentDao.xml index 2f76e7e1..17f71d40 100755 --- a/src/main/java/net/mingsoft/cms/dao/IContentDao.xml +++ b/src/main/java/net/mingsoft/cms/dao/IContentDao.xml @@ -436,9 +436,16 @@ and a.content_display=0 and c.category_display='enable' and c.category_is_search='enable' - - and FIND_IN_SET(a.category_id,#{ids})>0 + + and + + a.category_id=${item} + or a.category_id in (select id FROM cms_category where cms_category.del=0 + and FIND_IN_SET(${item},CATEGORY_PARENT_IDS) > 0) + + and a.content_title like CONCAT(CONCAT('%',#{map.content_title}),'%') diff --git a/src/main/java/net/mingsoft/cms/entity/CategoryEntity.java b/src/main/java/net/mingsoft/cms/entity/CategoryEntity.java index 65246b82..dd3fdd24 100755 --- a/src/main/java/net/mingsoft/cms/entity/CategoryEntity.java +++ b/src/main/java/net/mingsoft/cms/entity/CategoryEntity.java @@ -7,10 +7,10 @@ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: - *

+ * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. - *

+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR @@ -20,6 +20,8 @@ */ + + package net.mingsoft.cms.entity; import cn.hutool.core.util.BooleanUtil; diff --git a/src/main/java/net/mingsoft/cms/entity/ContentEntity.java b/src/main/java/net/mingsoft/cms/entity/ContentEntity.java index e3734886..f536eaa4 100755 --- a/src/main/java/net/mingsoft/cms/entity/ContentEntity.java +++ b/src/main/java/net/mingsoft/cms/entity/ContentEntity.java @@ -1,23 +1,25 @@ -/** - * The MIT License (MIT) - * Copyright (c) 2012-present 铭软科技(mingsoft.net) - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +/** + * The MIT License (MIT) + * Copyright (c) 2012-present 铭软科技(mingsoft.net) + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + package net.mingsoft.cms.entity; diff --git a/src/main/java/net/mingsoft/cms/entity/HistoryLogEntity.java b/src/main/java/net/mingsoft/cms/entity/HistoryLogEntity.java index d134bb12..f5eb9138 100755 --- a/src/main/java/net/mingsoft/cms/entity/HistoryLogEntity.java +++ b/src/main/java/net/mingsoft/cms/entity/HistoryLogEntity.java @@ -1,23 +1,25 @@ -/** - * The MIT License (MIT) - * Copyright (c) 2012-present 铭软科技(mingsoft.net) - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: +/** + * The MIT License (MIT) + * Copyright (c) 2012-present 铭软科技(mingsoft.net) + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ package net.mingsoft.cms.entity; diff --git a/src/main/java/net/mingsoft/cms/util/CmsParserUtil.java b/src/main/java/net/mingsoft/cms/util/CmsParserUtil.java index fb34d457..313cc320 100755 --- a/src/main/java/net/mingsoft/cms/util/CmsParserUtil.java +++ b/src/main/java/net/mingsoft/cms/util/CmsParserUtil.java @@ -20,6 +20,8 @@ */ + + package net.mingsoft.cms.util; import cn.hutool.core.io.FileUtil; diff --git a/src/main/java/net/mingsoft/config/WebConfig.java b/src/main/java/net/mingsoft/config/WebConfig.java old mode 100644 new mode 100755 index b94cbe61..cc7bfbe0 --- a/src/main/java/net/mingsoft/config/WebConfig.java +++ b/src/main/java/net/mingsoft/config/WebConfig.java @@ -19,6 +19,8 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + + package net.mingsoft.config; import cn.hutool.core.util.StrUtil; diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 1736f308..8ad41da6 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -1,6 +1,6 @@ spring: datasource: - url: jdbc:mysql://localhost:3306/mcms?useUnicode=true&serverTimezone=Asia/Shanghai&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&allowMultiQueries=true&useSSL=true + url: jdbc:mysql://192.168.0.6:3306/mcms?useUnicode=true&serverTimezone=Asia/Shanghai&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&allowMultiQueries=true&useSSL=true username: root password: root filters: wall,mergeStat diff --git a/src/main/webapp/WEB-INF/manager/cms/category/form.ftl b/src/main/webapp/WEB-INF/manager/cms/category/form.ftl index 997feb53..5a16467f 100644 --- a/src/main/webapp/WEB-INF/manager/cms/category/form.ftl +++ b/src/main/webapp/WEB-INF/manager/cms/category/form.ftl @@ -22,9 +22,9 @@ - + - + + :key="treeKey" + :props="{value: 'id',label: 'categoryTitle',children: 'children'}" + :options="treeList" :style="{width:'100%'}" + v-model="form.categoryId">

不能将父级别栏目移动到自身子级栏目
@@ -52,9 +52,9 @@ - + - + - + - + - + - + - - + + - + - + - + - + - +
- + <@shiro.hasPermission name="cms:category:save"> 新增 @@ -25,7 +25,7 @@ border :data="dataList" row-key="id" v-loading="loading" - default-expand-all='true' + :default-expand-all=true :tree-props="{children: 'children'}" tooltip-effect="dark" @selection-change="handleSelectionChange"> @@ -87,9 +87,6 @@ <@shiro.hasPermission name="cms:category:save"> 克隆 - <#-- <@shiro.hasPermission name="cms:category:update">--> - <#-- 应用子栏目--> - <#-- --> <@shiro.hasPermission name="cms:category:update"> 编辑 @@ -109,54 +106,56 @@ var indexVue = new Vue({ el: '#index', - data: { - //分类列表 - dataList: [], - //分类列表选中 - selectionList: [], - //加载状态 - loading: true, - //提示文字 - emptyText: '', - categoryFlagOptions: [], - manager: ms.manager, - loadState: false, - categoryTypeOptions: [{ - "value": "1", - "label": "列表" - }, { - "value": "2", - "label": "封面" - }, { - "value": "3", - "label": "链接" - }], - //搜索表单 - form: { - // 栏目管理名称 - categoryTitle: '', - // 栏目管理名称 - categoryShortTitle: '', - // 所属栏目 - categoryId: '', - // 栏目管理属性 - categoryType: '2', - // 自定义顺序 - categorySort: 0, - // 列表模板 - categoryListUrl: '', - // 内容模板 - categoryUrl: '', - // 栏目管理关键字 - categoryKeyword: '', - // 栏目管理描述 - categoryDescrip: '', - // 缩略图 - categoryImg: [], - // 自定义链接 - categoryDiyUrl: '', - // 栏目管理的内容模型id - mdiyModelId: '' + data: function () { + return { + //分类列表 + dataList: [], + //分类列表选中 + selectionList: [], + //加载状态 + loading: true, + //提示文字 + emptyText: '', + categoryFlagOptions: [], + manager: ms.manager, + loadState: false, + categoryTypeOptions: [{ + "value": "1", + "label": "列表" + }, { + "value": "2", + "label": "封面" + }, { + "value": "3", + "label": "链接" + }], + //搜索表单 + form: { + // 栏目管理名称 + categoryTitle: '', + // 栏目管理名称 + categoryShortTitle: '', + // 所属栏目 + categoryId: '', + // 栏目管理属性 + categoryType: '2', + // 自定义顺序 + categorySort: 0, + // 列表模板 + categoryListUrl: '', + // 内容模板 + categoryUrl: '', + // 栏目管理关键字 + categoryKeyword: '', + // 栏目管理描述 + categoryDescrip: '', + // 缩略图 + categoryImg: [], + // 自定义链接 + categoryDiyUrl: '', + // 栏目管理的内容模型id + mdiyModelId: '' + } } }, methods: { diff --git a/src/main/webapp/WEB-INF/manager/cms/content/form.ftl b/src/main/webapp/WEB-INF/manager/cms/content/form.ftl index d07b6a3b..d19c95c7 100644 --- a/src/main/webapp/WEB-INF/manager/cms/content/form.ftl +++ b/src/main/webapp/WEB-INF/manager/cms/content/form.ftl @@ -9,13 +9,13 @@
- + 编号:{{form.id}} - + <@shiro.hasPermission name="cms:content:save"> 保存 @@ -28,14 +28,14 @@ - - + + - - + + - + +
标签:${'$'}{field.typetitle} 不能选择封面、链接栏目类型,不能选择父栏目 @@ -69,9 +70,9 @@ - + - + - + - + - + - + - + - + - + - +
-
@@ -39,6 +39,7 @@ el: "#index", data: function () { return { + iframeKey:'', action: "", //跳转页面 defaultProps: { @@ -52,6 +53,7 @@ }, methods: { handleNodeClick: function (data) { + this.iframeKey = new Date().getTime(); if (data.categoryType == '1') { this.action = ms.manager + "/cms/content/main.do?categoryId=" + data.id+"&leaf="+data.leaf; } else if (data.categoryType == '2') { @@ -110,10 +112,19 @@ } #index .ms-iframe-style { width: 100%; - height: 100%; + height: 100vh; border: 0; } + /*脚手架需要此样式*/ + #index >>> .ms-iframe-style { + height: 92vh; + } + + #index >>> .ms-index { + height: 100vh; + } + #index .index-menu .el-main { padding: 0; } diff --git a/src/main/webapp/WEB-INF/manager/cms/content/main.ftl b/src/main/webapp/WEB-INF/manager/cms/content/main.ftl index 83fbc0a9..d04aa4c6 100644 --- a/src/main/webapp/WEB-INF/manager/cms/content/main.ftl +++ b/src/main/webapp/WEB-INF/manager/cms/content/main.ftl @@ -9,7 +9,7 @@
- + <@shiro.hasPermission name="cms:content:save"> 新增 @@ -22,7 +22,7 @@ - + - + - + 查询 重置 筛选 @@ -519,6 +519,9 @@ #main .ms-container { height: calc(100vh - 141px); } + #main { + height: 100vh + } body{ overflow: hidden; } diff --git a/src/main/webapp/template/1/default/message.htm b/src/main/webapp/template/1/default/message.htm index aac05683..59e27718 100644 --- a/src/main/webapp/template/1/default/message.htm +++ b/src/main/webapp/template/1/default/message.htm @@ -175,7 +175,7 @@ type: 'warning' }); } else { - that.$alert('需要安装留言插件才能使用,请先进入后台MStore安装留言插件使用。查看留言插件', '留言插件提示', { + that.$alert('需要安装留言插件才能使用,请先进入后台MStore安装留言插件使用。查看留言插件', '留言插件提示', { dangerouslyUseHTMLString: true }); }