维护邮件上传附件常用文档

main
youHong.ai 2022-11-25 17:35:20 +08:00
parent 82a22c3af8
commit 52102ba058
2 changed files with 50 additions and 13 deletions

View File

@ -62,6 +62,7 @@ public class TestOrganization extends BaseTest {
@Test
public void testStaticLog() {
log.info("哈哈哈好的方式");
}

View File

@ -386,16 +386,18 @@ from workflow_nodebase nb
**1.后端根据请求获取登录用户信息**
> 维护人员xuanran.wang
```java
User logInUser = HrmUserVarify.getUser(request, response));
User logInUser=HrmUserVarify.getUser(request,response));
// 传入id会将此人员信息带出
User user = new User(id);
User user=new User(id);
// 获取人员id
user.getUID();
user.getUID();
```
**2.发送邮件**
> 维护人员xuanran.wang
```java
/**
* <h1>发送邮件</h1>
@ -403,28 +405,62 @@ user.getUID();
* @param title 标题
* @param content 正文
**/
EmailWorkRunnable.threadModeReminder(address, title, content);
EmailWorkRunnable.threadModeReminder(address,title,content);
```
> 维护人员: youHong.ai
```java
/**
* <h2>发送附件邮件</h2>
* @param sendTo 收件人邮箱地址(多个值之间用英文逗号分隔)
* @param sendCc 抄送人邮箱地址(多个值之间用英文逗号分隔)
* @param sendBcc 密送人邮箱地址(多个值之间用英文逗号分隔)
* @param subject 主题
* @param content 内容
* @param imageFileIds 附件id
*/
EmailWorkRunnable.threadModeReminder(sendTo,sendCc,sendBcc,subject,content,imageFileIds);
```
或者
```java
/*
@param sendTo 收件人邮箱地址(多个值之间用英文逗号分隔)
@param sendCc 抄送人邮箱地址(多个值之间用英文逗号分隔)
@param sendBcc 密送人邮箱地址(多个值之间用英文逗号分隔)
@param subject 主题
@param content 内容
@param imageFileIds 附件id
*/
EmailWorkRunnable emailWorkRunable=new EmailWorkRunnable(sendTo,sendCc,sendBcc,subject,content);
emailWorkRunable.setImagefileids(imageFileIds);
MailCommonUtils.executeThreadPool(EmailPoolSubTypeEnum.EMAIL_SYS_ALTER.toString(),emailWorkRunable);
```
**3.短信服务**
> 维护人员xuanran.wang
```java
public class SendSms implements SmsService {
@Override
@Override
public boolean sendSMS(String smsId, String number, String msg) {
//执行短信调用接口逻辑
return SMSUtil.sendSms(number,msg,url,sn,pwd);
return SMSUtil.sendSms(number, msg, url, sn, pwd);
}
}
```
**4.三方插件文档转PDF(培训群找过来的)**
> 维护人员xuanran.wang
```java
wps转PDF
DocImagefileToPdfUseWps toPdfUseWps = new DocImagefileToPdfUseWps();
newimagefileid = toPdfUseWps.officeDocumetnToPdfByImagefileid(docimagefileid);
永中转PDF
DocImagefileToPdf yozoToPdf = new DocImagefileToPdf();
newimagefileid = yozoToPdf.officeDocumetnToPdfByImagefileid(docimagefileid);
```java
//wps转PDF
DocImagefileToPdfUseWps toPdfUseWps=new DocImagefileToPdfUseWps();
newimagefileid=toPdfUseWps.officeDocumetnToPdfByImagefileid(docimagefileid);
//永中转PDF
DocImagefileToPdf yozoToPdf=new DocImagefileToPdf();
newimagefileid=yozoToPdf.officeDocumetnToPdfByImagefileid(docimagefileid);
```