jiapeng 7 anni fa
parent
commit
2769cf018e

+ 7 - 7
src/main/java/com/ekexiu/portal/cms/TemplateService.java

138
			}
138
			}
139
		}
139
		}
140
		File parent = dest.getParentFile();
140
		File parent = dest.getParentFile();
141
		if(!parent.exists()){
141
		if (!parent.exists()) {
142
			parent.mkdirs();
142
			parent.mkdirs();
143
		}
143
		}
144
		Template template = this.cfg.getTemplate(templateName, "UTF-8");
144
		Template template = this.cfg.getTemplate(templateName, "UTF-8");
230
			Article article = articleDao.queryOne(con, (String) key);
230
			Article article = articleDao.queryOne(con, (String) key);
231
			if (article == null)
231
			if (article == null)
232
				return;
232
				return;
233
			String dir = article.getCreateTime().substring(0, 8);
234
			File file = new File(this.dir, dir + "/a/" + article.getShareId() + ".html");
233
			String path = article.getCreateTime().substring(0, 8) + "/";
234
			File file = new File(this.dir, "a/" + path + article.getShareId() + ".html");
235
			if (file.exists()) {
235
			if (file.exists()) {
236
				file.delete();
236
				file.delete();
237
			}
237
			}
251
			Ppaper page = this.ppaperDao.query(con, (String) key);
251
			Ppaper page = this.ppaperDao.query(con, (String) key);
252
			if (page == null)
252
			if (page == null)
253
				return;
253
				return;
254
			String dir = page.getCreateTime().substring(0, 8);
255
			File file = new File(this.dir, dir + "/p/" + page.getShareId() + ".html");
254
			String path = page.getCreateTime().substring(0, 8) + "/";
255
			File file = new File(this.dir, "pp/" + path + page.getShareId() + ".html");
256
			if (file.exists()) {
256
			if (file.exists()) {
257
				file.delete();
257
				file.delete();
258
			}
258
			}
270
			Ppatent page = this.ppatentDao.query(con, (String) key);
270
			Ppatent page = this.ppatentDao.query(con, (String) key);
271
			if (page == null)
271
			if (page == null)
272
				return;
272
				return;
273
			String dir = page.getCreateTime().substring(0, 8);
274
			File file = new File(this.dir, dir + "/p/" + page.getShareId() + ".html");
273
			String path = page.getCreateTime().substring(0, 8) + "/";
274
			File file = new File(this.dir, "pt/" + path + page.getShareId() + ".html");
275
			if (file.exists()) {
275
			if (file.exists()) {
276
				file.delete();
276
				file.delete();
277
			}
277
			}