多店铺需求

This commit is contained in:
Tankaikai 2025-04-08 18:30:39 +08:00
parent a6377a05f0
commit be566206ac
1 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,7 @@
package com.czg.controller.admin;
import cn.dev33.satoken.session.TokenSign;
import cn.hutool.core.collection.CollUtil;
import com.czg.account.dto.PageDTO;
import com.czg.account.dto.shopinfo.ShopBranchSelectDTO;
import com.czg.account.dto.shopinfo.ShopDetailDTO;
@ -99,7 +101,8 @@ public class ShopInfoController {
public CzgResult<List<ShopBranchSelectDTO>> findShopBranch() {
Long shopId = StpKit.USER.getShopId(0L);
Long headId = StpKit.USER.getHeadId();
List<ShopBranchSelectDTO> data = shopInfoService.findShopBranch(headId != null ? headId : shopId);
List<TokenSign> tokenSignList = StpKit.USER.getSession().getTokenSignList();
List<ShopBranchSelectDTO> data = shopInfoService.findShopBranch((headId != null&& CollUtil.isEmpty(tokenSignList)) ? headId : shopId);
return CzgResult.success(data);
}