|
@@ -10,6 +10,9 @@ import com.fdkankan.common.util.SecurityUtil;
|
|
|
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;
|
|
|
import com.fdkankan.ucenter.common.Result;
|
|
@@ -18,13 +21,16 @@ 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;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.security.GeneralSecurityException;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -63,4 +69,51 @@ public class TestController {
|
|
|
return Result.success( );
|
|
|
}
|
|
|
|
|
|
+ @Autowired
|
|
|
+ SmsService smsService;
|
|
|
+ @GetMapping("/sendMail")
|
|
|
+ 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);
|
|
|
+// String EN_CODE_MSG_EUR = MailUtil.EN_CODE_MSG_EUR.replace("${member}","premium ");
|
|
|
+//
|
|
|
+// SendMailAcceUtils.sendMail(userName,
|
|
|
+// MailUtil.EN_CODE_SUBJECT_GQ, EN_CODE_MSG_EUR.replace("${code}","1"),
|
|
|
+// null);
|
|
|
+//
|
|
|
+// SendMailAcceUtils.sendMail(userName,
|
|
|
+// MailUtil.EN_CODE_SUBJECT_GQ, MailUtil.EN_CODE_MSG_EUR_TODAY.replace("${member}"," premium"),
|
|
|
+// null);
|
|
|
+//
|
|
|
+// 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);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+
|
|
|
}
|