多店铺需求

This commit is contained in:
Tankaikai 2025-04-08 18:08:58 +08:00
parent b8db432134
commit 5b58c59e95
1 changed files with 3 additions and 1 deletions

View File

@ -98,12 +98,14 @@ public class ShopInfoController {
@GetMapping("branchList")
public CzgResult<List<ShopBranchSelectDTO>> findShopBranch() {
Long shopId = StpKit.USER.getShopId(0L);
List<ShopBranchSelectDTO> data = shopInfoService.findShopBranch(shopId);
Long headId = StpKit.USER.getHeadId();
List<ShopBranchSelectDTO> data = shopInfoService.findShopBranch(headId != null ? headId : shopId);
return CzgResult.success(data);
}
/**
* 切换店铺
*
* @param shopId 店铺ID
*/
@PostMapping("/change/{shopId}")