From a5f40b4c2590a3d61592f1918d689d4932545248 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期三, 22 一月 2025 15:06:38 +0800
Subject: [PATCH] ll
---
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/SmsEmailServiceImpl.java | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 49 insertions(+), 0 deletions(-)
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/SmsEmailServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/SmsEmailServiceImpl.java
index 2edabc8..8a856a8 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/SmsEmailServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/SmsEmailServiceImpl.java
@@ -18,6 +18,7 @@
import com.doumee.dao.system.SystemUserMapper;
import com.doumee.dao.system.model.SystemUser;
import com.doumee.service.business.SmsEmailService;
+import com.doumee.service.business.third.EmailService;
import com.doumee.service.business.third.EmayService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -579,4 +580,52 @@
}
}
+
+
+ @Override
+ public Integer sendBillSms(String content,String mobile,Integer billId) {
+ if(StringUtils.isBlank(mobile)){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ boolean result= emayService.sendSingleSms(mobile,content);
+ if(!result){
+ throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"瀵逛笉璧凤紝鐭俊鍙戦�佸け璐ワ紝璇风◢鍚庨噸璇曪紒");
+ }
+ SmsEmail smsEmail = new SmsEmail();
+ smsEmail.setIsdeleted(Constants.ZERO);
+ smsEmail.setCreateDate(new Date());
+ smsEmail.setStatus(Constants.ZERO);
+ smsEmail.setType(Constants.ZERO);
+ smsEmail.setTitle("璐﹀崟鍌垂");
+ smsEmail.setObjId(billId);
+ smsEmail.setObjType(Constants.ZERO+"");
+ smsEmail.setContent(content);
+ smsEmailMapper.insert(smsEmail);
+ return smsEmail.getId();
+ }
+
+ @Autowired
+ private EmailService emailService;
+
+ @Override
+ public Integer sendEmail(String email,String content,Integer billId) {
+ if(StringUtils.isBlank(email)){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ boolean result= emailService.sendEmail(email,"璐﹀崟鍌垂",content,null);
+ SmsEmail smsEmail = new SmsEmail();
+ smsEmail.setRemark("閭欢鍙戠敓鎴愬姛");
+ if(!result){
+ smsEmail.setRemark("閭欢鍙戠敓澶辫触");
+ }
+ smsEmail.setIsdeleted(Constants.ZERO);
+ smsEmail.setCreateDate(new Date());
+ smsEmail.setStatus(Constants.ONE);
+ smsEmail.setType(Constants.TWO);
+ smsEmail.setObjId(billId);
+ smsEmail.setObjType(Constants.ONE+"");
+ smsEmail.setContent(content);
+ smsEmailMapper.insert(smsEmail);
+ return smsEmail.getId();
+ }
}
--
Gitblit v1.9.3