分店列表修改

This commit is contained in:
张松 2025-09-27 15:01:35 +08:00
parent 8fc90285fe
commit 3227be2aa2
1 changed files with 3 additions and 2 deletions

View File

@ -376,8 +376,10 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
@Override
public List<ShopBranchSelectDTO> findShopBranch(Long shopId) {
Long mainIdByShopId = getMainIdByShopId(shopId);
List<ShopBranchSelectDTO> list = new ArrayList<>();
ShopInfo shopInfo = getById(shopId);
// 主店信息
ShopInfo shopInfo = getById(mainIdByShopId);
ShopBranchSelectDTO head = new ShopBranchSelectDTO();
head.setShopId(shopInfo.getId());
head.setShopName(shopInfo.getShopName());
@ -386,7 +388,6 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
if (loginType.compareTo(MyStpLogic.LoginType.STAFF) == 0) {
return list;
}
Long mainIdByShopId = getMainIdByShopId(shopId);
List<ShopInfo> branchList = mapper.selectListByQuery(query().select(ShopInfo::getId, ShopInfo::getShopName).eq(ShopInfo::getMainId, mainIdByShopId).orderBy(ShopInfo::getId, true));
for (ShopInfo info : branchList) {
ShopBranchSelectDTO branch = new ShopBranchSelectDTO();