|
@@ -13,11 +13,13 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
|
|
|
|
+import com.style24.admin.biz.service.TsaClauseService;
|
|
|
import com.style24.admin.biz.service.TsaEnvsetService;
|
|
import com.style24.admin.biz.service.TsaEnvsetService;
|
|
|
import com.style24.admin.biz.service.TsaRendererService;
|
|
import com.style24.admin.biz.service.TsaRendererService;
|
|
|
import com.style24.admin.support.controller.TsaBaseController;
|
|
import com.style24.admin.support.controller.TsaBaseController;
|
|
|
import com.style24.core.biz.service.TscEnvsetService;
|
|
import com.style24.core.biz.service.TscEnvsetService;
|
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
|
|
|
+import com.style24.persistence.domain.Clause;
|
|
|
import com.style24.persistence.domain.Envset;
|
|
import com.style24.persistence.domain.Envset;
|
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -27,7 +29,7 @@ import com.gagaframework.web.rest.server.GagaResponse;
|
|
|
/**
|
|
/**
|
|
|
* 환경설정 Controller
|
|
* 환경설정 Controller
|
|
|
*
|
|
*
|
|
|
- * @author jaewonHo
|
|
|
|
|
|
|
+ * @author gagamel
|
|
|
* @since 2020. 10. 21
|
|
* @since 2020. 10. 21
|
|
|
*/
|
|
*/
|
|
|
@Controller
|
|
@Controller
|
|
@@ -47,6 +49,9 @@ public class TsaEnvsetController extends TsaBaseController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private TsaRendererService rendererService;
|
|
private TsaRendererService rendererService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private TsaClauseService clauseService;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 기본환경설정 화면
|
|
* 기본환경설정 화면
|
|
|
* @return
|
|
* @return
|
|
@@ -138,4 +143,94 @@ public class TsaEnvsetController extends TsaBaseController {
|
|
|
return envsetService.getEnvsetHistoryList(siteCd, envsetType);
|
|
return envsetService.getEnvsetHistoryList(siteCd, envsetType);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 약관관리 화면
|
|
|
|
|
+ * @return ModelAndView
|
|
|
|
|
+ * @author gagamel
|
|
|
|
|
+ * @since 2020. 10. 29
|
|
|
|
|
+ */
|
|
|
|
|
+ @GetMapping("/clause/form")
|
|
|
|
|
+ public ModelAndView clauseForm() {
|
|
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
|
|
+
|
|
|
|
|
+ // 사이트 목록
|
|
|
|
|
+ mav.addObject("siteList", rendererService.getAvailCommonCodeList("G000"));
|
|
|
|
|
+
|
|
|
|
|
+ // 약관유형 목록
|
|
|
|
|
+ mav.addObject("clauseTypeList", rendererService.getAvailCommonCodeList("G057"));
|
|
|
|
|
+
|
|
|
|
|
+ mav.setViewName("envset/ClauseForm");
|
|
|
|
|
+
|
|
|
|
|
+ return mav;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 약관관리 목록
|
|
|
|
|
+ * @param clause - 약관 정보
|
|
|
|
|
+ * @return
|
|
|
|
|
+ * @author gagamel
|
|
|
|
|
+ * @since 2020. 10. 29
|
|
|
|
|
+ */
|
|
|
|
|
+ @PostMapping("/clause/list")
|
|
|
|
|
+ @ResponseBody
|
|
|
|
|
+ public Collection<Clause> getClauseList(@RequestBody Clause clause) {
|
|
|
|
|
+ return clauseService.getClauseList(clause);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 약관관리상세 화면
|
|
|
|
|
+ * @return
|
|
|
|
|
+ * @author gagamel
|
|
|
|
|
+ * @since 2020. 10. 29
|
|
|
|
|
+ */
|
|
|
|
|
+ @GetMapping("/clause/detail/form")
|
|
|
|
|
+ public ModelAndView clauseDetailForm(@RequestParam(value = "mode") String mode, @RequestParam(value = "clauseSq", required = false) Integer clauseSq) {
|
|
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
|
|
+
|
|
|
|
|
+ // 사이트 목록
|
|
|
|
|
+ mav.addObject("siteList", rendererService.getAvailCommonCodeList("G000"));
|
|
|
|
|
+
|
|
|
|
|
+ // 약관유형 목록
|
|
|
|
|
+ mav.addObject("clauseTypeList", rendererService.getAvailCommonCodeList("G057"));
|
|
|
|
|
+
|
|
|
|
|
+ // 모드 값
|
|
|
|
|
+ mav.addObject("mode", mode);
|
|
|
|
|
+
|
|
|
|
|
+ if ("U".equals(mode)) {
|
|
|
|
|
+ mav.addObject("clauseInfo", clauseService.getClauseDetail(clauseSq));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ mav.setViewName("envset/ClauseDetailForm");
|
|
|
|
|
+
|
|
|
|
|
+ return mav;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 약관 생성
|
|
|
|
|
+ * @param clause - 약관 정보
|
|
|
|
|
+ * @return
|
|
|
|
|
+ * @author gagamel
|
|
|
|
|
+ * @since 2020. 10. 29
|
|
|
|
|
+ */
|
|
|
|
|
+ @PostMapping("/clause/detail/create")
|
|
|
|
|
+ @ResponseBody
|
|
|
|
|
+ public GagaResponse createClause(@RequestBody Clause clause) {
|
|
|
|
|
+ clauseService.createClause(clause);
|
|
|
|
|
+ return super.ok(message.getMessage("SUCC_0001"));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 약관 수정
|
|
|
|
|
+ * @param clause - 약관 정보
|
|
|
|
|
+ * @return
|
|
|
|
|
+ * @author gagamel
|
|
|
|
|
+ * @since 2020. 10. 29
|
|
|
|
|
+ */
|
|
|
|
|
+ @PostMapping("/clause/detail/update")
|
|
|
|
|
+ @ResponseBody
|
|
|
|
|
+ public GagaResponse updateClause(@RequestBody Clause clause) {
|
|
|
|
|
+ clauseService.updateClause(clause);
|
|
|
|
|
+ return super.ok(message.getMessage("SUCC_0001"));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|