diff --git a/cash-common/cash-common-service/src/main/java/com/czg/account/dto/shopinfo/ShopInfoByCodeDTO.java b/cash-common/cash-common-service/src/main/java/com/czg/account/dto/shopinfo/ShopInfoByCodeDTO.java index 77c99dfa..6fdc728b 100644 --- a/cash-common/cash-common-service/src/main/java/com/czg/account/dto/shopinfo/ShopInfoByCodeDTO.java +++ b/cash-common/cash-common-service/src/main/java/com/czg/account/dto/shopinfo/ShopInfoByCodeDTO.java @@ -1,11 +1,14 @@ package com.czg.account.dto.shopinfo; +import com.czg.account.entity.ShopExtend; import com.czg.account.entity.ShopInfo; import com.czg.account.entity.ShopTable; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; +import java.util.Map; + /** * @author Administrator */ @@ -21,6 +24,7 @@ public class ShopInfoByCodeDTO { * 店铺信息 */ private ShopInfo shopInfo; + private Map shopExtendMap; /** * 台桌信息 */ diff --git a/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/ShopInfoServiceImpl.java b/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/ShopInfoServiceImpl.java index 08e19912..099172b9 100644 --- a/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/ShopInfoServiceImpl.java +++ b/cash-service/account-service/src/main/java/com/czg/service/account/service/impl/ShopInfoServiceImpl.java @@ -159,7 +159,9 @@ public class ShopInfoServiceImpl extends ServiceImpl i } ShopUser shopUser = shopUserService.queryChain().eq(ShopUser::getShopId, shopInfo.getId()).eq(ShopUser::getUserId, StpKit.USER.getLoginIdAsLong()).one(); - return new ShopInfoByCodeDTO(distance, shopInfo, shopTable, shopUser != null && shopUser.getIsVip() != null && shopUser.getIsVip() == 1); + List shopExtends = shopExtendService.listInfo(shopInfo.getId(), null); + Map shopExtendMap = shopExtends.stream().collect(Collectors.toMap(ShopExtend::getAutoKey, i -> i)); + return new ShopInfoByCodeDTO(distance, shopInfo, shopExtendMap, shopTable, shopUser != null && shopUser.getIsVip() != null && shopUser.getIsVip() == 1); } @Override