File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
package com.takensoft.ums.web;
import com.takensoft.common.util.ResponseData;
import com.takensoft.ums.service.UmsService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Map;
/**
* @author : 방선주
* @since : 2024.06.25
*
* UmsController - 문자 메시지 전송을 위한 컨트롤러
*/
@RestController
@RequiredArgsConstructor
@Slf4j
@RequestMapping(value="/ums")
public class UmsController {
private final UmsService umsService;
// 문자 메시지 테이블 확인
@PostMapping(value="/saveUmsInfo.json")
public ResponseEntity<?> saveUmsInfo() throws Exception {
// 목록 조회
// Map<String, Object> result = umsService.findAll();
Map<String, Object> result = umsService.save();
// 응답처리
HttpHeaders headers = new HttpHeaders();
headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8")));
ResponseData responseData = new ResponseData();
responseData.setStatus(HttpStatus.OK);
responseData.setMessage("정상적으로 조회가 처리되었습니다.");
responseData.setData(result);
return new ResponseEntity<>(responseData, headers, HttpStatus.OK);
}
}