package itn.com.api.web; import java.time.LocalDateTime; import javax.annotation.Resource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import itn.let.kakao.admin.kakaoAt.service.MjonKakaoAtStatVO; import itn.let.kakao.admin.statistics.service.KakaoStatisticsService; import itn.let.mail.service.StatusResponse; import itn.let.mjo.msg.service.MjonMsgService; import itn.let.mjo.msg.service.MjonMsgStatVO; /** * * @author : 이호영 * @fileName : ApiRestController.java * @date : 2023.01.05 * @description : * =========================================================== * DATE AUTHOR NOTE * ----------------------------------------------------------- * * 2023.01.05 이호영 최초 생성 * * * */ @RestController public class ApiRestController { private static final Logger log = LoggerFactory.getLogger(ApiRestController.class); @Resource(name = "mjonMsgService") private MjonMsgService mjonMsgService; @Resource(name = "KakaoStatisticsService") private KakaoStatisticsService kakaoStatisticsService; /** * @methodName : mailSendItnContactUs * @author : 이호영 * @date : 2023.01.05 * @description : * @param mjonMsgStatVO * @return * @throws Exception */ @GetMapping(value = "/web/api/insertAgentSmsCountStatApi.do") public ResponseEntity insertAgentSmsCountStatApi(MjonMsgStatVO mjonMsgStatVO) throws Exception { try { mjonMsgService.insertAgentSmsCountStat(mjonMsgStatVO); } catch (Exception e) { // TODO: handle exception e.printStackTrace(); return ResponseEntity.ok().body(new StatusResponse(HttpStatus.OK, "문자 발송건수 통계 생성을 실패하였습니다.", LocalDateTime.now())); } return ResponseEntity.ok().body(new StatusResponse(HttpStatus.OK, "문자 발송건수 통계 생성을 성공적으로 마쳤습니다.", LocalDateTime.now())); } /** * @methodName : insertKakaoAtCountStatApi * @author : 안주영 * @date : 2023.03.23 * @description : * @param kakaoAtStatVO * @return * @throws Exception */ @GetMapping(value = "/web/api/insertKakaoAtCountStatApi.do") public ResponseEntity insertKakaoAtCountStatApi(MjonKakaoAtStatVO kakaoAtStatVO) throws Exception { try { kakaoStatisticsService.insertKakaoAtCountStat(kakaoAtStatVO); } catch (Exception e) { // TODO: handle exception e.printStackTrace(); return ResponseEntity.ok().body(new StatusResponse(HttpStatus.OK, "알림톡 발송건수 통계 생성을 실패하였습니다.", LocalDateTime.now())); } return ResponseEntity.ok().body(new StatusResponse(HttpStatus.OK, "알림톡 발송건수 통계 생성을 성공적으로 마쳤습니다.", LocalDateTime.now())); } }