fix: 모바일 전체메뉴 하위 카테고리 표시 개선

This commit is contained in:
이주일
2026-08-26 17:10:35 +09:00
parent 889639a63b
commit 87da1e547e
9 changed files with 88 additions and 19 deletions

View File

@@ -305,6 +305,14 @@ public class GoodsController {
public String selectGoodsListForm(HttpServletRequest request,
BOGoodsVO vo,
ModelMap model) {
String mobileParentCtgryId = request.getParameter("mobileParentCtgryId");
String mobileCurrentCtgryId = request.getParameter("mobileCurrentCtgryId");
boolean mobileSubCategorySelected = mobileParentCtgryId != null && !mobileParentCtgryId.isBlank()
&& mobileCurrentCtgryId != null && !mobileCurrentCtgryId.isBlank();
if (mobileSubCategorySelected) {
vo.setCtgryId(mobileParentCtgryId);
}
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
if("01".equals(user.getSysDvCd())){
vo.setSopmalCd(user.getSopmalCd());
@@ -322,7 +330,7 @@ public class GoodsController {
//검색한 카테고리 정보로 vo 세팅
if(!CollectionUtils.isEmpty(goodsCategoryList)){
vo.setUpperCtgryId(goodsCategoryList.get(0).get("baseCtgryId").toString());
vo.setCtgryId(goodsCategoryList.get(0).get("baseCtgryId").toString());
vo.setCtgryId(mobileSubCategorySelected ? mobileCurrentCtgryId : goodsCategoryList.get(0).get("baseCtgryId").toString());
}else{
vo.setUpperCtgryId("0");
vo.setCtgryId("0");