Authored by zhaojun2

add sql

@@ -13,4 +13,6 @@ public interface BrandSeriesMapper { @@ -13,4 +13,6 @@ public interface BrandSeriesMapper {
13 List<BrandSeries> selectAll(); 13 List<BrandSeries> selectAll();
14 14
15 int updateByPrimaryKey(BrandSeries record); 15 int updateByPrimaryKey(BrandSeries record);
  16 +
  17 + List<BrandSeries> selectByIds(List<Integer> ids);
16 } 18 }
@@ -15,4 +15,6 @@ public interface GoodsMapper { @@ -15,4 +15,6 @@ public interface GoodsMapper {
15 int updateByPrimaryKey(Goods record); 15 int updateByPrimaryKey(Goods record);
16 16
17 List<Goods> selectByProductId(Integer productId); 17 List<Goods> selectByProductId(Integer productId);
  18 +
  19 + List<Goods> selectByProductIds(List<Integer> productIds);
18 } 20 }
@@ -13,4 +13,6 @@ public interface ProductMapper { @@ -13,4 +13,6 @@ public interface ProductMapper {
13 List<Product> selectAll(); 13 List<Product> selectAll();
14 14
15 int updateByPrimaryKey(Product record); 15 int updateByPrimaryKey(Product record);
  16 +
  17 + List<Product> selectByIds(List<Integer> ids);
16 } 18 }
@@ -41,4 +41,13 @@ @@ -41,4 +41,13 @@
41 select id, series_name, series_search, status, create_time, update_time, brand_id 41 select id, series_name, series_search, status, create_time, update_time, brand_id
42 from brand_series 42 from brand_series
43 </select> 43 </select>
  44 + <select id="selectByIds" resultMap="BaseResultMap">
  45 + select id, series_name
  46 + from brand_series
  47 + where status = 1 and id IN
  48 + <foreach item="item" index="index" collection="list"
  49 + open="(" separator="," close=")">
  50 + #{item}
  51 + </foreach>
  52 + </select>
44 </mapper> 53 </mapper>
@@ -45,4 +45,12 @@ @@ -45,4 +45,12 @@
45 select id, product_id, color_name, goods_name 45 select id, product_id, color_name, goods_name
46 from goods where product_id = #{productId,jdbcType=INTEGER} 46 from goods where product_id = #{productId,jdbcType=INTEGER}
47 </select> 47 </select>
  48 + <select id="selectByProductIds" resultType="com.yohoufo.dal.product.model.Goods">
  49 + select id, product_id, color_image
  50 + from goods where product_id IN
  51 + <foreach item="item" index="index" collection="list"
  52 + open="(" separator="," close=")">
  53 + #{item}
  54 + </foreach>
  55 + </select>
48 </mapper> 56 </mapper>
@@ -77,4 +77,11 @@ @@ -77,4 +77,11 @@
77 storage, key_words, del_status 77 storage, key_words, del_status
78 from product 78 from product
79 </select> 79 </select>
  80 + <select id="selectByIds" resultMap="BaseResultMap">
  81 + select id, series_id from product where id in
  82 + <foreach item="item" index="index" collection="list"
  83 + open="(" separator="," close=")">
  84 + #{item}
  85 + </foreach>
  86 + </select>
80 </mapper> 87 </mapper>