|
|
@@ -1,5 +1,6 @@
|
|
|
package com.fdkankan.ucenter.service.impl;
|
|
|
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
@@ -251,10 +252,12 @@ public class InvoiceServiceImpl extends ServiceImpl<IInvoiceMapper, Invoice> imp
|
|
|
//国际服直接发送邮件
|
|
|
if("aws".equals(NacosProperty.uploadType) && dbEntity.getEmailAddress() != null){
|
|
|
MailTemplate mailTemplate = mailTemplateService.getTemplate(14, "en");
|
|
|
- String filePath = MyExcelUtil.excelTemplteToPdf(OssPath.localPath, "invoiceTemplate", dbEntity);
|
|
|
+ dbEntity.setCreateTime(DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
+ String filePath = MyExcelUtil.excelTemplteToPdf(OssPath.localPath +"/invoice", "invoiceTemplate", dbEntity);
|
|
|
mailTemplateService.sendMail(dbEntity.getEmailAddress(),mailTemplate,filePath);
|
|
|
-// FileUtil.delFile(filePath);
|
|
|
-// FileUtil.delFile(filePath.replace(".pdf",".xlsx"));
|
|
|
+ FileUtil.delFile(filePath);
|
|
|
+ FileUtil.delFile(filePath+".sy");
|
|
|
+ FileUtil.delFile(filePath.replace(".pdf",".xlsx"));
|
|
|
}
|
|
|
}
|
|
|
|