TsfSocialController.java 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. package com.style24.front.biz.web;
  2. import org.springframework.beans.factory.annotation.Autowired;
  3. import org.springframework.stereotype.Controller;
  4. import org.springframework.web.bind.annotation.GetMapping;
  5. import org.springframework.web.bind.annotation.RequestMapping;
  6. import org.springframework.web.servlet.ModelAndView;
  7. import com.style24.front.biz.service.TsfSocialService;
  8. import com.style24.front.support.controller.TsfBaseController;
  9. import com.style24.front.support.security.session.TsfSession;
  10. import com.style24.persistence.domain.Social;
  11. import lombok.extern.slf4j.Slf4j;
  12. /**
  13. * 소셜(핫딜) Controller
  14. *
  15. * @author sowon
  16. * @since 2021. 3. 11
  17. */
  18. @Controller
  19. @RequestMapping("/social")
  20. @Slf4j
  21. public class TsfSocialController extends TsfBaseController {
  22. @Autowired
  23. private TsfSocialService socialService;
  24. /**
  25. * 소셜(핫딜) 메인 화면
  26. *
  27. * @return
  28. * @author sowon
  29. * @since 2021. 3. 11
  30. */
  31. @GetMapping("/main/form")
  32. public ModelAndView socialMainForm(Social social) throws Exception {
  33. ModelAndView mav = new ModelAndView();
  34. // 디바이스 set
  35. social.setFrontGb(TsfSession.getFrontGb());
  36. social.setCustGb(TsfSession.getCustGb());
  37. // 소셜(핫딜)
  38. mav.addObject("socialInfo", socialService.getSocialInfo(social));
  39. // 소셜(핫딜)-상품목록
  40. mav.addObject("socialGoods", socialService.getSocialGoodsList(social));
  41. mav.setViewName(super.getDeviceViewName("social/SocialMainForm"));
  42. return mav;
  43. }
  44. }