From aa2eae024f8f251c8e2b9eace5351dea7e315ed7 Mon Sep 17 00:00:00 2001
From: jiangqs <jiangqs>
Date: 星期一, 24 四月 2023 11:41:48 +0800
Subject: [PATCH] BUG

---
 hrt-modules/hrt-system/src/main/java/com/hrt/system/service/impl/ShopGoodsServiceImpl.java |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/hrt-modules/hrt-system/src/main/java/com/hrt/system/service/impl/ShopGoodsServiceImpl.java b/hrt-modules/hrt-system/src/main/java/com/hrt/system/service/impl/ShopGoodsServiceImpl.java
index daa654d..63f131f 100644
--- a/hrt-modules/hrt-system/src/main/java/com/hrt/system/service/impl/ShopGoodsServiceImpl.java
+++ b/hrt-modules/hrt-system/src/main/java/com/hrt/system/service/impl/ShopGoodsServiceImpl.java
@@ -1,5 +1,8 @@
 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;
@@ -17,4 +20,17 @@
 @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;
+    }
 }

--
Gitblit v1.7.1