5.4.2-up-5.4.3.sql 64 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. UPDATE model p1 JOIN (SELECT t1.id,t2.id AS model_id,t2.model_name,t1.model_url FROM model t1 JOIN mdiy_model t2 ON t1.model_url LIKE CONCAT( '%modelName=', t2.model_name, '%' )) p2 ON p1.id = p2.id SET p1.model_url = REPLACE (p1.model_url,CONCAT( 'modelName=', p2.model_name ),CONCAT( 'modelId=', p2.model_id ));
  2. ALTER TABLE `app` ADD COLUMN `APP_URLS` varchar(255) NULL COMMENT '站点附加域名,用英文,分割' AFTER `app_url`;
  3. ALTER TABLE `mdiy_tag` ADD COLUMN `MODEL_ID` varchar(19) NULL COMMENT '模型id' AFTER `tag_description`;
  4. ALTER TABLE `mdiy_config` ADD COLUMN `MODEL_ID` varchar(19) NULL COMMENT '模型id' AFTER `id`;
  5. ALTER TABLE `mdiy_config`ADD COLUMN `CONFIG_TYPE` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'config' COMMENT '模型类型 config:自定义配置 tag:自定义标签' AFTER `CONFIG_DATA`;
  6. ALTER TABLE `cms_category` ADD COLUMN `IS_CHILD` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'cms' COMMENT '扩展业务标记' AFTER `CATEGORY_SORT`;
  7. UPDATE `cms_category` SET `IS_CHILD` = 'cms';
  8. UPDATE `mdiy_config` SET `CONFIG_TYPE` = 'config';
  9. INSERT INTO `mdiy_model` (`ID`, `model_json`, `model_table_name`, `model_name`, `model_id_type`, `model_type`, `model_field`, `model_custom_type`, `update_date`, `update_by`, `create_date`, `create_by`, `del`, `NOT_DEL`) VALUES (1860892324126367745, '{\"searchJson\":\"[\\n //电话号码\\n {\'isSearch\':\'\',\'action\':\'and\', \'field\': \'TEL\', \'el\': \'eq\', \'model\': \'tel\', \'name\': \'电话号码\', \'type\': \'input\'},\\n]\\n\",\"isWebCode\":false,\"form\":\"[{\\\"type\\\":\\\"input\\\",\\\"name\\\":\\\"电话号码\\\",\\\"icon\\\":\\\"icon-danhangwenben\\\",\\\"pmofAllowUpdate\\\":1,\\\"pmofAllowGenerater\\\":1,\\\"pmofAllowRepet\\\":1,\\\"pmofAllowValidator\\\":1,\\\"pmofAllowEmpty\\\":0,\\\"pmofLength\\\":255,\\\"pmofType\\\":\\\"VARCHAR\\\",\\\"pmofJavaType\\\":\\\"String\\\",\\\"pmofSort\\\":0,\\\"likeSearch\\\":true,\\\"help\\\":\\\"标签:{ms:global.foot.tel/}\\\",\\\"options\\\":{\\\"isShow\\\":true,\\\"isFk\\\":false,\\\"readonly\\\":false,\\\"width\\\":\\\"100%\\\",\\\"repeat\\\":false,\\\"defaultValue\\\":\\\"\\\",\\\"clearable\\\":true,\\\"isLength\\\":true,\\\"lengthConfig\\\":{\\\"min\\\":0,\\\"max\\\":255},\\\"required\\\":false,\\\"dataType\\\":\\\"string\\\",\\\"isPattern\\\":false,\\\"isDataType\\\":false,\\\"pattern\\\":\\\"\\\",\\\"placeholder\\\":\\\"请输入电话号码\\\",\\\"disabled\\\":false,\\\"table\\\":{\\\"search\\\":false,\\\"show\\\":true,\\\"align\\\":\\\"left\\\"}},\\\"key\\\":\\\"INPUT_OFDLN\\\",\\\"model\\\":\\\"TEL\\\",\\\"rules\\\":\\\"[{\\\\\\\"min\\\\\\\":0,\\\\\\\"max\\\\\\\":255,\\\\\\\"message\\\\\\\":\\\\\\\"电话号码长度必须为0-255\\\\\\\"}]\\\"},{\\\"type\\\":\\\"time\\\",\\\"name\\\":\\\"底部服务时间\\\",\\\"icon\\\":\\\"icon-shijian-xianxing\\\",\\\"pmofAllowUpdate\\\":1,\\\"pmofAllowGenerater\\\":1,\\\"pmofAllowRepet\\\":1,\\\"pmofAllowValidator\\\":1,\\\"pmofAllowEmpty\\\":0,\\\"pmofType\\\":\\\"TIME\\\",\\\"pmofJavaType\\\":\\\"Date\\\",\\\"pmofSort\\\":0,\\\"pmofLength\\\":0,\\\"likeSearch\\\":false,\\\"help\\\":\\\"标签:{ms:global.foot.timeBegin/} -\\\\n{ms:global.foot.timeEnd/} \\\\n \\\",\\\"options\\\":{\\\"isShow\\\":true,\\\"defaultValue\\\":null,\\\"readonly\\\":false,\\\"disabled\\\":false,\\\"editable\\\":true,\\\"clearable\\\":true,\\\"placeholder\\\":\\\"请选择底部服务时间\\\",\\\"startPlaceholder\\\":\\\"开始时间\\\",\\\"endPlaceholder\\\":\\\"结束时间\\\",\\\"isRange\\\":true,\\\"arrowControl\\\":true,\\\"format\\\":\\\"HH:mm:ss\\\",\\\"required\\\":false,\\\"width\\\":\\\"100%\\\",\\\"table\\\":{\\\"search\\\":false,\\\"show\\\":true,\\\"width\\\":120,\\\"align\\\":\\\"center\\\"},\\\"label\\\":\\\"开始时间\\\",\\\"attachField\\\":[{\\\"type\\\":\\\"time\\\",\\\"name\\\":\\\"结束时间\\\",\\\"model\\\":\\\"TIME_END\\\",\\\"key\\\":\\\"1733127110000_98951\\\",\\\"pmofAllowUpdate\\\":1,\\\"pmofAllowGenerater\\\":1,\\\"pmofAllowRepet\\\":1,\\\"pmofAllowValidator\\\":1,\\\"pmofAllowEmpty\\\":1,\\\"pmofType\\\":\\\"TIME\\\",\\\"pmofJavaType\\\":\\\"Date\\\",\\\"pmofSort\\\":0,\\\"options\\\":{\\\"isShow\\\":true,\\\"defaultValue\\\":[],\\\"readonly\\\":false,\\\"disabled\\\":false,\\\"editable\\\":true,\\\"clearable\\\":true,\\\"placeholder\\\":\\\"请选择时间选择器\\\",\\\"startPlaceholder\\\":\\\"开始时间\\\",\\\"endPlaceholder\\\":\\\"结束时间\\\",\\\"isRange\\\":true,\\\"arrowControl\\\":true,\\\"format\\\":\\\"HH:mm:ss\\\",\\\"required\\\":false,\\\"width\\\":\\\"100%\\\",\\\"table\\\":{\\\"search\\\":false,\\\"show\\\":false,\\\"width\\\":120,\\\"align\\\":\\\"center\\\"}}}]},\\\"key\\\":\\\"TIME_NYRBY\\\",\\\"model\\\":\\\"TIME_BEGIN\\\",\\\"rules\\\":\\\"[]\\\"},{\\\"type\\\":\\\"imgupload\\\",\\\"name\\\":\\\"网站ico\\\",\\\"icon\\\":\\\"icon-tupian2\\\",\\\"pmofAllowUpdate\\\":1,\\\"pmofAllowGenerater\\\":1,\\\"pmofAllowRepet\\\":1,\\\"pmofAllowValidator\\\":1,\\\"pmofAllowEmpty\\\":0,\\\"pmofLength\\\":1000,\\\"pmofType\\\":\\\"VARCHAR\\\",\\\"pmofJavaType\\\":\\\"String\\\",\\\"pmofSort\\\":0,\\\"likeSearch\\\":false,\\\"help\\\":\\\"标签:{@ms:file global.foot.ico/}\\\",\\\"options\\\":{\\\"isShow\\\":true,\\\"defaultValue\\\":[],\\\"required\\\":false,\\\"width\\\":\\\"\\\",\\\"tokenFunc\\\":\\\"funcGetToken\\\",\\\"token\\\":\\\"\\\",\\\"domain\\\":\\\"http://pfp81ptt6.bkt.clouddn.com/\\\",\\\"disabled\\\":false,\\\"limit\\\":1,\\\"multiple\\\":false,\\\"isQiniu\\\":false,\\\"action\\\":\\\"ms.manager+\'/file/upload.do\'\\\",\\\"table\\\":{\\\"show\\\":true,\\\"align\\\":\\\"left\\\"}},\\\"key\\\":\\\"IMGUPLOAD_KKLFY\\\",\\\"model\\\":\\\"ICO\\\",\\\"rules\\\":\\\"[]\\\"},{\\\"type\\\":\\\"imgupload\\\",\\\"name\\\":\\\"底部微信二维码\\\",\\\"icon\\\":\\\"icon-tupian2\\\",\\\"pmofAllowUpdate\\\":1,\\\"pmofAllowGenerater\\\":1,\\\"pmofAllowRepet\\\":1,\\\"pmofAllowValidator\\\":1,\\\"pmofAllowEmpty\\\":0,\\\"pmofLength\\\":1000,\\\"pmofType\\\":\\\"VARCHAR\\\",\\\"pmofJavaType\\\":\\\"String\\\",\\\"pmofSort\\\":0,\\\"likeSearch\\\":false,\\\"help\\\":\\\"标签:{@ms:file global.foot.qrCode/}\\\",\\\"options\\\":{\\\"isShow\\\":true,\\\"defaultValue\\\":[],\\\"required\\\":false,\\\"width\\\":\\\"\\\",\\\"tokenFunc\\\":\\\"funcGetToken\\\",\\\"token\\\":\\\"\\\",\\\"domain\\\":\\\"http://pfp81ptt6.bkt.clouddn.com/\\\",\\\"disabled\\\":false,\\\"limit\\\":1,\\\"multiple\\\":false,\\\"isQiniu\\\":false,\\\"action\\\":\\\"ms.manager+\'/file/upload.do\'\\\",\\\"table\\\":{\\\"show\\\":true,\\\"align\\\":\\\"left\\\"}},\\\"key\\\":\\\"IMGUPLOAD_MAOHJ\\\",\\\"model\\\":\\\"QR_CODE\\\",\\\"rules\\\":\\\"[]\\\"}]\",\"isWebSubmit\":false,\"html\":\"\\n<template id=\\\"custom-model\\\">\\n <el-form ref=\\\"form\\\" :model=\\\"form\\\" :rules=\\\"rules\\\" label-width=\\\"120px\\\" label-position=\\\"right\\\" size=\\\"default\\\" :disabled=\\\"disabled\\\" v-loading=\\\"loading\\\">\\n <!--电话号码-->\\n\\n\\t <el-form-item label=\\\"电话号码\\\" prop=\\\"tel\\\">\\n\\t <el-input\\n v-model=\\\"form.tel\\\"\\n :disabled=\\\"false\\\"\\n :readonly=\\\"false\\\"\\n :style=\\\"{width: \'100%\'}\\\"\\n :clearable=\\\"true\\\"\\n placeholder=\\\"请输入电话号码\\\">\\n </el-input>\\n <div class=\\\"ms-form-tip\\\">\\n标签:{ms:global.foot.tel/} </div>\\n\\t </el-form-item> \\n <!--底部服务时间-->\\n \\n <el-form-item label=\\\"底部服务时间\\\" prop=\\\"timeBegin\\\">\\n <el-time-picker\\n \\n v-model=\\\"form.timeBegin\\\"\\n \\n :is-range=\\\"true\\\"\\n \\n :readonly=\\\"false\\\"\\n :disabled=\\\"false\\\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t:editable=\\\"true\\\" :clearable=\\\"true\\\"\\n value-format=\\\"HH:mm:ss\\\"\\n \\n :arrow-control=\\\"true\\\" :style=\\\"{width:\'100%\'}\\\">\\n </el-time-picker>\\n <div class=\\\"ms-form-tip\\\">\\n标签:{ms:global.foot.timeBegin/} -\\n{ms:global.foot.timeEnd/} </div>\\n </el-form-item>\\n \\n <!--网站ico-->\\n \\n <el-form-item label=\\\"网站ico\\\" prop=\\\"ico\\\">\\n <el-upload\\n :file-list=\\\"form.ico\\\"\\n :action=\\\"ms.manager+\'/file/upload.do\'\\\"\\n :limit=\\\"1\\\"\\n multiple\\n :disabled=\\\"false\\\"\\n :data=\\\"{uploadPath:\'/global/\',\'isRename\':true,\'appId\':true}\\\"\\n :on-remove=\\\"icoHandleRemove\\\"\\n :on-exceed=\\\"icoHandleExceed\\\"\\n :on-preview=\\\"icoHandlePreview\\\"\\n :on-success=\\\"icoSuccess\\\"\\n :on-error=\\\"icoError\\\"\\n accept=\\\"image/*\\\"\\n list-type=\\\"picture-card\\\">\\n <i class=\\\"el-icon-plus\\\"></i>\\n <template #tip>\\n <div class=\\\"el-upload__tip\\\">最多上传1张图片</div>\\n </template>\\n </el-upload>\\n <div class=\\\"ms-form-tip\\\">\\n标签:{@ms:file global.foot.ico/} </div>\\n </el-form-item>\\n \\n <!--底部微信二维码-->\\n \\n <el-form-item label=\\\"底部微信二维码\\\" prop=\\\"qrCode\\\">\\n <el-upload\\n :file-list=\\\"form.qrCode\\\"\\n :action=\\\"ms.manager+\'/file/upload.do\'\\\"\\n :limit=\\\"1\\\"\\n multiple\\n :disabled=\\\"false\\\"\\n :data=\\\"{uploadPath:\'/global/\',\'isRename\':true,\'appId\':true}\\\"\\n :on-remove=\\\"qrCodeHandleRemove\\\"\\n :on-exceed=\\\"qrCodeHandleExceed\\\"\\n :on-preview=\\\"qrCodeHandlePreview\\\"\\n :on-success=\\\"qrCodeSuccess\\\"\\n :on-error=\\\"qrCodeError\\\"\\n accept=\\\"image/*\\\"\\n list-type=\\\"picture-card\\\">\\n <i class=\\\"el-icon-plus\\\"></i>\\n <template #tip>\\n <div class=\\\"el-upload__tip\\\">最多上传1张图片</div>\\n </template>\\n </el-upload>\\n <div class=\\\"ms-form-tip\\\">\\n标签:{@ms:file global.foot.qrCode/} </div>\\n </el-form-item>\\n \\n </el-form>\\n</template>\\n\",\"id\":1,\"script\":\"var custom_model = Vue.component(\\\"custom-model\\\",{\\n el: \'#custom-model\',\\n data:function() {\\n return {\\n\\t\\t\\tloading:false,\\n disabled:false,\\n modelId:0,\\n modelName: \\\"foot\\\",\\n //表单数据\\n form: {\\n linkId:0,\\n // 电话号码\\n tel:\'\',\\n //底部服务时间\\n timeBegin:null,\\n // 网站ico\\n ico: [],\\n // 底部微信二维码\\n qrCode: [],\\n },\\n\\n rules:{\\n // 电话号码\\n tel: [{\\\"min\\\":0,\\\"max\\\":255,\\\"message\\\":\\\"电话号码长度必须为0-255\\\"}],\\n },\\n }\\n },\\n watch:{\\n },\\n components:{\\n },\\n computed:{\\n },\\n methods: {\\n \\tlink:function(e,field,binds){\\n \\t\\tlet that = this;\\n binds.forEach(function(item){\\n \\t\\t\\t\\tms.http.post(ms.manager+\'/project/form/link.do\', {id:that.modelId,field:item.field,value:e}).then(function (res) {\\n if(res.result && res.data) {\\n that.form[ms.util.camelCaseString(item.field)]=res.data[0][item.target];\\n }else{\\n that.$notify({\\n title: \'失败\',\\n message: res.msg,\\n type: \'warning\'\\n });\\n }\\n })\\n\\n });\\n \\t},\\n //底部服务时间时间格式化\\n timeBeginFormat:function(row, column, cellValue, index){\\n\\n return row.TIME_BEGIN+\\\" - \\\"+row.TIME_END;\\n },\\n // ico删除\\n icoHandleRemove: function (file, files) {\\n \\tvar index = -1;\\n \\tindex = this.form.ico.findIndex(function (text) {\\n \\t\\treturn text.uid == file.uid;\\n \\t});\\n \\tif (index != -1) {\\n \\t\\tthis.form.ico.splice(index, 1);\\n \\t}\\n },\\n //ico上传超过限制\\n icoHandleExceed: function (files, fileList) {\\n \\tthis.$notify({\\n \\t\\ttitle: \'失败\',\\n \\t\\tmessage: \'当前最多上传1个文件\',\\n \\t\\ttype: \'warning\'\\n \\t});\\n },\\n //ico预览\\n icoHandlePreview: function (file){\\n\\t\\t\\t\\twindow.open(file.url);\\n },\\n //ico上传成功\\n icoSuccess: function (response, file, fileList) {\\n \\tif (response.result) {\\n \\t\\tthis.form.ico.push({\\n \\t\\t\\turl: response.data,\\n \\t\\t\\tname: file.name,\\n \\t\\t\\tuid: file.uid\\n \\t\\t});\\n \\t} else {\\n \\t\\tthis.$notify({\\n \\t\\t\\ttitle: \'失败\',\\n \\t\\t\\tmessage: response.msg,\\n \\t\\t\\ttype: \'warning\'\\n \\t\\t});\\n \\t}\\n },\\n //ico上传失败\\n icoError: function (response, file, fileList) {\\n \\tresponse = response.toString().replace(\\\"Error: \\\",\\\"\\\")\\n \\tresponse = JSON.parse(response);\\n \\tthis.$notify({\\n \\t\\ttitle: \'失败\',\\n \\t\\tmessage: response.msg,\\n \\t\\ttype: \'warning\'\\n \\t});\\n }, // qrCode删除\\n qrCodeHandleRemove: function (file, files) {\\n \\tvar index = -1;\\n \\tindex = this.form.qrCode.findIndex(function (text) {\\n \\t\\treturn text.uid == file.uid;\\n \\t});\\n \\tif (index != -1) {\\n \\t\\tthis.form.qrCode.splice(index, 1);\\n \\t}\\n },\\n //qrCode上传超过限制\\n qrCodeHandleExceed: function (files, fileList) {\\n \\tthis.$notify({\\n \\t\\ttitle: \'失败\',\\n \\t\\tmessage: \'当前最多上传1个文件\',\\n \\t\\ttype: \'warning\'\\n \\t});\\n },\\n //qrCode预览\\n qrCodeHandlePreview: function (file){\\n\\t\\t\\t\\twindow.open(file.url);\\n },\\n //qrCode上传成功\\n qrCodeSuccess: function (response, file, fileList) {\\n \\tif (response.result) {\\n \\t\\tthis.form.qrCode.push({\\n \\t\\t\\turl: response.data,\\n \\t\\t\\tname: file.name,\\n \\t\\t\\tuid: file.uid\\n \\t\\t});\\n \\t} else {\\n \\t\\tthis.$notify({\\n \\t\\t\\ttitle: \'失败\',\\n \\t\\t\\tmessage: response.msg,\\n \\t\\t\\ttype: \'warning\'\\n \\t\\t});\\n \\t}\\n },\\n //qrCode上传失败\\n qrCodeError: function (response, file, fileList) {\\n \\tresponse = response.toString().replace(\\\"Error: \\\",\\\"\\\")\\n \\tresponse = JSON.parse(response);\\n \\tthis.$notify({\\n \\t\\ttitle: \'失败\',\\n \\t\\tmessage: response.msg,\\n \\t\\ttype: \'warning\'\\n \\t});\\n }, validate:function(){\\n var b = false\\n this.$refs.form.validate(function(valid){\\n b = valid;\\n });\\n return b;\\n },\\n save:function(callback) {\\n var that = this;\\n var url = this.formURL.save.url;\\n if (that.form.id > 0) {\\n url = this.formURL.update.url;\\n }\\n this.$refs.form.validate(function(valid) {\\n if (valid) {\\n var form = JSON.parse(JSON.stringify(that.form));\\n //底部服务时间\\n if(form.timeBegin){\\n form.timeEnd = form.timeBegin[1];\\n form.timeBegin = form.timeBegin[0]; \\n }\\n form.ico = JSON.stringify(form.ico);\\n form.qrCode = JSON.stringify(form.qrCode);\\n form.modelId = that.modelId;\\n ms.http.post(url, form).then(function (res) {\\n if(callback) {\\n callback(res);\\n }\\n });\\n } else{\\n callback({\\n result:false,msg:\'请检查表单输入项\'\\n });\\n }\\n })\\n },\\n //获取当前foot\\n get:function(id) {\\n var that = this;\\n that.loading = true;\\n ms.http.get(this.formURL.get.url, Object.assign({\\\"modelId\\\":that.modelId},this.formURL.get.params)).then(function (res) {\\n if(res.result&&res.data){\\n \\n //底部服务时间 \\n if(res.data.timeBegin && res.data.timeEnd) {\\n res.data.timeBegin = [ms.util.date.fmt(res.data.timeBegin,\'HH:mm:ss\'),ms.util.date.fmt(res.data.timeEnd,\'HH:mm:ss\')];\\n }\\n if (res.data.ico) {\\n res.data.ico = JSON.parse(res.data.ico);\\n res.data.ico.forEach(function (value) {\\n if(value.url.substr(0,7).toLowerCase() == \\\"http://\\\" || value.url.substr(0,8).toLowerCase() == \\\"https://\\\"){\\n\\t\\t\\t\\t\\t\\t\\t } else {\\n\\t\\t\\t\\t\\t\\t\\t\\tvalue.url = ms.base + value.url;\\n\\t\\t\\t\\t\\t\\t\\t }\\n \\n });\\n } else {\\n res.data.ico = [];\\n }\\n if (res.data.qrCode) {\\n res.data.qrCode = JSON.parse(res.data.qrCode);\\n res.data.qrCode.forEach(function (value) {\\n if(value.url.substr(0,7).toLowerCase() == \\\"http://\\\" || value.url.substr(0,8).toLowerCase() == \\\"https://\\\"){\\n\\t\\t\\t\\t\\t\\t\\t } else {\\n\\t\\t\\t\\t\\t\\t\\t\\tvalue.url = ms.base + value.url;\\n\\t\\t\\t\\t\\t\\t\\t }\\n \\n });\\n } else {\\n res.data.qrCode = [];\\n }\\n that.form = res.data;\\n that.loading = false;\\n } else {\\n that.loading = false;\\n }\\n }).catch(function (err) {\\n console.log(err);\\n that.loading = false;\\n });\\n },\\n\\n },\\n created:function() {\\n var that = this;\\n //渲染create\\n that.get(this.form.linkId);\\n }\\n});\",\"sql\":\"\\n-- FOOT\\nCREATE TABLE `{model}FOOT` (\\n `id` BIGINT(19) UNSIGNED NOT NULL AUTO_INCREMENT,\\n `TEL` VARCHAR(255) DEFAULT NULL COMMENT \'电话号码\',\\n `TIME_BEGIN` TIME DEFAULT NULL COMMENT \'底部服务时间\',\\n `TIME_END` TIME DEFAULT NULL COMMENT \'结束时间\',\\n `ICO` VARCHAR(1000) DEFAULT NULL COMMENT \'网站ico\',\\n `QR_CODE` VARCHAR(1000) DEFAULT NULL COMMENT \'底部微信二维码\',\\n `LINK_ID` BIGINT(20) DEFAULT NULL,\\n `CREATE_DATE` DATETIME DEFAULT NULL COMMENT \'创建时间\',\\n `CREATE_BY` VARCHAR(50) DEFAULT NULL COMMENT \'创建人\',\\n `UPDATE_DATE` DATETIME DEFAULT NULL COMMENT \'修改时间\',\\n `UPDATE_BY` VARCHAR(50) DEFAULT NULL COMMENT \'修改人\',\\n `DEL` INT(1) DEFAULT 0 COMMENT \'删除标记\',\\n PRIMARY KEY (`ID`) USING BTREE\\n) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT=\'foot\';\\n\",\"tableName\":\"FOOT\"}', '', 'foot', 1, '', '[\n {\n \"model\":\"tel\",\n \"key\":\"TEL\",\n \"field\":\"TEL\",\n \"javaType\":\"String\",\n \"jdbcType\":\"VARCHAR\",\n \"name\":\"电话号码\",\n \"type\":\"input\",\n \"length\":\"255\",\n \"isShow\":true,\n \"repeat\":false,\n \"isSearch\":false\n }\n ,{\n \"model\":\"timeBegin\",\n \"key\":\"TIME_BEGIN\",\n \"field\":\"TIME_BEGIN\",\n \"javaType\":\"Date\",\n \"jdbcType\":\"TIME\",\n \"name\":\"底部服务时间\",\n \"type\":\"time\",\n \"fmt\":\"HH:mm:ss\",\n \"endModel\":\"time_end\",\n \"length\":\"0\",\n \"isShow\":true,\n \"repeat\":false,\n \"isSearch\":false\n }\n , {\n \"model\":\"timeEnd\",\n \"key\":\"TIME_END\",\n \"field\":\"TIME_END\",\n \"javaType\":\"Date\",\n \"jdbcType\":\"TIME\",\n \"name\":\"结束时间\",\n \"type\":\"time\",\n \"fmt\":\"HH:mm:ss\",\n \"length\":\"0\",\n \"isShow\":false,\n \"repeat\":false,\n \"isSearch\":false\n }\n\n ,{\n \"model\":\"ico\",\n \"key\":\"ICO\",\n \"field\":\"ICO\",\n \"javaType\":\"String\",\n \"jdbcType\":\"VARCHAR\",\n \"name\":\"网站ico\",\n \"type\":\"imgupload\",\n \"length\":\"1000\",\n \"isShow\":true,\n \"repeat\":false,\n \"isSearch\":false\n }\n ,{\n \"model\":\"qrCode\",\n \"key\":\"QR_CODE\",\n \"field\":\"QR_CODE\",\n \"javaType\":\"String\",\n \"jdbcType\":\"VARCHAR\",\n \"name\":\"底部微信二维码\",\n \"type\":\"imgupload\",\n \"length\":\"1000\",\n \"isShow\":true,\n \"repeat\":false,\n \"isSearch\":false\n }\n]\n\n', 'tag', '2024-12-27 09:39:01', NULL, '2024-11-25 11:44:38', NULL, 0, 0);
  10. INSERT INTO `mdiy_config` ( `MODEL_ID`, `config_name`, `config_data`, `CONFIG_TYPE`, `update_date`, `update_by`, `create_date`, `create_by`, `del`, `NOT_DEL`) VALUES ( '1860892324126367745', 'foot', '{\"timeEnd\":\"18:00:00\",\"timeBegin\":\"09:00:00\",\"ico\":\"[{\\\"url\\\":\\\"/upload/1/global/1872457333638361088.png\\\",\\\"name\\\":\\\"1869634627528175616.png\\\",\\\"uid\\\":1735263591501,\\\"status\\\":\\\"success\\\"}]\",\"qrCode\":\"[{\\\"url\\\":\\\"/upload/1/global/1872457360049893376.jpg\\\",\\\"name\\\":\\\"1869634658977067008.jpg\\\",\\\"uid\\\":1735263597758,\\\"status\\\":\\\"success\\\"}]\",\"modelId\":\"1860892324126367745\",\"tel\":\"19999999999\"}', 'tag', NULL, NULL, NULL, NULL, 0, 0);
  11. INSERT INTO `mdiy_tag` (`tag_name`, `tag_type`, `tag_sql`, `tag_class`, `tag_description`, `MODEL_ID`, `UPDATE_BY`, `UPDATE_DATE`, `CREATE_BY`, `CREATE_DATE`, `DEL`, `NOT_DEL`) VALUES ('global', 'global', '', 'globalTagService', '全局自定义标签样例', '1860892324126367745', NULL, '2024-11-25 09:36:40', '57', '2024-11-25 09:36:40', 0, 0);
  12. INSERT INTO `model` (`model_id`, `model_parent_ids`, `model_code`, `model_title`, `model_url`, `model_icon`, `model_sort`, `model_ismenu`, `IS_CHILD`, `model_datetime`, `UPDATE_BY`, `UPDATE_DATE`, `CREATE_BY`, `CREATE_DATE`, `DEL`) VALUES (709, '706,709', '', '删除页面', 'cms:generate:del', '', 0, 0, '', '2024-11-27 10:38:47', NULL, '2024-11-27 10:38:47', '57', '2024-11-27 10:38:47', 0);
  13. INSERT INTO `model` ( `model_id`, `model_parent_ids`, `model_code`, `model_title`, `model_url`, `model_icon`, `model_sort`, `model_ismenu`, `IS_CHILD`, `model_datetime`, `UPDATE_BY`, `UPDATE_DATE`, `CREATE_BY`, `CREATE_DATE`, `DEL`) VALUES (84, '84', '', '自定义全局参数', 'mdiy/tag/globalTag/config.do?modelId=1860892324126367745&isEditor=true', '', 0, 1, '', '2024-11-26 09:24:30', '57', '2024-11-26 09:25:22', '', NULL, 0);
  14. SET @model_id = (SELECT id FROM `model` WHERE model_title = '自定义全局参数' AND model_url = 'mdiy/tag/globalTag/config.do?modelId=1860892324126367745&isEditor=true');
  15. INSERT INTO `model` (`model_id`, `model_parent_ids`, `model_code`, `model_title`, `model_url`, `model_icon`, `model_sort`, `model_ismenu`, `IS_CHILD`, `model_datetime`, `UPDATE_BY`, `UPDATE_DATE`, `CREATE_BY`, `CREATE_DATE`, `DEL`) VALUES (@model_id, CONCAT('84,', @model_id), NULL, '新增', 'mdiy:tag:save', NULL, 0, 0, NULL, '2024-11-26 09:24:30', NULL, NULL, NULL, NULL, 0);
  16. INSERT INTO `model` (`model_id`, `model_parent_ids`, `model_code`, `model_title`, `model_url`, `model_icon`, `model_sort`, `model_ismenu`, `IS_CHILD`, `model_datetime`, `UPDATE_BY`, `UPDATE_DATE`, `CREATE_BY`, `CREATE_DATE`, `DEL`) VALUES (@model_id, CONCAT('84,', @model_id), NULL, '编辑', 'mdiy:tag:update', NULL, 0, 0, NULL, '2024-11-26 09:24:30', NULL, NULL, NULL, NULL, 0);
  17. INSERT INTO `model` (`model_id`, `model_parent_ids`, `model_code`, `model_title`, `model_url`, `model_icon`, `model_sort`, `model_ismenu`, `IS_CHILD`, `model_datetime`, `UPDATE_BY`, `UPDATE_DATE`, `CREATE_BY`, `CREATE_DATE`, `DEL`) VALUES (@model_id, CONCAT('84,', @model_id), NULL, '查看', 'mdiy:tag:view', NULL, 0, 0, NULL, '2024-11-26 09:24:30', NULL, NULL, NULL, NULL, 0);
  18. INSERT INTO `model` (`model_id`, `model_parent_ids`, `model_code`, `model_title`, `model_url`, `model_icon`, `model_sort`, `model_ismenu`, `IS_CHILD`, `model_datetime`, `UPDATE_BY`, `UPDATE_DATE`, `CREATE_BY`, `CREATE_DATE`, `DEL`) VALUES (@model_id, CONCAT('84,', @model_id), NULL, '配置', 'mdiy:tag:config', NULL, 0, 0, NULL, '2024-11-26 09:24:30', NULL, NULL, NULL, NULL, 0);
  19. UPDATE mdiy_config mc JOIN mdiy_model mm ON mm.MODEL_NAME = mc.CONFIG_NAME AND mm.MODEL_CUSTOM_TYPE = mc.CONFIG_TYPE SET mc.model_id = mm.ID;
  20. UPDATE cms_content
  21. SET content_img = JSON_REPLACE(
  22. content_img,
  23. '$[0].url',
  24. JSON_UNQUOTE(JSON_EXTRACT(content_img, '$[0].path'))
  25. )
  26. WHERE content_img != '' and JSON_EXTRACT(content_img, '$[0].url') IS NOT NULL;
  27. UPDATE cms_category
  28. SET category_img = JSON_REPLACE(
  29. category_img,
  30. '$[0].url',
  31. JSON_UNQUOTE(JSON_EXTRACT(category_img, '$[0].path'))
  32. )
  33. WHERE category_img != '' and JSON_EXTRACT(category_img, '$[0].url') IS NOT NULL;
  34. UPDATE cms_category
  35. SET category_ico = JSON_REPLACE(
  36. category_ico,
  37. '$[0].url',
  38. JSON_UNQUOTE(JSON_EXTRACT(category_ico, '$[0].path'))
  39. )
  40. WHERE category_ico != '' and JSON_EXTRACT(category_ico, '$[0].url') IS NOT NULL;
  41. UPDATE app
  42. SET app_logo = JSON_REPLACE(
  43. app_logo,
  44. '$[0].url',
  45. JSON_UNQUOTE(JSON_EXTRACT(app_logo, '$[0].path'))
  46. )
  47. WHERE app_logo != '' and JSON_EXTRACT(app_logo, '$[0].url') IS NOT NULL;
  48. -- 先处理域名到附加
  49. UPDATE app
  50. SET APP_URLS = CASE
  51. WHEN LOCATE('\n', app_url) = 0 THEN NULL
  52. ELSE TRIM(TRAILING ',' FROM REPLACE(SUBSTRING(app_url FROM LOCATE('\n', app_url) + 1), '\n', ','))
  53. END;
  54. -- 处理域名,只保留第一个
  55. UPDATE app SET app_url = SUBSTRING_INDEX(app_url, '\n', 1);
  56. -- 处理换行符
  57. UPDATE app
  58. SET app_url = REPLACE(REPLACE(REPLACE(app_url, 0x0D0A, ''), 0x0D, ''), 0x0A, '');
  59. UPDATE app
  60. SET app_urls = REPLACE(REPLACE(REPLACE(app_urls, 0x0D0A, ''), 0x0D, ''), 0x0A, '');
  61. ALTER TABLE `mdiy_config` DROP INDEX `idx_config_name`;
  62. UPDATE `mdiy_tag` SET `tag_name` = 'arclist', `tag_type` = 'list', `tag_sql` = '<#assign _typeid=\'\'/>\r\n<#assign _typetitle=\'\'/>\r\n<#-- 分页数,默认返回20条数据 -->\r\n<#assign _size=\'20\'/>\r\n<#if column?? && column.id?? && column.id?number gt 0>\r\n <#assign _typeid=\'${column.id}\'>\r\n</#if>\r\n<#if typeid??>\r\n <#assign _typeid=\'${typeid}\'>\r\n</#if>\r\n<#if typeids??>\r\n <#assign _typeids=\'${typeids}\'>\r\n</#if>\r\n<#if typetitle??>\r\n <#assign _typetitle=\'${typetitle}\'>\r\n</#if>\r\n<#if size??>\r\n <#assign _size=\'${size}\'>\r\n</#if>\r\n\r\n<#assign _order=\'desc\'>\r\n\r\n<#if order?? >\r\n <#if order==\'desc\'>\r\n <#assign _order=\'desc\'>\r\n </#if>\r\n <#if order==\'asc\'>\r\n <#assign _order=\'asc\'>\r\n </#if>\r\n</#if>\r\n\r\n<#if orderby?? >\r\n <#assign _orderby = \'\'>\r\n <#list orderby?split(\',\') as order>\r\n <#-- 防止传空值拼接, -->\r\n <#if !order?has_content>\r\n <#continue >\r\n </#if>\r\n <#if _orderby?has_content>\r\n <#assign _orderby += \',\'>\r\n </#if>\r\n <#if order==\'date\'>\r\n <#assign _orderby += \'cms_content.content_datetime\'>\r\n <#elseif order==\'updatedate\'>\r\n <#assign _orderby += \'cms_content.cms_content.update_date\'>\r\n <#elseif order==\'hit\'>\r\n <#assign _orderby += \'cms_content.content_hit\'>\r\n <#elseif order==\'sort\'>\r\n <#assign _orderby += \'cms_content.content_sort\'>\r\n </#if>\r\n <#-- 去除_orderby末尾的逗号(如果存在) -->\r\n <#if _orderby?has_content && _orderby?last_index_of(\',\') == _orderby?length - 1>\r\n <#assign _orderby = _orderby?substring(0, _orderby?length - 1)>\r\n </#if>\r\n <#if _orderby?has_content>\r\n <#assign _orderby += \' \' + _order>\r\n </#if>\r\n </#list>\r\n <#-- 容错处理,如果什么都没有匹配到,则默认按文章时间排序 -->\r\n <#if !_orderby?has_content>\r\n <#assign _orderby = \'cms_content.content_datetime \' + _order>\r\n </#if>\r\n<#else>\r\n <#assign _orderby = \'cms_content.content_datetime \' + _order>\r\n</#if>\r\n\r\n\r\nSELECT\r\ncms_content.id AS \"id\",\r\ncontent_title AS \"title\",\r\ncontent_short_title AS \"shorttitle\",\r\ncontent_author AS \"author\",\r\ncontent_source AS \"source\",\r\ncontent_out_link AS \"outlink\",\r\ncontent_tags AS \"tags\",\r\n\r\ncategory.category_title AS \"typetitle\",\r\ncategory.category_short_title AS \"typeshorttitle\",\r\ncategory.id AS \"typeid\",\r\ncategory.category_path AS \"typepath\",\r\ncategory.category_img AS \"typelitpic\",\r\ncategory.category_ico AS \"typeico\",\r\ncategory.category_keyword as \"typekeyword\",\r\ncategory.top_id as \"topid\",\r\ncategory.category_id as \"parentid\",\r\ncategory.category_parent_ids as \"parentids\",\r\ncategory.category_type AS \"type\",\r\n<#--列表页动态链接-->\r\n<#if isDo?? && isDo>\r\n CONCAT(\'${modelName}/list.do?style=${templateName!\"\"}&typeid=\', category.category_id) as \"typelink\",\r\n<#else>\r\n<#--栏目类型为链接-->\r\n <#if shortSwitch?? && shortSwitch>\r\n 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\ncontent_description AS \"descrip\",\r\ncontent_hit AS \"hit\",\r\ncontent_type AS \"flag\",\r\ncms_content.content_keyword AS \"keyword\",\r\ncontent_img AS \"litpic\",\r\n<#--内容页动态链接-->\r\n<#if isDo?? && isDo>\r\n CONCAT(\'${modelName}/view.do?style=${templateName!\"\"}&id=\', cms_content.id) as \"link\",\r\n<#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(cms_content.id,\'.html\') AS \"link\",\r\n <#else>\r\n CONCAT(CONCAT( category.category_path, \'/\' ), CONCAT(CASE category_type WHEN \'2\' THEN \'index\' ELSE cms_content.id END , \'.html\' )) as \"link\",\r\n </#if>\r\n</#if>\r\n<#if tableName??>${tableName}.*,</#if>\r\ncontent_datetime AS \"date\"\r\nFROM\r\ncms_content\r\nLEFT JOIN\r\ncms_category as category\r\nON cms_content.category_id = category.id\r\n<#--判断是否有自定义模型表-->\r\n<#if tableName??>\r\n LEFT JOIN ${tableName} ON ${tableName}.link_id=cms_content.id\r\n</#if>\r\nWHERE\r\ncontent_display=0\r\nand category_display=\'enable\'\r\nand cms_content.del=0\r\n\r\n<#--文章审核-->\r\n<#if contentApprove?? && contentApprove>\r\n and cms_content.progress_status=\'终审通过\'\r\n</#if>\r\n<#--根据站点编号查询-->\r\n<#if appId?? >\r\n and cms_content.app_id=${appId}\r\n and cms_content.id>0\r\n</#if>\r\n<#--判断是否有搜索分类集合,暂时移除 _typeid=\"\" 条件-->\r\n<#if search?? && !typeid??>\r\n and category_is_search=\'enable\'\r\n<#-- 文章标签 -->\r\n <#if search.content_tag??>and FIND_IN_SET(\'${search.content_tag}\',content_tags) > 0</#if>\r\n <#if search.categoryIds?has_content>\r\n and (\r\n <#list search.categoryIds?split(\",\") as item>\r\n <#if item?index gt 0>\r\n or\r\n </#if>\r\n (cms_content.category_id=${item}\r\n or cms_content.category_id in (select id FROM cms_category where cms_category.del=0\r\n <#if _typetitle?has_content>\r\n and cms_category.category_title=\'${_typetitle}\'\r\n </#if>\r\n and FIND_IN_SET(${item},CATEGORY_PARENT_IDS) > 0)\r\n )\r\n </#list>\r\n )\r\n </#if>\r\n<#--标题-->\r\n <#if search.content_title??> and content_title like CONCAT(CONCAT(\'%\',\'${search.content_title}\'),\'%\')</#if>\r\n<#--作者-->\r\n <#if search.content_author??> and content_author like CONCAT(CONCAT(\'%\',\'${search.content_author}\'),\'%\')</#if>\r\n<#--来源-->\r\n <#if search.content_source??> and content_source like CONCAT(CONCAT(\'%\',\'${search.content_source}\'),\'%\')</#if>\r\n<#--属性-->\r\n <#if search.content_type??>\r\n and(<#list search.content_type?split(\',\') as item>\r\n <#if item?index gt 0> or</#if>\r\n FIND_IN_SET(\'${item}\',cms_content.content_type) > 0\r\n </#list>)\r\n </#if>\r\n<#--描述-->\r\n <#if search.content_description??>\r\n and content_description like CONCAT(CONCAT(\'%\',\'${search.content_description}\'),\'%\')\r\n </#if>\r\n<#--关键字-->\r\n <#if search.content_keyword??> and content_keyword like CONCAT(CONCAT(\'%\',\'${search.content_keyword}\'),\'%\')</#if>\r\n<#--内容-->\r\n <#if search.content_details??> and content_details like CONCAT(CONCAT(\'%\',\'${search.content_details}\'),\'%\')</#if>\r\n<#--自定义顺序-->\r\n <#if search.content_sort??> and content_sort=${search.content_sort}</#if>\r\n<#--时间范围-->\r\n <#if search.content_datetime_start??&&search.content_datetime_end??>\r\n and content_datetime between \'${search.content_datetime_start}\' and \'${search.content_datetime_end}\'\r\n </#if>\r\n<#else>\r\n<#--查询栏目-->\r\n <#if _typeids?has_content>\r\n and (\r\n <#list _typeids?split(\",\") as item>\r\n <#if item?index gt 0>\r\n or\r\n </#if>\r\n (cms_content.category_id=${item}\r\n or cms_content.category_id in (select id FROM cms_category where cms_category.del=0\r\n <#if _typetitle?has_content>\r\n and cms_category.category_title=\'${_typetitle}\'\r\n </#if>\r\n and FIND_IN_SET(${item},CATEGORY_PARENT_IDS) > 0)\r\n )\r\n </#list>\r\n )\r\n <#elseif _typeid?has_content && _typeid?string != \'0\' >\r\n and (cms_content.category_id=${_typeid}\r\n or cms_content.category_id in (select id FROM cms_category where cms_category.del=0\r\n <#if _typetitle?has_content>\r\n and cms_category.category_title=\'${_typetitle}\'\r\n </#if>\r\n and FIND_IN_SET(${_typeid},CATEGORY_PARENT_IDS) > 0))\r\n </#if>\r\n</#if>\r\n<#--判断搜索分类结束-->\r\n<#--标题-->\r\n<#if content_title??> and content_title like CONCAT(CONCAT(\'%\',\'${content_title}\'),\'%\')</#if>\r\n<#--作者-->\r\n<#if content_author??> and content_author like CONCAT(CONCAT(\'%\',\'${content_author}\'),\'%\')</#if>\r\n<#--来源-->\r\n<#if content_source??> and content_source like CONCAT(CONCAT(\'%\',\'${content_source}\'),\'%\')</#if>\r\n<#--属性-->\r\n<#if content_type??> and content_type like CONCAT(CONCAT(\'%\',\'${content_type}\'),\'%\')</#if>\r\n<#--描述-->\r\n<#if content_description??> and content_description like CONCAT(CONCAT(\'%\',\'${content_description}\'),\'%\')</#if>\r\n<#--关键字-->\r\n<#if content_keyword??> and content_keyword like CONCAT(CONCAT(\'%\',\'${content_keyword}\'),\'%\')</#if>\r\n<#--内容-->\r\n<#if content_details??> and content_details like CONCAT(CONCAT(\'%\',\'${content_details}\'),\'%\')</#if>\r\n<#--自定义顺序-->\r\n<#if content_sort??> and content_sort=${content_sort}</#if>\r\n<#--自定义模型-->\r\n<#if diyModel??>\r\n <#list diyModel as dm>\r\n <#assign json=\"${dm}\"?eval />\r\n and ${tableName}.${json.key} like CONCAT(CONCAT(\'%\',\'${json.value}\'),\'%\')\r\n </#list>\r\n</#if>\r\n<#--文章属性-->\r\n<#if flag?? >\r\n and(<#list flag?split(\',\') as item>\r\n <#if item?index gt 0> or</#if>\r\n FIND_IN_SET(\'${item}\',cms_content.content_type) > 0\r\n</#list>)\r\n</#if>\r\n<#if noflag??>\r\n and(<#list noflag?split(\',\') as item>\r\n <#if item?index gt 0> and</#if>\r\n FIND_IN_SET(\'${item}\',cms_content.content_type)=0\r\n</#list> or cms_content.content_type is null)\r\n</#if>\r\n\r\n<#--字段排序-->\r\nORDER BY\r\n<#if topflag??>\r\n CASE\r\n <#list topflag?split(\",\") as item>\r\n WHEN FIND_IN_SET(\'${item}\',cms_content.content_type)>0 THEN\r\n ${item?index}\r\n </#list>\r\n ELSE 100\r\n END,\r\n</#if>\r\n${_orderby}\r\nLIMIT\r\n<#--判断是否分页-->\r\n<#if ispaging?? && (pageTag.pageNo)??>\r\n ${((pageTag.pageNo-1)*_size?eval)?c},${_size?default(20)}\r\n<#else>\r\n ${_size?default(20)}\r\n</#if>\r\n\r\n', `tag_class` = NULL, `tag_description` = '文章列表', `MODEL_ID` = NULL, `UPDATE_BY` = NULL, `UPDATE_DATE` = NULL, `CREATE_BY` = NULL, `CREATE_DATE` = NULL, `DEL` = 0, `NOT_DEL` = 1 WHERE `id` = 3;
  63. UPDATE `mdiy_tag` SET `tag_name` = 'channel', `tag_type` = 'list', `tag_sql` = '<#assign _typeid=\'0\'/>\r\n<#assign _size=\'9999\'/>\r\n<#if column?? && column.id?? && column.id?number gt 0>\r\n <#assign _typeid=\'${column.id}\'>\r\n <#assign selfid=\'${column.id}\'>\r\n</#if>\r\n\r\n<#if typeid??>\r\n <#assign _typeid=\'${typeid}\'>\r\n</#if>\r\n<#if typeids??>\r\n <#assign _typeids=\'${typeids}\'>\r\n</#if>\r\n<#if size??>\r\n <#assign _size=\'${size}\'>\r\n</#if>\r\n\r\nselect\r\n cms_category.id as \"id\",\r\n cms_category.id as \"typeid\",\r\n cms_category.category_title as \"typetitle\",\r\n cms_category.category_short_title as \"typeshorttitle\",\r\n <#--动态链接-->\r\n <#if isDo?? && isDo>\r\n CASE WHEN cms_category.category_type=2 THEN CONCAT(\'/${modelName}/view.do?style=${templateName!\"\"}&typeid=\', cms_category.id) ELSE CONCAT(\'/${modelName}/list.do?style=${templateName!\"\"}&typeid=\', cms_category.id) END as \"typelink\",\r\n <#else>\r\n <#--栏目类型为链接-->\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(cms_category.category_pinyin,\'.html\') AS \"typelink\",\r\n <#else>\r\n CONCAT(cms_category.category_path,\'/index.html\') as \"typelink\",\r\n </#if>\r\n </#if>\r\n cms_category.category_keyword as \"typekeyword\",\r\n cms_category.category_diy_url as \"typeurl\",\r\n cms_category.category_flag as \"flag\",\r\n cms_category.category_id as \"parentid\",\r\n cms_category.category_parent_ids as \"parentids\",\r\n cms_category.category_descrip as \"typedescrip\",\r\n cms_category.category_type as \"type\",\r\n cms_category.category_path as \"typepath\",\r\n cms_category.leaf as \"typeleaf\",\r\n cms_category.category_img as \"typelitpic\" ,\r\n cms_category.category_ico as \"typeico\" ,\r\n <#if tableName??>${tableName}.*,</#if>\r\n( SELECT count(*) FROM cms_category cc WHERE cc.category_id = cms_category.id AND cc.del = 0 ) AS \"childsize\"\r\nfrom\r\ncms_category\r\n<#--判断是否有自定义模型表-->\r\n<#if tableName??>LEFT JOIN ${tableName} ON ${tableName}.link_id=cms_category.id</#if>\r\nwhere\r\ncms_category.del=0\r\nand cms_category.category_display = \'enable\'\r\nand cms_category.is_child = \'cms\'\r\n<#--自定义模型-->\r\n<#if diyModel??>\r\n<#list diyModel as dm>\r\n<#assign json=\"${dm}\"?eval />\r\nand ${tableName}.${json.key} like CONCAT(\'%\',\'${json.value}\',\'%\')\r\n</#list>\r\n</#if>\r\n<#--根据站点编号查询-->\r\n<#if appId?? >\r\n and cms_category.app_id=${appId}\r\n</#if>\r\n\r\n<#--栏目属性-->\r\n<#if flag?? >\r\nand\r\n(<#list flag?split(\',\') as item>\r\n<#if item?index gt 0> or</#if>\r\nFIND_IN_SET(\'${item}\',cms_category.category_flag)>0\r\n</#list>)\r\n</#if>\r\n\r\n<#if noflag?? >\r\nand\r\n(<#list noflag?split(\',\') as item>\r\n<#if item?index gt 0> and</#if>\r\nFIND_IN_SET(\'${item}\',cms_category.category_flag)=0\r\n</#list> or cms_category.category_flag is null)\r\n</#if>\r\n\r\n<#--type默认son-->\r\n<#if !type??||!type?has_content>\r\n<#assign type=\'son\'/>\r\n</#if>\r\n\r\n<#-- 如果有typeids参数,则只查询typeids参数指定的栏目 -->\r\n<#if _typeids?has_content>\r\n and cms_category.id in (${_typeids})\r\n<#elseif type?has_content>\r\n<#--顶级栏目(单个)-->\r\n<#if type==\'top\'>\r\n<#if _typeid != \'0\'>\r\nand (cms_category.id = cms_category.top_id or cms_category.top_id = 0)\r\n</#if>\r\n\r\n<#elseif type==\'nav\'>\r\nand(cms_category.category_id=0 or cms_category.category_id is null)\r\n\r\n<#--同级栏目(多个)-->\r\n<#elseif type==\'level\'>\r\n<#if _typeid != \'0\'>\r\nand cms_category.category_id=(select category_id from cms_category where id=${_typeid})\r\n</#if>\r\n\r\n<#--当前栏目(单个)-->\r\n<#elseif type==\'self\'>\r\n<#if _typeid != \'0\'>\r\nand cms_category.id=${_typeid}\r\n</#if>\r\n\r\n<#--当前栏目的所属栏目(多个)-->\r\n<#elseif type==\'path\'>\r\n<#if _typeid != \'0\'>\r\nand cms_category.id in\r\n(<#if column?? && column.categoryParentIds??>${column.categoryParentIds},</#if>${_typeid})\r\n</#if>\r\n\r\n<#--子栏目(多个)-->\r\n<#elseif type==\'son\'>\r\n<#if _typeid != \'0\'>\r\nand cms_category.category_id=${_typeid}\r\n</#if>\r\n\r\n<#--上一级栏目没有则取当前栏目(单个)-->\r\n<#elseif type==\'parent\'>\r\n<#if _typeid != \'0\'>\r\nand\r\n<#if column?? && column.categoryId??>\r\ncms_category.id=${column.categoryId}\r\n<#else>\r\n cms_category.id=(select category_id from cms_category where id=${_typeid})\r\n</#if>\r\n</#if>\r\n</#if>\r\n\r\n<#else> <#--默认顶级栏目-->\r\nand\r\n<#if _typeid != \'0\'>\r\ncms_category.id=${_typeid}\r\n<#else>\r\n(cms_category.category_id=0 or cms_category.category_id is null)\r\n</#if>\r\n</#if>\r\n\r\n<#--字段排序-->\r\n<#if type == \'path\'>\r\nORDER BY cms_category.category_path asc\r\n<#else>\r\n<#if orderby?? >\r\nORDER BY\r\n<#if orderby==\'date\'> cms_category.create_date\r\n<#elseif orderby==\'sort\'> cms_category.category_sort\r\n<#else>cms_category.id\r\n</#if>\r\n</#if>\r\n\r\n<#if order?? >\r\n<#if order==\'desc\'> desc</#if>\r\n<#if order==\'asc\'> asc</#if>\r\n</#if>\r\n</#if>\r\nLIMIT\r\n${_size?default(9999)}', `tag_class` = NULL, `tag_description` = '通用栏目', `MODEL_ID` = NULL, `UPDATE_BY` = NULL, `UPDATE_DATE` = NULL, `CREATE_BY` = NULL, `CREATE_DATE` = NULL, `DEL` = 0, `NOT_DEL` = 1 WHERE `id` = 4;
  64. UPDATE `mdiy_tag` SET `tag_name` = 'global', `tag_type` = 'single', `tag_sql` = 'select\r\n APP_NAME as \"name\",\r\n app_logo as \"logo\",\r\n app_keyword as \"keyword\",\r\n app_description as \"descrip\",\r\n app_copyright as \"copyright\",\r\n \'${contextPath}\' as \"contextpath\",\r\n <#--动态解析 -->\r\n <#if isDo?? && isDo>\r\n \'${url}\' as \"url\",\r\n \'${url}\' as \"host\",\r\n \'/\' as \"html\",\r\n <#--使用地址栏的域名 -->\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(\'${url}\',\'${appDir}<#if appDir?has_content>/</#if>\') as \"url\",\r\n \'<#if appDir?has_content>/</#if>${appDir}/\' as \"html\",\r\n <#else>\r\n CONCAT(CONCAT(\'${url}\',\'${html}/\'),\'<#if appDir?has_content>${appDir}/</#if>\') as \"url\",\r\n CONCAT(CONCAT(\'/${html}\',\'<#if appDir?has_content>/${appDir}</#if>\'),\'/\') as \"html\",\r\n </#if>\r\n \'${url}\' as \"host\",\r\n </#if>\r\n CONCAT(CONCAT(CONCAT(CONCAT(\'template/\',id),\'/\'),app_style),\'/\') as \"style\"\r\nfrom app\r\n <#--根据站点编号查询-->\r\n <#if appId?? >\r\n where id = \'${appId}\'\r\n </#if>', `tag_class` = NULL, `tag_description` = '全局', `MODEL_ID` = NULL, `UPDATE_BY` = NULL, `UPDATE_DATE` = NULL, `CREATE_BY` = NULL, `CREATE_DATE` = NULL, `DEL` = 0, `NOT_DEL` = 1 WHERE `id` = 5;
  65. UPDATE `mdiy_tag` SET `tag_name` = 'field', `tag_type` = 'single', `tag_sql` = 'SELECT\r\n cms_content.id as \"id\",\r\n <#--这里会存在id覆盖的情况,所以需要在cms_content.id下面-->\r\n <#if tableName??>${tableName}.*,</#if>\r\n <#--查询站点编号-->\r\n <#if appId??>\r\n cms_content.app_id as \"appId\",\r\n </#if>\r\n content_title as \"title\",\r\n content_short_title AS \"shorttitle\",\r\n content_author as \"author\",\r\n content_source as \"source\",\r\n content_out_link as \"outlink\",\r\n content_details as \"content\",\r\n content_datetime as \"date\",\r\n content_description as \"descrip\",\r\n content_keyword as \"keyword\",\r\n <#if contextPath?? && contextPath != \"/\">\r\n CONCAT(CONCAT( \'<script type=\"text/javascript\" src=\"${contextPath}/cms/content/\', cms_content.id),\'/hit.do\"></script>\') as \"hit\",\r\n <#else>\r\n CONCAT(CONCAT( \'<script type=\"text/javascript\" src=\"/cms/content/\', cms_content.id),\'/hit.do\"></script>\') as \"hit\",\r\n </#if>\r\n content_type as \"flag\",\r\n content_tags as \"tags\",\r\n category_title as \"typetitle\",\r\n cms_content.content_img as \"litpic\",\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(cms_content.id, \'.html\' ) as \"link\",\r\n <#else>\r\n CONCAT(CONCAT( cms_category.category_path, \'/\' ), CONCAT(cms_content.id, \'.html\' )) as \"link\",\r\n </#if>\r\n cms_category.id as \"typeid\",\r\n cms_category.leaf as \"typeleaf\",\r\n cms_category.category_title as \"typetitle\",\r\n cms_category.category_short_title AS \"typeshorttitle\",\r\n cms_category.category_img as \"typelitpic\",\r\n cms_category.category_ico as \"typeico\",\r\n cms_category.category_path as \"typepath\",\r\n cms_category.top_id as \"topid\",\r\n cms_category.category_flag as \"typeflag\",\r\n cms_category.category_id as \"parentid\",\r\n cms_category.category_parent_ids as \"parentids\",\r\n cms_category.category_keyword as \"typekeyword\",\r\n cms_category.category_descrip as \"typedescrip\",\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(category_pinyin,\'.html\') AS \"typelink\"\r\n <#else>\r\n CONCAT(category_path,\'/index.html\') AS \"typelink\"\r\n </#if>\r\n\r\nFROM cms_content\r\n LEFT JOIN cms_category ON\r\n cms_category.id = cms_content.category_id\r\n <#--判断是否有自定义模型表-->\r\n <#if tableName??>left join ${tableName} on ${tableName}.link_id=cms_content.id</#if>\r\nWHERE\r\n <#--如果是栏目列表页没有文章id所以只取栏目id-->\r\n <#if column??&&column.id??&&!id??>\r\n cms_category.id=${column.id} and\r\n </#if>\r\n <#--根据站点编号查询-->\r\n <#if appId??>\r\n cms_content.app_id = \'${appId}\' and\r\n </#if>\r\n cms_content.del=0\r\n <#if id??> and cms_content.id=${id}</#if>\r\n', `tag_class` = NULL, `tag_description` = '文章内容', `MODEL_ID` = NULL, `UPDATE_BY` = NULL, `UPDATE_DATE` = NULL, `CREATE_BY` = NULL, `CREATE_DATE` = NULL, `DEL` = 0, `NOT_DEL` = 1 WHERE `id` = 7;
  66. UPDATE `mdiy_tag` SET `tag_name` = 'pre', `tag_type` = 'single', `tag_sql` = '<#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 shortSwitch?? && shortSwitch>\r\n 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 content_img as \"litpic\",\r\n <#--内容页动态链接-->\r\n <#if shortSwitch?? && shortSwitch>\r\n 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 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', `tag_class` = NULL, `tag_description` = '文章上一篇', `MODEL_ID` = NULL, `UPDATE_BY` = NULL, `UPDATE_DATE` = NULL, `CREATE_BY` = NULL, `CREATE_DATE` = NULL, `DEL` = 0, `NOT_DEL` = 1 WHERE `id` = 8;
  67. UPDATE `mdiy_tag` SET `tag_name` = 'page', `tag_type` = 'single', `tag_sql` = '<#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 <#-- 处理动态访问问题 -->\r\n <#if isDo?? && isDo>\r\n <#assign path=\'/${modelName}/list.do?style=${templateName!\"\"}&typeid=${typeid}\'/>\r\n <#elseif 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 isDo?? && isDo>\r\n \'${path}\' as \"index\",\r\n <#elseif 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 isDo?? && isDo>\r\n CONCAT(\'${path}\',\'&pageNo=${pageTag.pageNo?eval-1}\') as \"pre\",\r\n <#elseif 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 isDo?? && isDo>\r\n \'${path}\' as \"pre\",\r\n <#elseif 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 lte 1>\r\n <#--处理动态访问情况-->\r\n <#if isDo?? && isDo>\r\n \'${path}\' as \"next\",\r\n \'${path}\' as \"last\"\r\n <#elseif 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 isDo?? && isDo>\r\n CONCAT(\'${path}\',\'&pageNo=${pageTag.total}\') as \"next\",\r\n <#elseif 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 isDo?? && isDo>\r\n CONCAT(\'${path}\',\'&pageNo=${pageTag.pageNo?eval+1}\') as \"next\",\r\n <#elseif 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 isDo?? && isDo>\r\n CONCAT(\'${path}\',\'&pageNo=${pageTag.total}\') as \"last\"\r\n <#elseif 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>', `tag_class` = NULL, `tag_description` = '通用分页', `MODEL_ID` = NULL, `UPDATE_BY` = NULL, `UPDATE_DATE` = NULL, `CREATE_BY` = NULL, `CREATE_DATE` = NULL, `DEL` = 0, `NOT_DEL` = 1 WHERE `id` = 9;
  68. UPDATE `mdiy_tag` SET `tag_name` = 'next', `tag_type` = 'single', `tag_sql` = '<#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 shortSwitch?? && shortSwitch>\r\n 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 content_img as \"litpic\",\r\n <#--内容页动态链接-->\r\n <#if shortSwitch?? && shortSwitch>\r\n 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 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', `tag_class` = NULL, `tag_description` = '文章下一篇', `MODEL_ID` = NULL, `UPDATE_BY` = NULL, `UPDATE_DATE` = NULL, `CREATE_BY` = NULL, `CREATE_DATE` = NULL, `DEL` = 0, `NOT_DEL` = 1 WHERE `id` = 10;
  69. UPDATE `mdiy_tag` SET `tag_name` = 'diyform', `tag_type` = 'macro', `tag_sql` = '<#macro ms_diyform formName>\n<div id=\"form\" v-cloak style=\"width: 30%; margin: 5% auto\">\n <div id=\"formModel\">\n <!--会自动渲染代码生成器的表单-->\n </div>\n <!--必须包含验证码-->\n <el-form ref=\"form\" :model=\"form\" :rules=\"rules\" label-position=\"right\" size=\"large\" label-width=\"120px\">\n <el-row :gutter=\"0\" justify=\"start\" align=\"top\">\n <el-col :span=\"12\">\n <el-form-item label=\"验证码\" prop=\"rand_code\">\n <el-input\n v-model=\"form.rand_code\"\n :disabled=\"false\"\n :readonly=\"false\"\n :clearable=\"true\"\n placeholder=\"请输入验证码\">\n </el-input>\n </el-form-item>\n </el-col>\n <el-col :span=\"12\">\n <div style=\"display: flex; height: 38px;margin-left: 1em; align-items: center; cursor: pointer\">\n <img :src=\"verifCode\" class=\"code-img\" @click=\"code\"/>\n <div @click=\"code\" style=\"margin-left: 10px\">\n 看不清?换一张\n </div>\n </div>\n </el-col>\n </el-row>\n <el-form-item label=\" \">\n <el-button @click=\"save\" type=\"primary\" :loading=\"isLoading\" style=\"width: 200px\">\n {{isLoading ? \'保存中\' : \'保存\'}}\n </el-button>\n </el-form-item>\n </el-form>\n</div>\n<script>\n //vue的实例名称必须为 from\n var form = new Vue({\n el: \'#form\',\n data: {\n formModel: undefined, //自定义业务的vue对象\n verifCode: \"/code.do?t=\" + new Date().getTime(),\n isLoading: false,\n form: {\n rand_code: \'\'\n },\n rules: {\n rand_code: [\n {required: true, message: \'请输入验证码\', trigger: \'blur\'},\n {min: 1, max: 4, message: \'长度不能超过4个字符\', trigger: \'change\'}\n ],\n },\n },\n methods: {\n save: function () {\n var that = this;\n that.isLoading = true;\n //将验证码值复制到自定义模型\n form.formModel.form.rand_code = this.form.rand_code;\n //调用自定义模型的保存\n that.formModel.save(function (res) {\n if (res.result) {\n that.$notify({\n title: \'成功\',\n type: \'success\',\n message: \'保存成功!\'\n });\n\n } else {\n that.$notify({\n title: \'失败\',\n message: res.msg,\n type: \'warning\'\n });\n }\n that.isLoading = false;\n });\n },\n code: function () {\n this.verifCode = \"/code.do?t=\" + (new Date).getTime();\n }\n },\n created: function () {\n var that = this;\n ms.mdiy.model.form(\"formModel\", { \"modelName\": \"${formName}\" }).then(function(obj) {\n that.formModel = obj;\n });\n }\n });\n</script>\n</#macro>', `tag_class` = NULL, `tag_description` = '智能表单', `MODEL_ID` = NULL, `UPDATE_BY` = '57', `UPDATE_DATE` = '2022-11-15 16:10:49', `CREATE_BY` = NULL, `CREATE_DATE` = NULL, `DEL` = 0, `NOT_DEL` = 1 WHERE `id` = 11;
  70. UPDATE `mdiy_tag` SET `tag_name` = 'data', `tag_type` = 'list', `tag_sql` = '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 content_out_link AS \"outlink\",\r\n content_short_title AS \"shorttitle\",\r\n category.category_title AS \"typetitle\",\r\n category.category_short_title AS \"typeshorttitle\",\r\n category.id AS \"typeid\",\r\n category.category_path AS \"typepath\",\r\n category.category_img AS \"typelitpic\",\r\n category.category_ico AS \"typeico\",\r\n category.category_keyword AS \"typekeyword\",\r\n category.top_id AS \"topid\",\r\n category.category_parent_ids AS \"parentids\",\r\n category.category_type AS \"type\",\r\n <#--列表页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\'/${modelName}/list.do?style=${templateName!\"\"}&typeid=\', category.category_id) AS \"typelink\",\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(category_pinyin,\'.html\') AS \"typelink\",\r\n <#else>\r\n CONCAT(category_path,\'/index.html\') AS \"typelink\",\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 cms_content.content_keyword AS \"keyword\",\r\n content_img AS \"litpic\",\r\n <#--内容页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\'/${modelName}/view.do?style=${templateName!\"\"}&id=\', cms_content.id) AS \"link\",\r\n <#else>\r\n <#if shortSwitch?? && shortSwitch>\r\n CONCAT(cms_content.id,\'.html\') AS \"link\",\r\n <#else>\r\n CONCAT(CONCAT(CONCAT(category.category_path,\'/\'),cms_content.id),\'.html\') AS \"link\",\r\n </#if>\r\n </#if>\r\n <#if tableName??>${tableName}.*,</#if>\r\n content_datetime AS \"date\"\r\nFROM\r\n cms_content LEFT JOIN cms_category category ON cms_content.category_id = category.id\r\n <#--判断是否有自定义模型表-->\r\n <#if tableName??>\r\n LEFT JOIN ${tableName} ON ${tableName}.link_id=cms_content.id\r\n </#if>\r\nWHERE\r\n content_display=0\r\n and category_display=\'enable\'\r\n and cms_content.del=0\r\n <#--根据站点编号查询-->\r\n <#if appId?? >\r\n and cms_content.app_id=\'${appId}\'\r\n </#if>\r\n and cms_content.id=${dataid}\r\n\r\n', `tag_class` = NULL, `tag_description` = '单篇', `MODEL_ID` = NULL, `UPDATE_BY` = '57', `UPDATE_DATE` = '2022-11-15 16:10:49', `CREATE_BY` = NULL, `CREATE_DATE` = NULL, `DEL` = 0, `NOT_DEL` = 1 WHERE `id` = 12;
  71. UPDATE `mdiy_tag` SET `tag_name` = 'tag', `tag_type` = 'single', `tag_sql` = '<#assign _typeid=\'0\'/>\r\n<#assign order=\'desc\'/>\r\n<#assign _size=\'99\'/>\r\n<#if column?? && column.id?? && column.id?number gt 0>\r\n <#assign _typeid=\'${column.id}\'>\r\n</#if>\r\n\r\n<#if typeid??>\r\n <#assign _typeid=\'${typeid}\'>\r\n</#if>\r\n<#if size??>\r\n <#assign _size=\'${size}\'>\r\n</#if>\r\n\r\nSELECT\r\n GROUP_CONCAT(DISTINCT content_tags ) AS tags\r\nFROM\r\n cms_content\r\nLEFT JOIN cms_category ON cms_content.category_id = cms_category.id\r\nWHERE\r\n cms_category.category_display = \'enable\'\r\n AND cms_content.del = 0\r\n AND cms_content.content_display = 0\r\n AND LENGTH( cms_content.content_tags )>0\r\n <#if _typeid != \'0\'>\r\n AND (cms_category.id = ${_typeid} or FIND_IN_SET(${_typeid},cms_category.category_parent_ids) > 0)\r\n </#if>\r\n <#if appId??>\r\n AND cms_content.app_id = \'${appId}\'\r\n </#if>\r\nORDER BY CONTENT_HIT DESC\r\nLimit ${_size}', `tag_class` = '', `tag_description` = '文章标签配置,不提供模板使用', `MODEL_ID` = NULL, `UPDATE_BY` = '', `UPDATE_DATE` = '2023-06-12 17:26:19', `CREATE_BY` = '57', `CREATE_DATE` = '2023-05-23 09:31:49', `DEL` = 57, `NOT_DEL` = 1 WHERE `id` = 17;
  72. UPDATE `mdiy_tag` SET `tag_name` = 'tags', `tag_type` = 'macro', `tag_sql` = '<#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 </#if>\n </#if>\n </#list>\n </#list>\n </#if>\n</#macro>', `tag_class` = '', `tag_description` = '文章标签', `MODEL_ID` = NULL, `UPDATE_BY` = '', `UPDATE_DATE` = '2023-06-12 17:26:21', `CREATE_BY` = '57', `CREATE_DATE` = '2023-05-23 09:31:40', `DEL` = 57, `NOT_DEL` = 1 WHERE `id` = 18;
  73. UPDATE `mdiy_tag` SET `tag_name` = 'global', `tag_type` = 'global', `tag_sql` = '', `tag_class` = 'globalTagService', `tag_description` = '全局自定义标签样例', `MODEL_ID` = '1860892324126367745', `UPDATE_BY` = NULL, `UPDATE_DATE` = '2024-11-25 09:36:40', `CREATE_BY` = '57', `CREATE_DATE` = '2024-11-25 09:36:40', `DEL` = 0, `NOT_DEL` = 0 WHERE `id` = 19;
  74. UPDATE `app` SET `app_name` = '5.4.3 铭飞MCms' WHERE `id` = '1';