Parcourir la source

移除mapper无用的sql语句和方法

lhd il y a 1 an
Parent
commit
2275a25da7

+ 0 - 32
yami-shop-service/src/main/java/com/yami/shop/dao/ProductMapper.java

@@ -34,14 +34,6 @@ public interface ProductMapper extends BaseMapper<Product> {
      */
     int updateStocks(@Param("prod") Product product);
 
-    /**
-     * 根据商品名称和店铺id获取商品信息
-     * @param prodName
-     * @param shopId
-     * @return
-     */
-    Product getProductByProdNameAndShopId(@Param("prodName") String prodName, @Param("shopId") Long shopId);
-
     /**
      * 返回库存
      * @param prodCollect
@@ -88,36 +80,12 @@ public interface ProductMapper extends BaseMapper<Product> {
      */
     IPage<SearchProdDto> getSearchProdDtoPageByProdName(Page page, @Param("prodName") String prodName, @Param("sort") Integer sort, @Param("orderBy") Integer orderBy);
 
-    /**
-     * 根据标签id获取商品
-     * @param tagId
-     * @return
-     */
-    TagProductDto tagProdList(@Param("tagId") Long tagId);
-
     /**
      * 获取分组商品列表
      * @return
      */
     List<TagProductDto> tagProdList();
 
-    /**
-     * 查看店铺的所有活动商品
-     * @param shopId
-     * @param page
-     * @return
-     */
-    IPage<ProductDto> listByShopId(@Param("page") PageParam<ProductDto> page, @Param("shopId") Long shopId);
-
-    /**
-     * 通过优惠券适用商品类型、优惠券id、店铺id获取商品列表
-     * @param shopId
-     * @param page
-     * @param couponId
-     * @param suitableProdType
-     * @return
-     */
-    IPage<ProductDto> listBySuitableProdTypeAndCouponIdAndShopId(@Param("page") PageParam<ProductDto> page, @Param("shopId") Long shopId, @Param("suitableProdType") Integer suitableProdType, @Param("couponId") Long couponId);
 
     /**
      * 获取用户的收藏商品列表

+ 0 - 6
yami-shop-service/src/main/java/com/yami/shop/dao/UserMapper.java

@@ -18,12 +18,6 @@ import org.apache.ibatis.annotations.Param;
  * @author lanhai
  */
 public interface UserMapper extends BaseMapper<User> {
-	/**
-	 * 根据用户邮箱获取用户信息
-	 * @param userMail
-	 * @return
-	 */
-	User getUserByUserMail(@Param("userMail") String userMail);
 
 	/**
 	 * 根据用户名称获取一个用户信息

+ 0 - 35
yami-shop-service/src/main/resources/mapper/ProductMapper.xml

@@ -80,9 +80,6 @@
         </if>
     </select>
 
-    <select id="getProductByProdNameAndShopId" resultType="com.yami.shop.bean.model.Product">
-	   select * from tz_prod where prod_name = #{prodName} and shop_id = #{shopId}
-	</select>
 
     <update id="returnStock">
         <foreach collection="prodCollect" item="changeStocks" index="prodId" separator=";">
@@ -180,38 +177,6 @@
 
     </select>
 
-    <select id="listByShopId" resultType="com.yami.shop.bean.app.dto.ProductDto">
-        SELECT
-        <include refid="prodAndShopNameWithNoContent_SQL"/>
-        FROM tz_prod p
-        LEFT JOIN tz_shop_detail sd
-        ON p.shop_id = sd.shop_id
-        WHERE p.`status` = 1 AND p.`shop_id` = #{shopId}
-        ORDER BY p.`sold_num` DESC, p.`update_time` DESC
-    </select>
-    <select id="listBySuitableProdTypeAndCouponIdAndShopId" resultType="com.yami.shop.bean.app.dto.ProductDto">
-        SELECT
-        <include refid="prodAndShopNameWithNoContent_SQL"/>
-        FROM
-        tz_prod p
-        LEFT JOIN tz_shop_detail sd
-        ON p.shop_id = sd.shop_id
-        WHERE p.`status` = 1
-        AND p.shop_id = #{shopId}
-        AND p.`prod_id`
-        <if test="suitableProdType == 1">
-            IN
-        </if>
-        <if test="suitableProdType == 2">
-            NOT IN
-        </if>
-        (SELECT
-        cp.`prod_id`
-        FROM
-        tz_coupon_prod cp
-        WHERE cp.`coupon_id` = #{couponId})
-        ORDER BY p.`sold_num` DESC,p.`update_time` DESC
-    </select>
 
     <select id="collectionProds" resultType="com.yami.shop.bean.app.dto.ProductDto">
         SELECT

+ 0 - 6
yami-shop-service/src/main/resources/mapper/UserMapper.xml

@@ -23,12 +23,6 @@
     <result column="pic" jdbcType="VARCHAR" property="pic" />
     <result column="status" jdbcType="INTEGER" property="status" />
   </resultMap>
-
-  <select id="getUserByUserMail" resultType="com.yami.shop.bean.model.User">
-    select *
-    from tz_user u
-    where u.user_mail = #{userMail}
-  </select>
   <select id="selectOneByUserName" resultType="com.yami.shop.bean.model.User">
     select * from `tz_user` where binary nick_name = #{userName} limit 1
   </select>