|
@@ -11,6 +11,7 @@ import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
|
import com.fdkankan.redis.constant.RedisKey;
|
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
|
import com.fdkankan.sms.SendMailAcceUtils;
|
|
|
+import com.fdkankan.sms.SmsService;
|
|
|
import com.fdkankan.ucenter.common.MailUtil;
|
|
|
import com.fdkankan.ucenter.common.OssPath;
|
|
|
import com.fdkankan.ucenter.common.RedisKeyUtil;
|
|
@@ -20,6 +21,7 @@ import com.fdkankan.ucenter.entity.ScenePlusExt;
|
|
|
import com.fdkankan.ucenter.entity.ScenePro;
|
|
|
import com.fdkankan.ucenter.entity.SceneProRe;
|
|
|
import com.fdkankan.ucenter.service.*;
|
|
|
+import jodd.util.StringUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -67,8 +69,20 @@ public class TestController {
|
|
|
return Result.success( );
|
|
|
}
|
|
|
|
|
|
+ @Autowired
|
|
|
+ SmsService smsService;
|
|
|
@GetMapping("/sendMail")
|
|
|
- public Result sendMail() throws GeneralSecurityException {
|
|
|
+ public Result sendMail() throws Exception {
|
|
|
+ String cnCode = "SMS_179150247";
|
|
|
+ String cnCode2 = "SMS_216275556";
|
|
|
+ String expireCode = "SMS_216425565";
|
|
|
+ String phoneNum = "13169663387";
|
|
|
+ String code = "123456";
|
|
|
+ smsService.sendSms(phoneNum, "{\"code\":\"" + code + "\"}", cnCode);
|
|
|
+
|
|
|
+ smsService.sendSms(phoneNum, "{\"time\":\"" + "1" + "\"}", expireCode);
|
|
|
+ smsService.sendSms(phoneNum, "{\"time\":\"" + "1" + "\"}", cnCode2);
|
|
|
+
|
|
|
String [] userNames = {"luomin@cgaii.com","1413541360@qq.com"};
|
|
|
for (String userName : userNames) {
|
|
|
// SendMailAcceUtils.sendMail(userName, SendMailAcceUtils.EN_CODE_SUBJECT, MailUtil.EN_CODE_MSG.replace("${code}", "123456"), null);
|
|
@@ -85,9 +99,9 @@ public class TestController {
|
|
|
// String EN_CODE_MSG_EUR_GQ = MailUtil.EN_CODE_MSG_EUR_GQ.replace("${member}","premium ");
|
|
|
// SendMailAcceUtils.sendMail(userName,
|
|
|
// MailUtil.EN_CODE_SUBJECT_GQ, EN_CODE_MSG_EUR_GQ,null);
|
|
|
-
|
|
|
- SendMailAcceUtils.sendMail(userName, SendMailAcceUtils.CN_CODE_SUBJECT,
|
|
|
- SendMailAcceUtils.CN_CODE_MSG.replace("${code}", "123456"), null);
|
|
|
+//
|
|
|
+// SendMailAcceUtils.sendMail(userName, SendMailAcceUtils.CN_CODE_SUBJECT,
|
|
|
+// SendMailAcceUtils.CN_CODE_MSG.replace("${code}", "123456"), null);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -96,4 +110,10 @@ public class TestController {
|
|
|
return Result.success();
|
|
|
}
|
|
|
|
|
|
+ public static void main(String[] args) throws GeneralSecurityException {
|
|
|
+
|
|
|
+ SendMailAcceUtils.sendMail("luomin@cgaii.com", SendMailAcceUtils.CN_CODE_SUBJECT,
|
|
|
+ SendMailAcceUtils.CN_CODE_MSG.replace("${code}", "123456"), null);
|
|
|
+ }
|
|
|
+
|
|
|
}
|