package kr.wisestone.owl.web.controller; import kr.wisestone.owl.constant.Constants; import kr.wisestone.owl.service.IssueReservationService; import kr.wisestone.owl.web.condition.IssueReservationCondition; import kr.wisestone.owl.web.form.IssueReservationForm; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import java.util.HashMap; import java.util.Map; /** * Create By J E O N G - S U N / 2019-05-08 */ @Controller public class IssueReservationController extends BaseController { @Autowired private IssueReservationService issueReservationService; // 이슈 발생 예약 상세 조회 @RequestMapping(value = "/issueReservation/detail", produces = MediaType.APPLICATION_JSON_VALUE) public @ResponseBody Map detail(@RequestBody Map> params) { Map resJsonData = new HashMap<>(); this.issueReservationService.detailIssueReservation(resJsonData, IssueReservationCondition.make(params.get(Constants.REQ_KEY_CONTENT))); return this.setSuccessMessage(resJsonData); } // 이슈 발생 예약 수정 @RequestMapping(value = "/issueReservation/modify", produces = MediaType.APPLICATION_JSON_VALUE) public @ResponseBody Map modify(@RequestBody Map> params) { Map resJsonData = new HashMap<>(); this.issueReservationService.modifyIssueReservation(resJsonData, IssueReservationForm.make(params.get(Constants.REQ_KEY_CONTENT))); return this.setSuccessMessage(resJsonData); } }