FAISP/src/main/java/com/dbnt/faisp/config/ModalController.java

34 lines
1.2 KiB
Java
Raw Normal View History

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;
import com.dbnt.faisp.userInfo.model.UserInfo;
2022-10-13 09:34:32 +00:00
import lombok.RequiredArgsConstructor;
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")
public ModelAndView menuModalPage(@AuthenticationPrincipal UserInfo loginUser, MenuMgt menuMgt){
2022-10-13 09:34:32 +00:00
ModelAndView mav = new ModelAndView("commonModal/menuModal");
menuMgt.setUserSeq(loginUser.getUserSeq());
2022-10-13 09:34:32 +00:00
menuMgt.setQueryInfo();
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;
}
}