|
@@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import com.lemon.lifecenter.scheduler.controller.PushController;
|
|
@@ -46,6 +47,24 @@ public class HomeController {
|
|
|
return "helloWorld";
|
|
|
}
|
|
|
|
|
|
+ @RequestMapping(value = "/sendTest", method = RequestMethod.POST)
|
|
|
+ public String sendTest(
|
|
|
+ @RequestParam(value="redirectUrl", required=false, defaultValue="") String redirectUrl,
|
|
|
+ @RequestParam(value="token", required=false, defaultValue="") String token,
|
|
|
+ @RequestParam(value="title", required=false, defaultValue="") String title,
|
|
|
+ @RequestParam(value="content", required=false, defaultValue="") String content) {
|
|
|
+
|
|
|
+ HashMap<String, String> response = new HashMap<>();
|
|
|
+
|
|
|
+ response = pushUtils.sendFcm(token,
|
|
|
+ title, content, redirectUrl);
|
|
|
+
|
|
|
+ logger.error("response -- > " + response);
|
|
|
+
|
|
|
+ return "result : " + response;
|
|
|
+// return "helloWorld";
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 하루에 한번 결과 테이블이 있는지 확인 후 없으면 생성한다
|
|
|
* *(초) *(분) *(시) *(일) *(월) *(요일)
|