fix 增加修改门店区域

This commit is contained in:
shuo.wang
2024-11-13 14:11:12 +08:00
parent 6eda5bdba4
commit 0c7ece5410
2 changed files with 20 additions and 8 deletions

View File

@@ -18,6 +18,7 @@ import com.cool.store.utils.RandomEightCharCodeUtils;
import com.cool.store.vo.shop.MiniShopPageVO;
import com.cool.store.vo.shop.ShopStageInfoVO;
import com.cool.store.vo.shop.StageShopCountVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -51,6 +52,8 @@ public class ShopServiceImpl implements ShopService {
private CommonService commonService;
@Resource
UserAuthMappingService userAuthMappingService;
@Autowired
private RegionDao regionDao;
@Override
@Transactional(rollbackFor = Exception.class)
@@ -96,7 +99,9 @@ public class ShopServiceImpl implements ShopService {
List<Long> shopIds = shopList.stream().map(ShopInfoDO::getId).collect(Collectors.toList());
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStageList(shopIds, ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage());
Map<Long, ShopStageInfoDO> stageMap = subStageList.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, Function.identity()));
return MiniShopPageVO.convertList(shopList,stageMap);
List<Long> regionIds = shopList.stream().map(ShopInfoDO::getRegionId).collect(Collectors.toList());
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(regionIds);
return MiniShopPageVO.convertList(shopList,stageMap,regionNameMap);
}
@Override