分店列表修改
This commit is contained in:
@@ -376,8 +376,10 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ShopBranchSelectDTO> findShopBranch(Long shopId) {
|
public List<ShopBranchSelectDTO> findShopBranch(Long shopId) {
|
||||||
|
Long mainIdByShopId = getMainIdByShopId(shopId);
|
||||||
List<ShopBranchSelectDTO> list = new ArrayList<>();
|
List<ShopBranchSelectDTO> list = new ArrayList<>();
|
||||||
ShopInfo shopInfo = getById(shopId);
|
// 主店信息
|
||||||
|
ShopInfo shopInfo = getById(mainIdByShopId);
|
||||||
ShopBranchSelectDTO head = new ShopBranchSelectDTO();
|
ShopBranchSelectDTO head = new ShopBranchSelectDTO();
|
||||||
head.setShopId(shopInfo.getId());
|
head.setShopId(shopInfo.getId());
|
||||||
head.setShopName(shopInfo.getShopName());
|
head.setShopName(shopInfo.getShopName());
|
||||||
@@ -386,7 +388,6 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
|
|||||||
if (loginType.compareTo(MyStpLogic.LoginType.STAFF) == 0) {
|
if (loginType.compareTo(MyStpLogic.LoginType.STAFF) == 0) {
|
||||||
return list;
|
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));
|
List<ShopInfo> branchList = mapper.selectListByQuery(query().select(ShopInfo::getId, ShopInfo::getShopName).eq(ShopInfo::getMainId, mainIdByShopId).orderBy(ShopInfo::getId, true));
|
||||||
for (ShopInfo info : branchList) {
|
for (ShopInfo info : branchList) {
|
||||||
ShopBranchSelectDTO branch = new ShopBranchSelectDTO();
|
ShopBranchSelectDTO branch = new ShopBranchSelectDTO();
|
||||||
|
|||||||
Reference in New Issue
Block a user