| | |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.utils.bean.BeanUtils; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.other.api.domain.Goods; |
| | | import com.ruoyi.other.api.domain.GoodsArea; |
| | | import com.ruoyi.other.api.domain.GoodsVip; |
| | | import com.ruoyi.other.api.domain.VipSetting; |
| | | import com.ruoyi.other.api.domain.*; |
| | | import com.ruoyi.other.enums.GoodsStatus; |
| | | import com.ruoyi.other.mapper.GoodsAreaMapper; |
| | | import com.ruoyi.other.mapper.GoodsMapper; |
| | | import com.ruoyi.other.mapper.GoodsShopMapper; |
| | | import com.ruoyi.other.mapper.ShopMapper; |
| | | import com.ruoyi.other.service.GoodsService; |
| | | import com.ruoyi.other.service.GoodsVipService; |
| | | import com.ruoyi.other.service.VipSettingService; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | private GoodsVipService goodsVipService; |
| | | @Resource |
| | | private AppUserClient appUserClient; |
| | | @Resource |
| | | private GoodsShopMapper goodsShopMapper; |
| | | @Resource |
| | | private ShopMapper shopMapper; |
| | | |
| | | @Override |
| | | public List<GoodsVO> goodsList(Goods search) { |
| | |
| | | } |
| | | |
| | | Goods goods = this.getById(goodsId); |
| | | |
| | | List<GoodsShop> goodsShopList = goodsShopMapper.selectList(new LambdaQueryWrapper<GoodsShop>() |
| | | .eq(GoodsShop::getGoodsId, goodsId)); |
| | | List<Integer> shopIds = goodsShopList.stream().map(GoodsShop::getShopId).collect(Collectors.toList()); |
| | | List<Shop> shopList = shopMapper.selectList(new LambdaQueryWrapper<Shop>() |
| | | .in(Shop::getId, shopIds)); |
| | | GoodsVO goodsVO = new GoodsVO(); |
| | | goodsVO.setShopList(shopList); |
| | | BeanUtils.copyBeanProp(goodsVO, goods); |
| | | goodsVO.setGoodsId(goods.getId()); |
| | | goodsVO.setGoodsName(goods.getName()); |