|
@@ -10,11 +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;
|
|
|
+import com.fdkankan.sms.SmsService;
|
|
|
+import com.fdkankan.ucenter.common.*;
|
|
|
import com.fdkankan.ucenter.entity.ScenePlus;
|
|
|
import com.fdkankan.ucenter.entity.ScenePlusExt;
|
|
|
import com.fdkankan.ucenter.entity.ScenePro;
|
|
@@ -28,13 +25,15 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import javax.servlet.http.HttpSession;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.time.LocalDateTime;
|
|
|
+import java.time.ZoneOffset;
|
|
|
+import java.util.*;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping("/ucenter/test")
|
|
|
-public class TestController {
|
|
|
+public class TestController extends BaseController {
|
|
|
@Autowired
|
|
|
private IFolderSceneService folderSceneService;
|
|
|
@Autowired
|
|
@@ -69,26 +68,6 @@ public class TestController {
|
|
|
|
|
|
@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
|
|
@@ -119,5 +98,33 @@ public class TestController {
|
|
|
mailTemplateService.sendCodeMail(userName,"123456","zh");
|
|
|
return Result.success( );
|
|
|
}
|
|
|
+ @Autowired
|
|
|
+ SmsService smsService;
|
|
|
+ @GetMapping("/sendMail3")
|
|
|
+ public Result sendMail3(@RequestParam(required = false)String userName) throws Exception {
|
|
|
+ //luomin@cgaii.com
|
|
|
+ String cnCode = "SMS_216275556";
|
|
|
+ String expireCode = "SMS_216425565";
|
|
|
+ smsService.sendSms(userName, "{\"time\":\"" + 1 + "\"}", expireCode);
|
|
|
+ smsService.sendSms(userName, "{\"time\":\"" + 1 + "\"}", cnCode);
|
|
|
+ return Result.success( );
|
|
|
+ }
|
|
|
+ @GetMapping("/test1")
|
|
|
+ public Result test1(@RequestParam(required = false)String userName) throws Exception {
|
|
|
+ //luomin@cgaii.com
|
|
|
+
|
|
|
+ return Result.success( );
|
|
|
+ }
|
|
|
+
|
|
|
+ public static void main(String[] args) {
|
|
|
+ String timeZone = "Asia/Tokyo";
|
|
|
+ TimeZone zone = TimeZone.getTimeZone(timeZone);
|
|
|
+ System.out.println("zone = " + zone.getID() );
|
|
|
+
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ sdf.setTimeZone(zone);
|
|
|
+ System.out.println(sdf.format(new Date()));
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
}
|