|
@@ -1,18 +1,23 @@
|
|
|
package com.style24.front.biz.web;
|
|
package com.style24.front.biz.web;
|
|
|
|
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Collection;
|
|
import java.util.Collection;
|
|
|
import java.util.Iterator;
|
|
import java.util.Iterator;
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
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.bind.annotation.RestController;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
|
|
|
|
+import com.gagaframework.web.rest.server.GagaResponse;
|
|
|
import com.style24.core.support.env.TscConstants;
|
|
import com.style24.core.support.env.TscConstants;
|
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
|
import com.style24.front.biz.service.TsfPlanningService;
|
|
import com.style24.front.biz.service.TsfPlanningService;
|
|
@@ -53,24 +58,17 @@ public class TsfPlanningController extends TsfBaseController {
|
|
|
public ModelAndView PlanningMainForm(Plan plan) throws Exception {
|
|
public ModelAndView PlanningMainForm(Plan plan) throws Exception {
|
|
|
ModelAndView mav = new ModelAndView();
|
|
ModelAndView mav = new ModelAndView();
|
|
|
Cate4Srch cate = new Cate4Srch();
|
|
Cate4Srch cate = new Cate4Srch();
|
|
|
-
|
|
|
|
|
- // 디바이스 set
|
|
|
|
|
- //plan.setFrontGb(TsfSession.getFrontGb());
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 카테고리
|
|
// 카테고리
|
|
|
mav.addObject("categoryList", planningService.getPlanCate1(cate));
|
|
mav.addObject("categoryList", planningService.getPlanCate1(cate));
|
|
|
- mav.addObject("cateNo", plan.getCateNo());
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+ mav.addObject("cateNo", plan.getCateNo());
|
|
|
|
|
|
|
|
// 각 카테고리 기획전 갯수
|
|
// 각 카테고리 기획전 갯수
|
|
|
mav.addObject("planCount",planningService.getPlanAllCount(plan));
|
|
mav.addObject("planCount",planningService.getPlanAllCount(plan));
|
|
|
|
|
|
|
|
cate.setCate1No(plan.getCateNo());
|
|
cate.setCate1No(plan.getCateNo());
|
|
|
- mav.addObject("cateNm", planningService.getPlanCate1(cate).iterator().next().getCate1Nm());
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+ mav.addObject("cateNm", planningService.getPlanCate1(cate).iterator().next().getCate1Nm());
|
|
|
|
|
+
|
|
|
mav.addObject("planList", planningService.getPlanList(plan));
|
|
mav.addObject("planList", planningService.getPlanList(plan));
|
|
|
mav.addObject("goodsList", planningService.getPlanGoodsList(plan));
|
|
mav.addObject("goodsList", planningService.getPlanGoodsList(plan));
|
|
|
mav.setViewName(super.getDeviceViewName("planning/PlanningMainForm"));
|
|
mav.setViewName(super.getDeviceViewName("planning/PlanningMainForm"));
|
|
@@ -84,10 +82,12 @@ public class TsfPlanningController extends TsfBaseController {
|
|
|
* @author sowon
|
|
* @author sowon
|
|
|
* @since 2021. 3. 9
|
|
* @since 2021. 3. 9
|
|
|
*/
|
|
*/
|
|
|
- @GetMapping("/detail/form")
|
|
|
|
|
- @ResponseBody
|
|
|
|
|
- public ModelAndView PlanningDetailForm(Plan plan) throws Exception {
|
|
|
|
|
|
|
+ @PostMapping("/detail/form")
|
|
|
|
|
+ public ModelAndView PlanningDetailForm(@RequestBody Plan plan) throws Exception {
|
|
|
ModelAndView mav = new ModelAndView();
|
|
ModelAndView mav = new ModelAndView();
|
|
|
|
|
+ // 접근 가능 고객 등급 확인
|
|
|
|
|
+ planningService.accessCustGrade(plan);
|
|
|
|
|
+
|
|
|
// 상세정보
|
|
// 상세정보
|
|
|
//plan.setSiteCd(TsfConstants.SITE_CD);
|
|
//plan.setSiteCd(TsfConstants.SITE_CD);
|
|
|
|
|
|
|
@@ -97,10 +97,6 @@ public class TsfPlanningController extends TsfBaseController {
|
|
|
Plan planInfo = planningService.getPlanDetailInfo(plan);
|
|
Plan planInfo = planningService.getPlanDetailInfo(plan);
|
|
|
mav.addObject("planInfo", planInfo);
|
|
mav.addObject("planInfo", planInfo);
|
|
|
|
|
|
|
|
- if (planInfo == null || planInfo.getPlanSq() == null) {
|
|
|
|
|
- mav.setViewName("redirect:/planning/main/form");
|
|
|
|
|
- return mav;
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
// 다른기획전 보기
|
|
// 다른기획전 보기
|
|
|
mav.addObject("planList", planningService.getPlanList(plan));
|
|
mav.addObject("planList", planningService.getPlanList(plan));
|