2022-10-13 09:34:32 +00:00
|
|
|
package com.dbnt.faisp.config;
|
|
|
|
|
|
|
|
|
|
import com.dbnt.faisp.menuMgt.model.MenuMgt;
|
|
|
|
|
import com.dbnt.faisp.menuMgt.service.MenuMgtService;
|
2022-10-14 08:14:48 +00:00
|
|
|
import com.dbnt.faisp.userInfo.model.UserInfo;
|
2022-10-13 09:34:32 +00:00
|
|
|
import lombok.RequiredArgsConstructor;
|
2022-10-14 08:14:48 +00:00
|
|
|
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
2022-10-13 09:34:32 +00:00
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
|
@RequiredArgsConstructor
|
|
|
|
|
@RequestMapping("/modal")
|
|
|
|
|
public class ModalController {
|
|
|
|
|
|
|
|
|
|
private final MenuMgtService menuMgtService;
|
|
|
|
|
|
|
|
|
|
@GetMapping("/menuModal")
|
2022-10-14 08:14:48 +00:00
|
|
|
public ModelAndView menuModalPage(@AuthenticationPrincipal UserInfo loginUser, MenuMgt menuMgt){
|
2022-10-13 09:34:32 +00:00
|
|
|
ModelAndView mav = new ModelAndView("commonModal/menuModal");
|
2022-10-14 08:14:48 +00:00
|
|
|
menuMgt.setUserSeq(loginUser.getUserSeq());
|
2022-10-13 09:34:32 +00:00
|
|
|
menuMgt.setQueryInfo();
|
2022-10-14 08:14:48 +00:00
|
|
|
mav.addObject("menuMgtList", menuMgtService.selectMenuMgtListToAccessAuth(menuMgt));
|
|
|
|
|
menuMgt.setContentCnt(menuMgtService.selectMenuMgtListToAccessAuthCnt(menuMgt));
|
2022-10-13 09:34:32 +00:00
|
|
|
menuMgt.setPaginationInfo();
|
|
|
|
|
mav.addObject("searchParams", menuMgt);
|
|
|
|
|
return mav;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|