fix: 标签优化

master
msgroup 3 years ago committed by mingsoft
parent 052edb1b1b
commit 05be311445
  1. 2
      doc/5.3.0-up-5.3.1.sql
  2. 2
      doc/mcms-5.3.1.sql

@ -49,7 +49,7 @@ INSERT INTO `mdiy_tag` (`id`, `tag_name`, `tag_type`, `tag_sql`, `tag_class`, `t
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 <#if appId??>\n CONCAT(CONCAT(CONCAT(\'${url}\',\'${html}/\'),app_dir),\'<#if appTemplate?has_content>/</#if>${appTemplate!\"\"}\') as \"url\",\n CONCAT(CONCAT(\'/${html}\',\'/\'),app_dir) as \"html\",\n <#else>\n CONCAT(CONCAT(\'${url}\',\'${html}\'),\'<#if appTemplate?has_content>/</#if>${appTemplate!\"\"}\') as \"url\",\n \'/${html}\' as \"html\",\n </#if>\n <#else>\n CONCAT(CONCAT(CONCAT(\'${url}\',\'${html}\'),\'<#if appDir?has_content>/${app_dir}</#if>\'),\'<#if appTemplate?has_content>/</#if>${appTemplate!\"\"}\') as \"url\",\n CONCAT(\'/${html}\',\'<#if appDir?has_content>/${app_dir}</#if>\') as \"html\",\n </#if>\n \'${url}\' as \"host\",\n </#if>\n CONCAT(CONCAT(CONCAT(\'template/\',id),\'/\'),app_style) as \"style\"\nfrom app\n <#--根据站点编号查询-->\n <#if appId?? >\n where id = ${appId}\n </#if>', 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 <#if appId??>\n CONCAT(CONCAT(CONCAT(\'${url}\',\'${html}/\'),app_dir),\'<#if appTemplate?has_content>/</#if>${appTemplate!\"\"}\') as \"url\",\n CONCAT(CONCAT(\'/${html}\',\'/\'),app_dir) as \"html\",\n <#else>\n CONCAT(CONCAT(\'${url}\',\'${html}\'),\'<#if appTemplate?has_content>/</#if>${appTemplate!\"\"}\') as \"url\",\n \'/${html}\' as \"html\",\n </#if>\n <#else>\n CONCAT(CONCAT(CONCAT(\'${url}\',\'${html}\'),\'<#if appDir?has_content>/${app_dir}</#if>\'),\'<#if appTemplate?has_content>/</#if>${appTemplate!\"\"}\') as \"url\",\n CONCAT(\'/${html}\',\'<#if appDir?has_content>/${app_dir}</#if>\') as \"html\",\n </#if>\n \'${url}\' as \"host\",\n </#if>\n CONCAT(CONCAT(CONCAT(\'template/\',id),\'/\'),app_style) as \"style\"\nfrom app\n <#--根据站点编号查询-->\n <#if appId?? >\n where id = ${appId}\n </#if>', 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}.*,</#if>\n <#--查询站点编号-->\n <#if appId??>\n cms_content.app_id as \"appId\",\n </#if>\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( \'<script type=\"text/javascript\" src=\"${contextPath}/cms/content/\', cms_content.id),\'/hit.do\"></script>\') as \"hit\",\n <#else>\n CONCAT(CONCAT( \'<script type=\"text/javascript\" src=\"/cms/content/\', cms_content.id),\'/hit.do\"></script>\') as \"hit\",\n </#if>\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(\'/\', CONCAT(cms_content.id, \'.html\' )) as \"link\",\n <#else>\n CONCAT(CONCAT( cms_category.category_path, \'/\' ), CONCAT(cms_content.id, \'.html\' )) as \"link\",\n </#if>\n </#if>\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(CONCAT(\'/\',category_pinyin),\'.html\') AS \"typelink\"\n <#else>\n CONCAT(category_path,\'/index.html\') AS \"typelink\"\n </#if>\n </#if>\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</#if>\nWHERE\n <#--如果是栏目列表页没有文章id所以只取栏目id-->\n <#if column??&&column.id??&&!id??>\n cms_category.id=${column.id} and\n </#if>\n <#--根据站点编号查询-->\n <#if appId??>\n cms_content.app_id = ${appId} and\n </#if>\n cms_content.del=0\n <#if id??> and cms_content.id=${id}</#if>\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}.*,</#if>\n <#--查询站点编号-->\n <#if appId??>\n cms_content.app_id as \"appId\",\n </#if>\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( \'<script type=\"text/javascript\" src=\"${contextPath}/cms/content/\', cms_content.id),\'/hit.do\"></script>\') as \"hit\",\n <#else>\n CONCAT(CONCAT( \'<script type=\"text/javascript\" src=\"/cms/content/\', cms_content.id),\'/hit.do\"></script>\') as \"hit\",\n </#if>\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(\'/\', CONCAT(cms_content.id, \'.html\' )) as \"link\",\n <#else>\n CONCAT(CONCAT( cms_category.category_path, \'/\' ), CONCAT(cms_content.id, \'.html\' )) as \"link\",\n </#if>\n </#if>\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(CONCAT(\'/\',category_pinyin),\'.html\') AS \"typelink\"\n <#else>\n CONCAT(category_path,\'/index.html\') AS \"typelink\"\n </#if>\n </#if>\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</#if>\nWHERE\n <#--如果是栏目列表页没有文章id所以只取栏目id-->\n <#if column??&&column.id??&&!id??>\n cms_category.id=${column.id} and\n </#if>\n <#--根据站点编号查询-->\n <#if appId??>\n cms_content.app_id = ${appId} and\n </#if>\n cms_content.del=0\n <#if id??> and cms_content.id=${id}</#if>\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=\"\'\'\"/>\r\n<#if orderby?? >\r\n <#if orderby==\"date\">\r\n <#assign _orderby=\"content_datetime\">\r\n <#elseif orderby==\"updatedate\">\r\n <#assign _orderby=\"cms_content.update_date\">\r\n <#elseif orderby==\"hit\">\r\n <#assign _orderby=\"content_hit\">\r\n <#elseif orderby==\"sort\">\r\n <#assign _orderby=\"content_sort\">\r\n <#else><#assign _orderby=\"cms_content.id\"></#if>\r\n<#else>\r\n <#assign _orderby=\"cms_content.id\">\r\n</#if>\r\n<#--上一页-->\r\n<#if pageTag.preId??>\r\n SELECT\r\n cms_content.id as \"id\",\r\n content_title as \"title\",\r\n content_author as \"author\",\r\n content_source as \"source\",\r\n content_details as \"content\",\r\n category.category_title as \"typename\",\r\n category.category_id as \"typeid\",\r\n <#if isDo?? && isDo>\r\n CONCAT(\'/${modelName}/list.do?typeid=\', cms_category.id) as \"typelink\",\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'/\',CONCAT(category.category_pinyin,\'.html\')) AS \"typelink\",\r\n <#else>\r\n CONCAT(category.category_path,\'/index.html\') AS \"typelink\",\r\n </#if>\r\n </#if>\r\n content_img as \"litpic\",\r\n <#--内容页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\'${modelName}/view.do?id=\', cms_content.id,\'&orderby=${_orderby}\',\'&order=${order!\'ASC\'}\',\'&typeid=${typeid}\') as \"link\",\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(CONCAT(\'/\',cms_content.id),\'.html\') AS \"link\",\r\n <#else>\r\n CONCAT(CONCAT(category_path,\'/\'),CONCAT(cms_content.id,\'.html\')) AS \"link\",\r\n </#if>\r\n </#if>\r\n content_description as \"descrip\",\r\n content_hit as \"hit\",\r\n content_type as \"flag\",\r\n content_keyword as \"keyword\"\r\n FROM cms_content\r\n LEFT JOIN cms_category category ON cms_content.category_id=category.id\r\n WHERE cms_content.id=${pageTag.preId}\r\n<#else>\r\n SELECT\r\n ${select} as \"id\",\r\n \'\' as \"title\",\r\n ${select} as \"author\",\r\n ${select} as \"source\",\r\n ${select} as \"content\",\r\n ${select} as \"typename\",\r\n ${select} as \"typeid\",\r\n ${select} as \"typelink\",\r\n ${select} as \"litpic\",\r\n ${select} as \"typelink\",\r\n ${select} as \"date\",\r\n ${select} as \"descrip\",\r\n ${select} as \"hit\",\r\n ${select} as \"flag\",\r\n ${select} as \"keyword\"\r\n FROM dual\r\n</#if>\r\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=\"\'\'\"/>\r\n<#if orderby?? >\r\n <#if orderby==\"date\">\r\n <#assign _orderby=\"content_datetime\">\r\n <#elseif orderby==\"updatedate\">\r\n <#assign _orderby=\"cms_content.update_date\">\r\n <#elseif orderby==\"hit\">\r\n <#assign _orderby=\"content_hit\">\r\n <#elseif orderby==\"sort\">\r\n <#assign _orderby=\"content_sort\">\r\n <#else><#assign _orderby=\"cms_content.id\"></#if>\r\n<#else>\r\n <#assign _orderby=\"cms_content.id\">\r\n</#if>\r\n<#--上一页-->\r\n<#if pageTag.preId??>\r\n SELECT\r\n cms_content.id as \"id\",\r\n content_title as \"title\",\r\n content_author as \"author\",\r\n content_source as \"source\",\r\n content_details as \"content\",\r\n category.category_title as \"typename\",\r\n category.category_id as \"typeid\",\r\n <#if isDo?? && isDo>\r\n CONCAT(\'/${modelName}/list.do?typeid=\', cms_category.id) as \"typelink\",\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'/\',CONCAT(category.category_pinyin,\'.html\')) AS \"typelink\",\r\n <#else>\r\n CONCAT(category.category_path,\'/index.html\') AS \"typelink\",\r\n </#if>\r\n </#if>\r\n content_img as \"litpic\",\r\n <#--内容页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\'${modelName}/view.do?id=\', cms_content.id,\'&orderby=${_orderby}\',\'&order=${order!\'ASC\'}\',\'&typeid=${typeid}\') as \"link\",\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(CONCAT(\'/\',cms_content.id),\'.html\') AS \"link\",\r\n <#else>\r\n CONCAT(CONCAT(category_path,\'/\'),CONCAT(cms_content.id,\'.html\')) AS \"link\",\r\n </#if>\r\n </#if>\r\n content_description as \"descrip\",\r\n content_hit as \"hit\",\r\n content_type as \"flag\",\r\n content_keyword as \"keyword\"\r\n FROM cms_content\r\n LEFT JOIN cms_category category ON cms_content.category_id=category.id\r\n WHERE cms_content.id=${pageTag.preId}\r\n<#else>\r\n SELECT\r\n ${select} as \"id\",\r\n \'\' as \"title\",\r\n ${select} as \"author\",\r\n ${select} as \"source\",\r\n ${select} as \"content\",\r\n ${select} as \"typename\",\r\n ${select} as \"typeid\",\r\n ${select} as \"typelink\",\r\n ${select} as \"litpic\",\r\n ${select} as \"typelink\",\r\n ${select} as \"date\",\r\n ${select} as \"descrip\",\r\n ${select} as \"hit\",\r\n ${select} as \"flag\",\r\n ${select} as \"keyword\"\r\n FROM dual\r\n</#if>\r\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??>\r\nselect\r\n <#--是否开启短链接-->\r\n <#if shortSwitch?? && shortSwitch>\r\n \'${shortSwitch?string(\'true\',\'false\')}\' as \"shortSwitch\",\r\n </#if>\r\n <#if !(pageTag.indexUrl??)>\r\n <#--判断是否有栏目对象,用于搜索不传栏目-->\r\n <#if column??>\r\n <#if shortSwitch?? && shortSwitch>\r\n <#assign path=column.categoryPinyin/>\r\n <#else>\r\n <#assign path=column.categoryPath/>\r\n </#if>\r\n <#else>\r\n <#assign path=\'\' />\r\n </#if>\r\n <#--总记录数、总页数-->\r\n \'${pageTag.total}\' as \"total\",\r\n \'${pageTag.size}\' as \"size\",\r\n\r\n <#--记录总数-->\r\n \'${pageTag.rcount}\' as \"rcount\",\r\n <#--当前页码-->\r\n \'${pageTag.pageNo}\' as \"cur\",\r\n <#--首页-->\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'${path}\', \'.html\') as \"index\",\r\n <#else>\r\n CONCAT(\'${path}\', \'/index.html\') as \"index\",\r\n </#if>\r\n <#--上一页-->\r\n <#if (pageTag.pageNo?eval-1) gt 1>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'${path}\',\'-${pageTag.pageNo?eval-1}.html\') as \"pre\",\r\n <#else>\r\n CONCAT(\'${path}\',\'/list-${pageTag.pageNo?eval-1}.html\') as \"pre\",\r\n </#if>\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'${path}\',\'.html\') as \"pre\",\r\n <#else>\r\n CONCAT(\'${path}\',\'/index.html\') as \"pre\",\r\n </#if>\r\n </#if>\r\n <#--下一页-->\r\n <#if pageTag.total==0>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'${path}\', \'.html\') as \"next\",\r\n CONCAT(\'${path}\', \'.html\') as \"last\"\r\n <#else>\r\n CONCAT(\'${path}\', \'/index.html\') as \"next\",\r\n CONCAT(\'${path}\', \'/index.html\') as \"last\"\r\n </#if>\r\n <#else>\r\n <#if pageTag.pageNo?eval gte pageTag.total>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'${path}\',\'-${pageTag.total}.html\') as \"next\",\r\n <#else>\r\n CONCAT(\'${path}\',\'/list-${pageTag.total}.html\') as \"next\",\r\n </#if>\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'${path}\',\'-${pageTag.pageNo?eval+1}.html\') as \"next\",\r\n <#else>\r\n CONCAT(\'${path}\',\'/list-${pageTag.pageNo?eval+1}.html\') as \"next\",\r\n </#if>\r\n </#if>\r\n <#--最后一页-->\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'${path}\',\'-${pageTag.total}.html\') as \"last\"\r\n <#else>\r\n CONCAT(\'${path}\',\'/list-${pageTag.total}.html\') as \"last\"\r\n </#if>\r\n </#if>\r\n <#else>\r\n <#--判断是否是搜索页面-->\r\n \'${pageTag.indexUrl}\' as \"index\",\r\n \'${pageTag.lastUrl}\' as \"last\",\r\n \'${pageTag.preUrl}\' as \"pre\",\r\n \'${pageTag.nextUrl}\' as \"next\",\r\n \'${pageTag.total}\' as \"total\",\r\n \'${pageTag.size}\' as \"size\",\r\n \'${pageTag.rcount}\' as \"rcount\",\r\n \'${pageTag.pageNo}\' as \"cur\"\r\n </#if>\r\n from dual\r\n</#if>', 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 </#if>\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 </#if>\n <#else>\n <#assign path=\'\' />\n </#if>\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 </#if>\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 </#if>\n <#else>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(\'${path}\',\'.html\') as \"pre\",\n <#else>\n CONCAT(\'${path}\',\'/index.html\') as \"pre\",\n </#if>\n </#if>\n <#--下一页-->\n <#if pageTag.total==0>\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 </#if>\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 </#if>\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 </#if>\n </#if>\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 </#if>\n </#if>\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 </#if>\n from dual\n</#if>', 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=\"\'\'\"/>\r\n<#if orderby?? >\r\n <#if orderby==\"date\">\r\n <#assign _orderby=\"content_datetime\">\r\n <#elseif orderby==\"updatedate\">\r\n <#assign _orderby=\"cms_content.update_date\">\r\n <#elseif orderby==\"hit\">\r\n <#assign _orderby=\"content_hit\">\r\n <#elseif orderby==\"sort\">\r\n <#assign _orderby=\"content_sort\">\r\n <#else>\r\n <#assign _orderby=\"cms_content.id\"></#if>\r\n <#else>\r\n <#assign _orderby=\"cms_content.id\">\r\n </#if>\r\n<#--开始-->\r\n<#if pageTag.nextId??>\r\n SELECT\r\n cms_content.id as \"id\",\r\n content_title as \"title\",\r\n content_author as \"author\",\r\n content_source as \"source\",\r\n content_details as \"content\",\r\n category.category_title as \"typename\",\r\n category.category_id as \"typeid\",\r\n <#if isDo?? && isDo>\r\n CONCAT(\'/${modelName}/list.do?typeid=\', cms_category.id) as \"typelink\",\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'/\',CONCAT(category.category_pinyin,\'.html\')) AS \"typelink\",\r\n <#else>\r\n CONCAT(category.category_path,\'/index.html\') AS \"typelink\",\r\n </#if>\r\n </#if>\r\n content_img as \"litpic\",\r\n <#--内容页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\'${modelName}/view.do?id=\', cms_content.id,\'&orderby=${_orderby}\',\'&order=${order!\'ASC\'}\',\'&typeid=${typeid}\') as \"link\",\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(CONCAT(\'/\',cms_content.id),\'.html\') AS \"link\",\r\n <#else>\r\n CONCAT(CONCAT(category_path,\'/\'),CONCAT(cms_content.id,\'.html\')) AS \"link\",\r\n </#if>\r\n </#if>\r\n content_description as \"descrip\",\r\n content_hit as \"hit\",\r\n content_type as \"flag\",\r\n content_keyword as \"keyword\"\r\n FROM cms_content\r\n LEFT JOIN cms_category category ON cms_content.category_id=category.id\r\n WHERE cms_content.id=${pageTag.nextId}\r\n<#else>\r\n SELECT\r\n ${select} as \"id\",\r\n \'\' as \"title\",\r\n ${select} as \"author\",\r\n ${select} as \"source\",\r\n ${select} as \"content\",\r\n ${select} as \"typename\",\r\n ${select} as \"typeid\",\r\n ${select} as \"typelink\",\r\n ${select} as \"litpic\",\r\n ${select} as \"link\",\r\n ${select} as \"date\",\r\n ${select} as \"descrip\",\r\n ${select} as \"hit\",\r\n ${select} as \"flag\",\r\n ${select} as \"keyword\"\r\n FROM dual\r\n</#if>\r\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=\"\'\'\"/>\r\n<#if orderby?? >\r\n <#if orderby==\"date\">\r\n <#assign _orderby=\"content_datetime\">\r\n <#elseif orderby==\"updatedate\">\r\n <#assign _orderby=\"cms_content.update_date\">\r\n <#elseif orderby==\"hit\">\r\n <#assign _orderby=\"content_hit\">\r\n <#elseif orderby==\"sort\">\r\n <#assign _orderby=\"content_sort\">\r\n <#else>\r\n <#assign _orderby=\"cms_content.id\"></#if>\r\n <#else>\r\n <#assign _orderby=\"cms_content.id\">\r\n </#if>\r\n<#--开始-->\r\n<#if pageTag.nextId??>\r\n SELECT\r\n cms_content.id as \"id\",\r\n content_title as \"title\",\r\n content_author as \"author\",\r\n content_source as \"source\",\r\n content_details as \"content\",\r\n category.category_title as \"typename\",\r\n category.category_id as \"typeid\",\r\n <#if isDo?? && isDo>\r\n CONCAT(\'/${modelName}/list.do?typeid=\', cms_category.id) as \"typelink\",\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'/\',CONCAT(category.category_pinyin,\'.html\')) AS \"typelink\",\r\n <#else>\r\n CONCAT(category.category_path,\'/index.html\') AS \"typelink\",\r\n </#if>\r\n </#if>\r\n content_img as \"litpic\",\r\n <#--内容页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\'${modelName}/view.do?id=\', cms_content.id,\'&orderby=${_orderby}\',\'&order=${order!\'ASC\'}\',\'&typeid=${typeid}\') as \"link\",\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(CONCAT(\'/\',cms_content.id),\'.html\') AS \"link\",\r\n <#else>\r\n CONCAT(CONCAT(category_path,\'/\'),CONCAT(cms_content.id,\'.html\')) AS \"link\",\r\n </#if>\r\n </#if>\r\n content_description as \"descrip\",\r\n content_hit as \"hit\",\r\n content_type as \"flag\",\r\n content_keyword as \"keyword\"\r\n FROM cms_content\r\n LEFT JOIN cms_category category ON cms_content.category_id=category.id\r\n WHERE cms_content.id=${pageTag.nextId}\r\n<#else>\r\n SELECT\r\n ${select} as \"id\",\r\n \'\' as \"title\",\r\n ${select} as \"author\",\r\n ${select} as \"source\",\r\n ${select} as \"content\",\r\n ${select} as \"typename\",\r\n ${select} as \"typeid\",\r\n ${select} as \"typelink\",\r\n ${select} as \"litpic\",\r\n ${select} as \"link\",\r\n ${select} as \"date\",\r\n ${select} as \"descrip\",\r\n ${select} as \"hit\",\r\n ${select} as \"flag\",\r\n ${select} as \"keyword\"\r\n FROM dual\r\n</#if>\r\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>\r\n<div id=\"form\" v-cloak style=\"width: 30%; margin: 5% auto\">\r\n <div id=\"formModel\">\r\n <!--会自动渲染代码生成器的表单-->\r\n </div>\r\n <!--必须包含验证码-->\r\n <el-form ref=\"form\" :model=\"form\" :rules=\"rules\" label-position=\"right\" size=\"large\" label-width=\"120px\">\r\n <el-row :gutter=\"0\" justify=\"start\" align=\"top\">\r\n <el-col :span=\"12\">\r\n <el-form-item label=\"验证码\" prop=\"rand_code\">\r\n <el-input\r\n v-model=\"form.rand_code\"\r\n :disabled=\"false\"\r\n :readonly=\"false\"\r\n :clearable=\"true\"\r\n placeholder=\"请输入验证码\">\r\n </el-input>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :span=\"12\">\r\n <div style=\"display: flex; height: 38px;margin-left: 1em; align-items: center; cursor: pointer\">\r\n <img :src=\"verifCode\" class=\"code-img\" @click=\"code\"/>\r\n <div @click=\"code\" style=\"margin-left: 10px\">\r\n 看不清?换一张\r\n </div>\r\n </div>\r\n </el-col>\r\n </el-row>\r\n <el-form-item label=\" \">\r\n <el-button @click=\"save\" type=\"primary\" :loading=\"isLoading\" style=\"width: 200px\">\r\n {{isLoading ? \'\' : \'\'}}\r\n </el-button>\r\n </el-form-item>\r\n </el-form>\r\n</div>\r\n<script>\r\n //vue的实例名称必须为 from\r\n var form = new Vue({\r\n el: \'#form\',\r\n data: {\r\n formModel: undefined, //自定义业务的vue对象\r\n verifCode: \"/code.do?t=\" + new Date().getTime(),\r\n isLoading: false,\r\n form: {\r\n rand_code: \'\'\r\n },\r\n rules: {\r\n rand_code: [\r\n {required: true, message: \'请输入验证码\', trigger: \'blur\'},\r\n {min: 1, max: 4, message: \'长度不能超过4个字符\', trigger: \'change\'}\r\n ],\r\n },\r\n },\r\n methods: {\r\n save: function () {\r\n var that = this;\r\n that.isLoading = true;\r\n //将验证码值复制到自定义模型\r\n form.formModel.form.rand_code = this.form.rand_code;\r\n //调用自定义模型的保存\r\n that.formModel.save(function (res) {\r\n if (res.result) {\r\n that.$notify({\r\n title: \'成功\',\r\n type: \'success\',\r\n message: \'保存成功!\'\r\n });\r\n\r\n } else {\r\n that.$notify({\r\n title: \'失败\',\r\n message: res.msg,\r\n type: \'warning\'\r\n });\r\n }\r\n that.isLoading = false;\r\n });\r\n },\r\n code: function () {\r\n this.verifCode = \"/code.do?t=\" + (new Date).getTime();\r\n }\r\n },\r\n created: function () {\r\n var that = this;\r\n ms.mdiy.model.form(\"formModel\", { \"modelName\": \"${formName}\" }).then(function(obj) {\r\n that.formModel = obj;\r\n });\r\n }\r\n });\r\n</script>\r\n</#macro>', 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 (11, 'diyform', 'macro', '<#macro ms_diyform formName>\r\n<div id=\"form\" v-cloak style=\"width: 30%; margin: 5% auto\">\r\n <div id=\"formModel\">\r\n <!--会自动渲染代码生成器的表单-->\r\n </div>\r\n <!--必须包含验证码-->\r\n <el-form ref=\"form\" :model=\"form\" :rules=\"rules\" label-position=\"right\" size=\"large\" label-width=\"120px\">\r\n <el-row :gutter=\"0\" justify=\"start\" align=\"top\">\r\n <el-col :span=\"12\">\r\n <el-form-item label=\"验证码\" prop=\"rand_code\">\r\n <el-input\r\n v-model=\"form.rand_code\"\r\n :disabled=\"false\"\r\n :readonly=\"false\"\r\n :clearable=\"true\"\r\n placeholder=\"请输入验证码\">\r\n </el-input>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :span=\"12\">\r\n <div style=\"display: flex; height: 38px;margin-left: 1em; align-items: center; cursor: pointer\">\r\n <img :src=\"verifCode\" class=\"code-img\" @click=\"code\"/>\r\n <div @click=\"code\" style=\"margin-left: 10px\">\r\n 看不清?换一张\r\n </div>\r\n </div>\r\n </el-col>\r\n </el-row>\r\n <el-form-item label=\" \">\r\n <el-button @click=\"save\" type=\"primary\" :loading=\"isLoading\" style=\"width: 200px\">\r\n {{isLoading ? \'\' : \'\'}}\r\n </el-button>\r\n </el-form-item>\r\n </el-form>\r\n</div>\r\n<script>\r\n //vue的实例名称必须为 from\r\n var form = new Vue({\r\n el: \'#form\',\r\n data: {\r\n formModel: undefined, //自定义业务的vue对象\r\n verifCode: \"/code.do?t=\" + new Date().getTime(),\r\n isLoading: false,\r\n form: {\r\n rand_code: \'\'\r\n },\r\n rules: {\r\n rand_code: [\r\n {required: true, message: \'请输入验证码\', trigger: \'blur\'},\r\n {min: 1, max: 4, message: \'长度不能超过4个字符\', trigger: \'change\'}\r\n ],\r\n },\r\n },\r\n methods: {\r\n save: function () {\r\n var that = this;\r\n that.isLoading = true;\r\n //将验证码值复制到自定义模型\r\n form.formModel.form.rand_code = this.form.rand_code;\r\n //调用自定义模型的保存\r\n that.formModel.save(function (res) {\r\n if (res.result) {\r\n that.$notify({\r\n title: \'成功\',\r\n type: \'success\',\r\n message: \'保存成功!\'\r\n });\r\n\r\n } else {\r\n that.$notify({\r\n title: \'失败\',\r\n message: res.msg,\r\n type: \'warning\'\r\n });\r\n }\r\n that.isLoading = false;\r\n });\r\n },\r\n code: function () {\r\n this.verifCode = \"/code.do?t=\" + (new Date).getTime();\r\n }\r\n },\r\n created: function () {\r\n var that = this;\r\n ms.mdiy.model.form(\"formModel\", { \"modelName\": \"${formName}\" }).then(function(obj) {\r\n that.formModel = obj;\r\n });\r\n }\r\n });\r\n</script>\r\n</#macro>', 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=${appTemplate!\"\"}&typeid=\', category.category_id) AS \"typelink\",\n <#else>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(\'/\',CONCAT(category_pinyin,\'.html\')) AS \"typelink\",\n <#else>\n CONCAT(category_path,\'/index.html\') AS \"typelink\",\n </#if>\n </#if>\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=${appTemplate!\"\"}&id=\', cms_content.id) AS \"link\",\n <#else>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(\'/\',CONCAT(cms_content.id,\'.html\')) AS \"link\",\n <#else>\n CONCAT(CONCAT(CONCAT(category.category_path,\'/\'),cms_content.id),\'.html\') AS \"link\",\n </#if>\n </#if>\n <#if tableName??>${tableName}.*,</#if>\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 </#if>\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 </#if>\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 (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=${appTemplate!\"\"}&typeid=\', category.category_id) AS \"typelink\",\n <#else>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(\'/\',CONCAT(category_pinyin,\'.html\')) AS \"typelink\",\n <#else>\n CONCAT(category_path,\'/index.html\') AS \"typelink\",\n </#if>\n </#if>\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=${appTemplate!\"\"}&id=\', cms_content.id) AS \"link\",\n <#else>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(\'/\',CONCAT(cms_content.id,\'.html\')) AS \"link\",\n <#else>\n CONCAT(CONCAT(CONCAT(category.category_path,\'/\'),cms_content.id),\'.html\') AS \"link\",\n </#if>\n </#if>\n <#if tableName??>${tableName}.*,</#if>\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 </#if>\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 </#if>\n and cms_content.id=${dataid}\n\n', NULL, '单篇', '57', '2022-11-15 16:10:49', NULL, NULL, 0, 1);

@ -482,7 +482,7 @@ INSERT INTO `mdiy_tag` (`id`, `tag_name`, `tag_type`, `tag_sql`, `tag_class`, `t
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 <#if appId??>\n CONCAT(CONCAT(CONCAT(\'${url}\',\'${html}/\'),app_dir),\'<#if appTemplate?has_content>/</#if>${appTemplate!\"\"}\') as \"url\",\n CONCAT(CONCAT(\'/${html}\',\'/\'),app_dir) as \"html\",\n <#else>\n CONCAT(CONCAT(\'${url}\',\'${html}\'),\'<#if appTemplate?has_content>/</#if>${appTemplate!\"\"}\') as \"url\",\n \'/${html}\' as \"html\",\n </#if>\n <#else>\n CONCAT(CONCAT(CONCAT(\'${url}\',\'${html}\'),\'<#if appDir?has_content>/${app_dir}</#if>\'),\'<#if appTemplate?has_content>/</#if>${appTemplate!\"\"}\') as \"url\",\n CONCAT(\'/${html}\',\'<#if appDir?has_content>/${app_dir}</#if>\') as \"html\",\n </#if>\n \'${url}\' as \"host\",\n </#if>\n CONCAT(CONCAT(CONCAT(\'template/\',id),\'/\'),app_style) as \"style\"\nfrom app\n <#--根据站点编号查询-->\n <#if appId?? >\n where id = ${appId}\n </#if>', 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 <#if appId??>\n CONCAT(CONCAT(CONCAT(\'${url}\',\'${html}/\'),app_dir),\'<#if appTemplate?has_content>/</#if>${appTemplate!\"\"}\') as \"url\",\n CONCAT(CONCAT(\'/${html}\',\'/\'),app_dir) as \"html\",\n <#else>\n CONCAT(CONCAT(\'${url}\',\'${html}\'),\'<#if appTemplate?has_content>/</#if>${appTemplate!\"\"}\') as \"url\",\n \'/${html}\' as \"html\",\n </#if>\n <#else>\n CONCAT(CONCAT(CONCAT(\'${url}\',\'${html}\'),\'<#if appDir?has_content>/${app_dir}</#if>\'),\'<#if appTemplate?has_content>/</#if>${appTemplate!\"\"}\') as \"url\",\n CONCAT(\'/${html}\',\'<#if appDir?has_content>/${app_dir}</#if>\') as \"html\",\n </#if>\n \'${url}\' as \"host\",\n </#if>\n CONCAT(CONCAT(CONCAT(\'template/\',id),\'/\'),app_style) as \"style\"\nfrom app\n <#--根据站点编号查询-->\n <#if appId?? >\n where id = ${appId}\n </#if>', 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}.*,</#if>\n <#--查询站点编号-->\n <#if appId??>\n cms_content.app_id as \"appId\",\n </#if>\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( \'<script type=\"text/javascript\" src=\"${contextPath}/cms/content/\', cms_content.id),\'/hit.do\"></script>\') as \"hit\",\n <#else>\n CONCAT(CONCAT( \'<script type=\"text/javascript\" src=\"/cms/content/\', cms_content.id),\'/hit.do\"></script>\') as \"hit\",\n </#if>\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(\'/\', CONCAT(cms_content.id, \'.html\' )) as \"link\",\n <#else>\n CONCAT(CONCAT( cms_category.category_path, \'/\' ), CONCAT(cms_content.id, \'.html\' )) as \"link\",\n </#if>\n </#if>\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(CONCAT(\'/\',category_pinyin),\'.html\') AS \"typelink\"\n <#else>\n CONCAT(category_path,\'/index.html\') AS \"typelink\"\n </#if>\n </#if>\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</#if>\nWHERE\n <#--如果是栏目列表页没有文章id所以只取栏目id-->\n <#if column??&&column.id??&&!id??>\n cms_category.id=${column.id} and\n </#if>\n <#--根据站点编号查询-->\n <#if appId??>\n cms_content.app_id = ${appId} and\n </#if>\n cms_content.del=0\n <#if id??> and cms_content.id=${id}</#if>\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}.*,</#if>\n <#--查询站点编号-->\n <#if appId??>\n cms_content.app_id as \"appId\",\n </#if>\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( \'<script type=\"text/javascript\" src=\"${contextPath}/cms/content/\', cms_content.id),\'/hit.do\"></script>\') as \"hit\",\n <#else>\n CONCAT(CONCAT( \'<script type=\"text/javascript\" src=\"/cms/content/\', cms_content.id),\'/hit.do\"></script>\') as \"hit\",\n </#if>\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(\'/\', CONCAT(cms_content.id, \'.html\' )) as \"link\",\n <#else>\n CONCAT(CONCAT( cms_category.category_path, \'/\' ), CONCAT(cms_content.id, \'.html\' )) as \"link\",\n </#if>\n </#if>\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(CONCAT(\'/\',category_pinyin),\'.html\') AS \"typelink\"\n <#else>\n CONCAT(category_path,\'/index.html\') AS \"typelink\"\n </#if>\n </#if>\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</#if>\nWHERE\n <#--如果是栏目列表页没有文章id所以只取栏目id-->\n <#if column??&&column.id??&&!id??>\n cms_category.id=${column.id} and\n </#if>\n <#--根据站点编号查询-->\n <#if appId??>\n cms_content.app_id = ${appId} and\n </#if>\n cms_content.del=0\n <#if id??> and cms_content.id=${id}</#if>\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=\"\'\'\"/>\r\n<#if orderby?? >\r\n <#if orderby==\"date\">\r\n <#assign _orderby=\"content_datetime\">\r\n <#elseif orderby==\"updatedate\">\r\n <#assign _orderby=\"cms_content.update_date\">\r\n <#elseif orderby==\"hit\">\r\n <#assign _orderby=\"content_hit\">\r\n <#elseif orderby==\"sort\">\r\n <#assign _orderby=\"content_sort\">\r\n <#else><#assign _orderby=\"cms_content.id\"></#if>\r\n<#else>\r\n <#assign _orderby=\"cms_content.id\">\r\n</#if>\r\n<#--上一页-->\r\n<#if pageTag.preId??>\r\n SELECT\r\n cms_content.id as \"id\",\r\n content_title as \"title\",\r\n content_author as \"author\",\r\n content_source as \"source\",\r\n content_details as \"content\",\r\n category.category_title as \"typename\",\r\n category.category_id as \"typeid\",\r\n <#if isDo?? && isDo>\r\n CONCAT(\'/${modelName}/list.do?typeid=\', cms_category.id) as \"typelink\",\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'/\',CONCAT(category.category_pinyin,\'.html\')) AS \"typelink\",\r\n <#else>\r\n CONCAT(category.category_path,\'/index.html\') AS \"typelink\",\r\n </#if>\r\n </#if>\r\n content_img as \"litpic\",\r\n <#--内容页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\'${modelName}/view.do?id=\', cms_content.id,\'&orderby=${_orderby}\',\'&order=${order!\'ASC\'}\',\'&typeid=${typeid}\') as \"link\",\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(CONCAT(\'/\',cms_content.id),\'.html\') AS \"link\",\r\n <#else>\r\n CONCAT(CONCAT(category_path,\'/\'),CONCAT(cms_content.id,\'.html\')) AS \"link\",\r\n </#if>\r\n </#if>\r\n content_description as \"descrip\",\r\n content_hit as \"hit\",\r\n content_type as \"flag\",\r\n content_keyword as \"keyword\"\r\n FROM cms_content\r\n LEFT JOIN cms_category category ON cms_content.category_id=category.id\r\n WHERE cms_content.id=${pageTag.preId}\r\n<#else>\r\n SELECT\r\n ${select} as \"id\",\r\n \'\' as \"title\",\r\n ${select} as \"author\",\r\n ${select} as \"source\",\r\n ${select} as \"content\",\r\n ${select} as \"typename\",\r\n ${select} as \"typeid\",\r\n ${select} as \"typelink\",\r\n ${select} as \"litpic\",\r\n ${select} as \"typelink\",\r\n ${select} as \"date\",\r\n ${select} as \"descrip\",\r\n ${select} as \"hit\",\r\n ${select} as \"flag\",\r\n ${select} as \"keyword\"\r\n FROM dual\r\n</#if>\r\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=\"\'\'\"/>\r\n<#if orderby?? >\r\n <#if orderby==\"date\">\r\n <#assign _orderby=\"content_datetime\">\r\n <#elseif orderby==\"updatedate\">\r\n <#assign _orderby=\"cms_content.update_date\">\r\n <#elseif orderby==\"hit\">\r\n <#assign _orderby=\"content_hit\">\r\n <#elseif orderby==\"sort\">\r\n <#assign _orderby=\"content_sort\">\r\n <#else><#assign _orderby=\"cms_content.id\"></#if>\r\n<#else>\r\n <#assign _orderby=\"cms_content.id\">\r\n</#if>\r\n<#--上一页-->\r\n<#if pageTag.preId??>\r\n SELECT\r\n cms_content.id as \"id\",\r\n content_title as \"title\",\r\n content_author as \"author\",\r\n content_source as \"source\",\r\n content_details as \"content\",\r\n category.category_title as \"typename\",\r\n category.category_id as \"typeid\",\r\n <#if isDo?? && isDo>\r\n CONCAT(\'/${modelName}/list.do?typeid=\', cms_category.id) as \"typelink\",\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'/\',CONCAT(category.category_pinyin,\'.html\')) AS \"typelink\",\r\n <#else>\r\n CONCAT(category.category_path,\'/index.html\') AS \"typelink\",\r\n </#if>\r\n </#if>\r\n content_img as \"litpic\",\r\n <#--内容页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\'${modelName}/view.do?id=\', cms_content.id,\'&orderby=${_orderby}\',\'&order=${order!\'ASC\'}\',\'&typeid=${typeid}\') as \"link\",\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(CONCAT(\'/\',cms_content.id),\'.html\') AS \"link\",\r\n <#else>\r\n CONCAT(CONCAT(category_path,\'/\'),CONCAT(cms_content.id,\'.html\')) AS \"link\",\r\n </#if>\r\n </#if>\r\n content_description as \"descrip\",\r\n content_hit as \"hit\",\r\n content_type as \"flag\",\r\n content_keyword as \"keyword\"\r\n FROM cms_content\r\n LEFT JOIN cms_category category ON cms_content.category_id=category.id\r\n WHERE cms_content.id=${pageTag.preId}\r\n<#else>\r\n SELECT\r\n ${select} as \"id\",\r\n \'\' as \"title\",\r\n ${select} as \"author\",\r\n ${select} as \"source\",\r\n ${select} as \"content\",\r\n ${select} as \"typename\",\r\n ${select} as \"typeid\",\r\n ${select} as \"typelink\",\r\n ${select} as \"litpic\",\r\n ${select} as \"typelink\",\r\n ${select} as \"date\",\r\n ${select} as \"descrip\",\r\n ${select} as \"hit\",\r\n ${select} as \"flag\",\r\n ${select} as \"keyword\"\r\n FROM dual\r\n</#if>\r\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??>\r\nselect\r\n <#--是否开启短链接-->\r\n <#if shortSwitch?? && shortSwitch>\r\n \'${shortSwitch?string(\'true\',\'false\')}\' as \"shortSwitch\",\r\n </#if>\r\n <#if !(pageTag.indexUrl??)>\r\n <#--判断是否有栏目对象,用于搜索不传栏目-->\r\n <#if column??>\r\n <#if shortSwitch?? && shortSwitch>\r\n <#assign path=column.categoryPinyin/>\r\n <#else>\r\n <#assign path=column.categoryPath/>\r\n </#if>\r\n <#else>\r\n <#assign path=\'\' />\r\n </#if>\r\n <#--总记录数、总页数-->\r\n \'${pageTag.total}\' as \"total\",\r\n \'${pageTag.size}\' as \"size\",\r\n\r\n <#--记录总数-->\r\n \'${pageTag.rcount}\' as \"rcount\",\r\n <#--当前页码-->\r\n \'${pageTag.pageNo}\' as \"cur\",\r\n <#--首页-->\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'${path}\', \'.html\') as \"index\",\r\n <#else>\r\n CONCAT(\'${path}\', \'/index.html\') as \"index\",\r\n </#if>\r\n <#--上一页-->\r\n <#if (pageTag.pageNo?eval-1) gt 1>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'${path}\',\'-${pageTag.pageNo?eval-1}.html\') as \"pre\",\r\n <#else>\r\n CONCAT(\'${path}\',\'/list-${pageTag.pageNo?eval-1}.html\') as \"pre\",\r\n </#if>\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'${path}\',\'.html\') as \"pre\",\r\n <#else>\r\n CONCAT(\'${path}\',\'/index.html\') as \"pre\",\r\n </#if>\r\n </#if>\r\n <#--下一页-->\r\n <#if pageTag.total==0>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'${path}\', \'.html\') as \"next\",\r\n CONCAT(\'${path}\', \'.html\') as \"last\"\r\n <#else>\r\n CONCAT(\'${path}\', \'/index.html\') as \"next\",\r\n CONCAT(\'${path}\', \'/index.html\') as \"last\"\r\n </#if>\r\n <#else>\r\n <#if pageTag.pageNo?eval gte pageTag.total>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'${path}\',\'-${pageTag.total}.html\') as \"next\",\r\n <#else>\r\n CONCAT(\'${path}\',\'/list-${pageTag.total}.html\') as \"next\",\r\n </#if>\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'${path}\',\'-${pageTag.pageNo?eval+1}.html\') as \"next\",\r\n <#else>\r\n CONCAT(\'${path}\',\'/list-${pageTag.pageNo?eval+1}.html\') as \"next\",\r\n </#if>\r\n </#if>\r\n <#--最后一页-->\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'${path}\',\'-${pageTag.total}.html\') as \"last\"\r\n <#else>\r\n CONCAT(\'${path}\',\'/list-${pageTag.total}.html\') as \"last\"\r\n </#if>\r\n </#if>\r\n <#else>\r\n <#--判断是否是搜索页面-->\r\n \'${pageTag.indexUrl}\' as \"index\",\r\n \'${pageTag.lastUrl}\' as \"last\",\r\n \'${pageTag.preUrl}\' as \"pre\",\r\n \'${pageTag.nextUrl}\' as \"next\",\r\n \'${pageTag.total}\' as \"total\",\r\n \'${pageTag.size}\' as \"size\",\r\n \'${pageTag.rcount}\' as \"rcount\",\r\n \'${pageTag.pageNo}\' as \"cur\"\r\n </#if>\r\n from dual\r\n</#if>', 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 </#if>\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 </#if>\n <#else>\n <#assign path=\'\' />\n </#if>\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 </#if>\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 </#if>\n <#else>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(\'${path}\',\'.html\') as \"pre\",\n <#else>\n CONCAT(\'${path}\',\'/index.html\') as \"pre\",\n </#if>\n </#if>\n <#--下一页-->\n <#if pageTag.total==0>\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 </#if>\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 </#if>\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 </#if>\n </#if>\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 </#if>\n </#if>\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 </#if>\n from dual\n</#if>', 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=\"\'\'\"/>\r\n<#if orderby?? >\r\n <#if orderby==\"date\">\r\n <#assign _orderby=\"content_datetime\">\r\n <#elseif orderby==\"updatedate\">\r\n <#assign _orderby=\"cms_content.update_date\">\r\n <#elseif orderby==\"hit\">\r\n <#assign _orderby=\"content_hit\">\r\n <#elseif orderby==\"sort\">\r\n <#assign _orderby=\"content_sort\">\r\n <#else>\r\n <#assign _orderby=\"cms_content.id\"></#if>\r\n <#else>\r\n <#assign _orderby=\"cms_content.id\">\r\n </#if>\r\n<#--开始-->\r\n<#if pageTag.nextId??>\r\n SELECT\r\n cms_content.id as \"id\",\r\n content_title as \"title\",\r\n content_author as \"author\",\r\n content_source as \"source\",\r\n content_details as \"content\",\r\n category.category_title as \"typename\",\r\n category.category_id as \"typeid\",\r\n <#if isDo?? && isDo>\r\n CONCAT(\'/${modelName}/list.do?typeid=\', cms_category.id) as \"typelink\",\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'/\',CONCAT(category.category_pinyin,\'.html\')) AS \"typelink\",\r\n <#else>\r\n CONCAT(category.category_path,\'/index.html\') AS \"typelink\",\r\n </#if>\r\n </#if>\r\n content_img as \"litpic\",\r\n <#--内容页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\'${modelName}/view.do?id=\', cms_content.id,\'&orderby=${_orderby}\',\'&order=${order!\'ASC\'}\',\'&typeid=${typeid}\') as \"link\",\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(CONCAT(\'/\',cms_content.id),\'.html\') AS \"link\",\r\n <#else>\r\n CONCAT(CONCAT(category_path,\'/\'),CONCAT(cms_content.id,\'.html\')) AS \"link\",\r\n </#if>\r\n </#if>\r\n content_description as \"descrip\",\r\n content_hit as \"hit\",\r\n content_type as \"flag\",\r\n content_keyword as \"keyword\"\r\n FROM cms_content\r\n LEFT JOIN cms_category category ON cms_content.category_id=category.id\r\n WHERE cms_content.id=${pageTag.nextId}\r\n<#else>\r\n SELECT\r\n ${select} as \"id\",\r\n \'\' as \"title\",\r\n ${select} as \"author\",\r\n ${select} as \"source\",\r\n ${select} as \"content\",\r\n ${select} as \"typename\",\r\n ${select} as \"typeid\",\r\n ${select} as \"typelink\",\r\n ${select} as \"litpic\",\r\n ${select} as \"link\",\r\n ${select} as \"date\",\r\n ${select} as \"descrip\",\r\n ${select} as \"hit\",\r\n ${select} as \"flag\",\r\n ${select} as \"keyword\"\r\n FROM dual\r\n</#if>\r\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=\"\'\'\"/>\r\n<#if orderby?? >\r\n <#if orderby==\"date\">\r\n <#assign _orderby=\"content_datetime\">\r\n <#elseif orderby==\"updatedate\">\r\n <#assign _orderby=\"cms_content.update_date\">\r\n <#elseif orderby==\"hit\">\r\n <#assign _orderby=\"content_hit\">\r\n <#elseif orderby==\"sort\">\r\n <#assign _orderby=\"content_sort\">\r\n <#else>\r\n <#assign _orderby=\"cms_content.id\"></#if>\r\n <#else>\r\n <#assign _orderby=\"cms_content.id\">\r\n </#if>\r\n<#--开始-->\r\n<#if pageTag.nextId??>\r\n SELECT\r\n cms_content.id as \"id\",\r\n content_title as \"title\",\r\n content_author as \"author\",\r\n content_source as \"source\",\r\n content_details as \"content\",\r\n category.category_title as \"typename\",\r\n category.category_id as \"typeid\",\r\n <#if isDo?? && isDo>\r\n CONCAT(\'/${modelName}/list.do?typeid=\', cms_category.id) as \"typelink\",\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'/\',CONCAT(category.category_pinyin,\'.html\')) AS \"typelink\",\r\n <#else>\r\n CONCAT(category.category_path,\'/index.html\') AS \"typelink\",\r\n </#if>\r\n </#if>\r\n content_img as \"litpic\",\r\n <#--内容页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\'${modelName}/view.do?id=\', cms_content.id,\'&orderby=${_orderby}\',\'&order=${order!\'ASC\'}\',\'&typeid=${typeid}\') as \"link\",\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(CONCAT(\'/\',cms_content.id),\'.html\') AS \"link\",\r\n <#else>\r\n CONCAT(CONCAT(category_path,\'/\'),CONCAT(cms_content.id,\'.html\')) AS \"link\",\r\n </#if>\r\n </#if>\r\n content_description as \"descrip\",\r\n content_hit as \"hit\",\r\n content_type as \"flag\",\r\n content_keyword as \"keyword\"\r\n FROM cms_content\r\n LEFT JOIN cms_category category ON cms_content.category_id=category.id\r\n WHERE cms_content.id=${pageTag.nextId}\r\n<#else>\r\n SELECT\r\n ${select} as \"id\",\r\n \'\' as \"title\",\r\n ${select} as \"author\",\r\n ${select} as \"source\",\r\n ${select} as \"content\",\r\n ${select} as \"typename\",\r\n ${select} as \"typeid\",\r\n ${select} as \"typelink\",\r\n ${select} as \"litpic\",\r\n ${select} as \"link\",\r\n ${select} as \"date\",\r\n ${select} as \"descrip\",\r\n ${select} as \"hit\",\r\n ${select} as \"flag\",\r\n ${select} as \"keyword\"\r\n FROM dual\r\n</#if>\r\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>\r\n<div id=\"form\" v-cloak style=\"width: 30%; margin: 5% auto\">\r\n <div id=\"formModel\">\r\n <!--会自动渲染代码生成器的表单-->\r\n </div>\r\n <!--必须包含验证码-->\r\n <el-form ref=\"form\" :model=\"form\" :rules=\"rules\" label-position=\"right\" size=\"large\" label-width=\"120px\">\r\n <el-row :gutter=\"0\" justify=\"start\" align=\"top\">\r\n <el-col :span=\"12\">\r\n <el-form-item label=\"验证码\" prop=\"rand_code\">\r\n <el-input\r\n v-model=\"form.rand_code\"\r\n :disabled=\"false\"\r\n :readonly=\"false\"\r\n :clearable=\"true\"\r\n placeholder=\"请输入验证码\">\r\n </el-input>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :span=\"12\">\r\n <div style=\"display: flex; height: 38px;margin-left: 1em; align-items: center; cursor: pointer\">\r\n <img :src=\"verifCode\" class=\"code-img\" @click=\"code\"/>\r\n <div @click=\"code\" style=\"margin-left: 10px\">\r\n 看不清?换一张\r\n </div>\r\n </div>\r\n </el-col>\r\n </el-row>\r\n <el-form-item label=\" \">\r\n <el-button @click=\"save\" type=\"primary\" :loading=\"isLoading\" style=\"width: 200px\">\r\n {{isLoading ? \'\' : \'\'}}\r\n </el-button>\r\n </el-form-item>\r\n </el-form>\r\n</div>\r\n<script>\r\n //vue的实例名称必须为 from\r\n var form = new Vue({\r\n el: \'#form\',\r\n data: {\r\n formModel: undefined, //自定义业务的vue对象\r\n verifCode: \"/code.do?t=\" + new Date().getTime(),\r\n isLoading: false,\r\n form: {\r\n rand_code: \'\'\r\n },\r\n rules: {\r\n rand_code: [\r\n {required: true, message: \'请输入验证码\', trigger: \'blur\'},\r\n {min: 1, max: 4, message: \'长度不能超过4个字符\', trigger: \'change\'}\r\n ],\r\n },\r\n },\r\n methods: {\r\n save: function () {\r\n var that = this;\r\n that.isLoading = true;\r\n //将验证码值复制到自定义模型\r\n form.formModel.form.rand_code = this.form.rand_code;\r\n //调用自定义模型的保存\r\n that.formModel.save(function (res) {\r\n if (res.result) {\r\n that.$notify({\r\n title: \'成功\',\r\n type: \'success\',\r\n message: \'保存成功!\'\r\n });\r\n\r\n } else {\r\n that.$notify({\r\n title: \'失败\',\r\n message: res.msg,\r\n type: \'warning\'\r\n });\r\n }\r\n that.isLoading = false;\r\n });\r\n },\r\n code: function () {\r\n this.verifCode = \"/code.do?t=\" + (new Date).getTime();\r\n }\r\n },\r\n created: function () {\r\n var that = this;\r\n ms.mdiy.model.form(\"formModel\", { \"modelName\": \"${formName}\" }).then(function(obj) {\r\n that.formModel = obj;\r\n });\r\n }\r\n });\r\n</script>\r\n</#macro>', 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 (11, 'diyform', 'macro', '<#macro ms_diyform formName>\r\n<div id=\"form\" v-cloak style=\"width: 30%; margin: 5% auto\">\r\n <div id=\"formModel\">\r\n <!--会自动渲染代码生成器的表单-->\r\n </div>\r\n <!--必须包含验证码-->\r\n <el-form ref=\"form\" :model=\"form\" :rules=\"rules\" label-position=\"right\" size=\"large\" label-width=\"120px\">\r\n <el-row :gutter=\"0\" justify=\"start\" align=\"top\">\r\n <el-col :span=\"12\">\r\n <el-form-item label=\"验证码\" prop=\"rand_code\">\r\n <el-input\r\n v-model=\"form.rand_code\"\r\n :disabled=\"false\"\r\n :readonly=\"false\"\r\n :clearable=\"true\"\r\n placeholder=\"请输入验证码\">\r\n </el-input>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :span=\"12\">\r\n <div style=\"display: flex; height: 38px;margin-left: 1em; align-items: center; cursor: pointer\">\r\n <img :src=\"verifCode\" class=\"code-img\" @click=\"code\"/>\r\n <div @click=\"code\" style=\"margin-left: 10px\">\r\n 看不清?换一张\r\n </div>\r\n </div>\r\n </el-col>\r\n </el-row>\r\n <el-form-item label=\" \">\r\n <el-button @click=\"save\" type=\"primary\" :loading=\"isLoading\" style=\"width: 200px\">\r\n {{isLoading ? \'\' : \'\'}}\r\n </el-button>\r\n </el-form-item>\r\n </el-form>\r\n</div>\r\n<script>\r\n //vue的实例名称必须为 from\r\n var form = new Vue({\r\n el: \'#form\',\r\n data: {\r\n formModel: undefined, //自定义业务的vue对象\r\n verifCode: \"/code.do?t=\" + new Date().getTime(),\r\n isLoading: false,\r\n form: {\r\n rand_code: \'\'\r\n },\r\n rules: {\r\n rand_code: [\r\n {required: true, message: \'请输入验证码\', trigger: \'blur\'},\r\n {min: 1, max: 4, message: \'长度不能超过4个字符\', trigger: \'change\'}\r\n ],\r\n },\r\n },\r\n methods: {\r\n save: function () {\r\n var that = this;\r\n that.isLoading = true;\r\n //将验证码值复制到自定义模型\r\n form.formModel.form.rand_code = this.form.rand_code;\r\n //调用自定义模型的保存\r\n that.formModel.save(function (res) {\r\n if (res.result) {\r\n that.$notify({\r\n title: \'成功\',\r\n type: \'success\',\r\n message: \'保存成功!\'\r\n });\r\n\r\n } else {\r\n that.$notify({\r\n title: \'失败\',\r\n message: res.msg,\r\n type: \'warning\'\r\n });\r\n }\r\n that.isLoading = false;\r\n });\r\n },\r\n code: function () {\r\n this.verifCode = \"/code.do?t=\" + (new Date).getTime();\r\n }\r\n },\r\n created: function () {\r\n var that = this;\r\n ms.mdiy.model.form(\"formModel\", { \"modelName\": \"${formName}\" }).then(function(obj) {\r\n that.formModel = obj;\r\n });\r\n }\r\n });\r\n</script>\r\n</#macro>', 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=${appTemplate!\"\"}&typeid=\', category.category_id) AS \"typelink\",\n <#else>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(\'/\',CONCAT(category_pinyin,\'.html\')) AS \"typelink\",\n <#else>\n CONCAT(category_path,\'/index.html\') AS \"typelink\",\n </#if>\n </#if>\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=${appTemplate!\"\"}&id=\', cms_content.id) AS \"link\",\n <#else>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(\'/\',CONCAT(cms_content.id,\'.html\')) AS \"link\",\n <#else>\n CONCAT(CONCAT(CONCAT(category.category_path,\'/\'),cms_content.id),\'.html\') AS \"link\",\n </#if>\n </#if>\n <#if tableName??>${tableName}.*,</#if>\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 </#if>\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 </#if>\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 (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=${appTemplate!\"\"}&typeid=\', category.category_id) AS \"typelink\",\n <#else>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(\'/\',CONCAT(category_pinyin,\'.html\')) AS \"typelink\",\n <#else>\n CONCAT(category_path,\'/index.html\') AS \"typelink\",\n </#if>\n </#if>\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=${appTemplate!\"\"}&id=\', cms_content.id) AS \"link\",\n <#else>\n <#if shortSwitch?? && shortSwitch>\n CONCAT(\'/\',CONCAT(cms_content.id,\'.html\')) AS \"link\",\n <#else>\n CONCAT(CONCAT(CONCAT(category.category_path,\'/\'),cms_content.id),\'.html\') AS \"link\",\n </#if>\n </#if>\n <#if tableName??>${tableName}.*,</#if>\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 </#if>\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 </#if>\n and cms_content.id=${dataid}\n\n', NULL, '单篇', '57', '2022-11-15 16:10:49', NULL, NULL, 0, 1);

Loading…
Cancel
Save