| | |
| | | package com.hrt.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.hrt.system.domain.poji.activity.ActivityGoods; |
| | | import com.hrt.system.domain.poji.shop.ShopGoods; |
| | | import com.hrt.system.mapper.shop.ShopGoodsMapper; |
| | | import com.hrt.system.service.shop.ShopGoodsService; |
| | |
| | | @Service |
| | | public class ShopGoodsServiceImpl extends ServiceImpl<ShopGoodsMapper, ShopGoods> implements ShopGoodsService { |
| | | |
| | | /** |
| | | * 通过商户id和商品id获取 |
| | | * @param shopId |
| | | * @param goodsId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ShopGoods getByShopIdAndGoodsId(Long shopId,String goodsId){ |
| | | LambdaQueryWrapper<ShopGoods> queryWrapper = Wrappers.lambdaQuery(); |
| | | queryWrapper.eq(ShopGoods::getDelFlag, 0).eq(ShopGoods::getShopId, shopId).eq(ShopGoods::getGoodsId, goodsId); |
| | | ShopGoods shopGoods = this.getOne(queryWrapper); |
| | | return shopGoods; |
| | | } |
| | | } |