小程序店铺信息获取相关
This commit is contained in:
@@ -1,11 +1,14 @@
|
|||||||
package com.czg.account.dto.shopinfo;
|
package com.czg.account.dto.shopinfo;
|
||||||
|
|
||||||
|
import com.czg.account.entity.ShopExtend;
|
||||||
import com.czg.account.entity.ShopInfo;
|
import com.czg.account.entity.ShopInfo;
|
||||||
import com.czg.account.entity.ShopTable;
|
import com.czg.account.entity.ShopTable;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Administrator
|
* @author Administrator
|
||||||
*/
|
*/
|
||||||
@@ -21,6 +24,7 @@ public class ShopInfoByCodeDTO {
|
|||||||
* 店铺信息
|
* 店铺信息
|
||||||
*/
|
*/
|
||||||
private ShopInfo shopInfo;
|
private ShopInfo shopInfo;
|
||||||
|
private Map<String, ShopExtend> shopExtendMap;
|
||||||
/**
|
/**
|
||||||
* 台桌信息
|
* 台桌信息
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -159,7 +159,9 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
|
|||||||
}
|
}
|
||||||
|
|
||||||
ShopUser shopUser = shopUserService.queryChain().eq(ShopUser::getShopId, shopInfo.getId()).eq(ShopUser::getUserId, StpKit.USER.getLoginIdAsLong()).one();
|
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<ShopExtend> shopExtends = shopExtendService.listInfo(shopInfo.getId(), null);
|
||||||
|
Map<String, ShopExtend> 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
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user