|
@@ -10,6 +10,8 @@ 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.ucenter.common.MailUtil;
|
|
|
import com.fdkankan.ucenter.common.OssPath;
|
|
|
import com.fdkankan.ucenter.common.RedisKeyUtil;
|
|
|
import com.fdkankan.ucenter.common.Result;
|
|
@@ -20,6 +22,7 @@ import com.fdkankan.ucenter.entity.SceneProRe;
|
|
|
import com.fdkankan.ucenter.service.*;
|
|
|
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;
|
|
@@ -63,4 +66,58 @@ public class TestController {
|
|
|
return Result.success( );
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @RequestMapping("/sendMail")
|
|
|
+ public Result sendMail() throws Exception {
|
|
|
+ Integer days =30;
|
|
|
+ String userName = "luomin@cgaii.com";
|
|
|
+ //String userName = "1413541360@qq.com";
|
|
|
+ String msgType = "premium";
|
|
|
+ if(days!=null && days >= 0){
|
|
|
+ if(days > 0){
|
|
|
+ String EN_CODE_MSG_EUR = MailUtil.EN_CODE_MSG_EUR.replace("${member}",msgType+" ");
|
|
|
+ SendMailAcceUtils.sendMail(userName,
|
|
|
+ MailUtil.EN_CODE_SUBJECT_GQ, EN_CODE_MSG_EUR.replace("${code}",days.toString()),
|
|
|
+ null);
|
|
|
+ }else{
|
|
|
+ SendMailAcceUtils.sendMail(userName,
|
|
|
+ MailUtil.EN_CODE_SUBJECT_GQ, MailUtil.EN_CODE_MSG_EUR_TODAY.replace("${member}"," "+msgType),
|
|
|
+ null);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ String EN_CODE_MSG_EUR_GQ = MailUtil.EN_CODE_MSG_EUR_GQ.replace("${member}",msgType+" ");
|
|
|
+ SendMailAcceUtils.sendMail(userName,
|
|
|
+ MailUtil.EN_CODE_SUBJECT_GQ, EN_CODE_MSG_EUR_GQ,null);
|
|
|
+ }
|
|
|
+ return Result.success( );
|
|
|
+ }
|
|
|
+ @Autowired
|
|
|
+ IMailTemplateService mailTemplateService;
|
|
|
+
|
|
|
+ @GetMapping("/sendMail1")
|
|
|
+ public Result sendMail1(@RequestParam(required = false)String userName) throws Exception {
|
|
|
+ //luomin@cgaii.com
|
|
|
+ Integer[] days ={-1,0,30};
|
|
|
+ for (Integer day : days) {
|
|
|
+ if(day == null || day<0){
|
|
|
+ mailTemplateService.sendPeExMail(userName);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if(day > 0){
|
|
|
+ mailTemplateService.sendPeNoExMail(userName,day);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ mailTemplateService.sendPeTodayExMail(userName);
|
|
|
+ }
|
|
|
+ return Result.success( );
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/sendMail2")
|
|
|
+ public Result sendMail2(@RequestParam(required = false)String userName) throws Exception {
|
|
|
+ //luomin@cgaii.com
|
|
|
+ mailTemplateService.sendCodeMail(userName,"123456","en");
|
|
|
+ mailTemplateService.sendCodeMail(userName,"123456","zh");
|
|
|
+ return Result.success( );
|
|
|
+ }
|
|
|
+
|
|
|
}
|