Authored by chenchao

group by attributes

@@ -19,10 +19,11 @@ @@ -19,10 +19,11 @@
19 <result column="batch_no" jdbcType="BIGINT" property="batchNo" /> 19 <result column="batch_no" jdbcType="BIGINT" property="batchNo" />
20 <result column="storage_num" jdbcType="INTEGER" property="storageNum" /> 20 <result column="storage_num" jdbcType="INTEGER" property="storageNum" />
21 <result column="size_num" jdbcType="INTEGER" property="sizeNum" /> 21 <result column="size_num" jdbcType="INTEGER" property="sizeNum" />
  22 + <result column="attributes" jdbcType="INTEGER" property="attributes" />
22 </resultMap> 23 </resultMap>
23 <sql id="Base_Column_List"> 24 <sql id="Base_Column_List">
24 id, uid, product_id, product_name, storage_id, depot_no, size_id, size_name, 25 id, uid, product_id, product_name, storage_id, depot_no, size_id, size_name,
25 - color_id, color_name, goods_price, status, image_url, is_del, batch_no 26 + color_id, color_name, goods_price, status, image_url, is_del, batch_no,attributes
26 </sql> 27 </sql>
27 28
28 <select id="selectEntryCntByUidStatusGBSkc" resultType="java.lang.Integer"> 29 <select id="selectEntryCntByUidStatusGBSkc" resultType="java.lang.Integer">
@@ -40,7 +41,8 @@ @@ -40,7 +41,8 @@
40 41
41 <sql id="Base_Column_List_with_table_name"> 42 <sql id="Base_Column_List_with_table_name">
42 sog.id as id, sog.uid as uid, product_id, product_name,storage_id,depot_no,size_id,size_name, 43 sog.id as id, sog.uid as uid, product_id, product_name,storage_id,depot_no,size_id,size_name,
43 - color_id, color_name, goods_price, sog.status as status, image_url, sog.is_del as is_del, batch_no 44 + color_id, color_name, goods_price, sog.status as status, image_url, sog.is_del as is_del, batch_no,
  45 + sog.attributes as attributes
44 </sql> 46 </sql>
45 47
46 <select id="selectEntryListByUidStatusGBSkc" resultMap="BaseResultMap"> 48 <select id="selectEntryListByUidStatusGBSkc" resultMap="BaseResultMap">
@@ -105,7 +107,7 @@ @@ -105,7 +107,7 @@
105 FROM seller_order_goods sog,seller_order so WHERE sog.id = so.skup 107 FROM seller_order_goods sog,seller_order so WHERE sog.id = so.skup
106 AND sog.uid = #{condition.uid,jdbcType=INTEGER} AND so.payment = 11 108 AND sog.uid = #{condition.uid,jdbcType=INTEGER} AND so.payment = 11
107 AND sog.status = #{condition.status, jdbcType=TINYINT} AND product_id = #{condition.productId,jdbcType=INTEGER} 109 AND sog.status = #{condition.status, jdbcType=TINYINT} AND product_id = #{condition.productId,jdbcType=INTEGER}
108 - GROUP BY size_id,`goods_price` 110 + GROUP BY sog.attributes,size_id,`goods_price`
109 order by size_id,goods_price 111 order by size_id,goods_price
110 limit #{offset, jdbcType=INTEGER}, #{limit, jdbcType=INTEGER} 112 limit #{offset, jdbcType=INTEGER}, #{limit, jdbcType=INTEGER}
111 </select> 113 </select>
@@ -117,7 +119,7 @@ @@ -117,7 +119,7 @@
117 FROM seller_order_goods sog,seller_order so WHERE sog.id = so.skup 119 FROM seller_order_goods sog,seller_order so WHERE sog.id = so.skup
118 AND sog.uid = #{uid,jdbcType=INTEGER} AND so.payment = 11 120 AND sog.uid = #{uid,jdbcType=INTEGER} AND so.payment = 11
119 AND sog.status = #{status, jdbcType=TINYINT} AND product_id = #{productId,jdbcType=INTEGER} 121 AND sog.status = #{status, jdbcType=TINYINT} AND product_id = #{productId,jdbcType=INTEGER}
120 - GROUP BY size_id,`goods_price` 122 + GROUP BY sog.attributes,size_id,`goods_price`
121 ) t 123 ) t
122 </select> 124 </select>
123 125