|
@@ -3,6 +3,7 @@ package com.style24.front.biz.web;
|
|
|
import java.util.Collection;
|
|
import java.util.Collection;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.mobile.device.Device;
|
|
|
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.PostMapping;
|
|
@@ -74,18 +75,24 @@ public class TsfPlanningController extends TsfBaseController {
|
|
|
/**
|
|
/**
|
|
|
* 기획전 메인 목록
|
|
* 기획전 메인 목록
|
|
|
* @param plan - 기획전 정보
|
|
* @param plan - 기획전 정보
|
|
|
|
|
+ * @param device - 디바이스 정보
|
|
|
* @return
|
|
* @return
|
|
|
* @author gagamel
|
|
* @author gagamel
|
|
|
* @since 2021. 3. 29
|
|
* @since 2021. 3. 29
|
|
|
*/
|
|
*/
|
|
|
@GetMapping("/main/list")
|
|
@GetMapping("/main/list")
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
- public Collection<Plan> getPlanningMainList(Plan plan) {
|
|
|
|
|
|
|
+ public Collection<Plan> getPlanningMainList(Plan plan, Device device) {
|
|
|
plan.setSiteCd(TscConstants.Site.STYLE24.value());
|
|
plan.setSiteCd(TscConstants.Site.STYLE24.value());
|
|
|
plan.setFrontGb(TsfSession.getFrontGb());
|
|
plan.setFrontGb(TsfSession.getFrontGb());
|
|
|
plan.setCustGb(TsfSession.getCustGb());
|
|
plan.setCustGb(TsfSession.getCustGb());
|
|
|
plan.setCustNo(TsfSession.isLogin() ? TsfSession.getInfo().getCustNo() : 0);
|
|
plan.setCustNo(TsfSession.isLogin() ? TsfSession.getInfo().getCustNo() : 0);
|
|
|
- plan.setMaxRow(2);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (device.isNormal()) {
|
|
|
|
|
+ plan.setMaxRow(2); // PC웹은 2개
|
|
|
|
|
+ } else {
|
|
|
|
|
+ plan.setMaxRow(3); // 모바일은 3개
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return planningService.getPlanningMainList(plan);
|
|
return planningService.getPlanningMainList(plan);
|
|
|
}
|
|
}
|