This commit is contained in:
hayu 2025-09-15 19:42:39 +08:00
parent bb41e8db9d
commit 3b5c725f1c
1 changed files with 3 additions and 3 deletions

View File

@ -285,9 +285,9 @@ public class ProAuthorizeServiceImpl implements ProAuthorizeService {
@Override
public void downLoadTemplate(HttpServletResponse response) {
// 模板名称
String templateName = "授权委托书模板.doc";
String templateName = "授权委托书模版.docx";
try (
InputStream input = this.getClass().getClassLoader().getResourceAsStream("template/授权委托书模板.doc");
InputStream input = this.getClass().getClassLoader().getResourceAsStream("template/授权委托书模版.docx");
OutputStream out = response.getOutputStream()
) {
if (input == null) {
@ -295,7 +295,7 @@ public class ProAuthorizeServiceImpl implements ProAuthorizeService {
}
// 设置响应头
response.setCharacterEncoding("UTF-8");
response.setContentType("application/msword");
response.setContentType("application/vnd.openxmlformats-officedocument.wordprocessingml.document");
response.setHeader(
"Content-Disposition",
"attachment;filename=" + new String(templateName.getBytes("UTF-8"), "ISO-8859-1")