Authored by LUOXC

Revert "Revert "添加商品排序""

This reverts commit 93e1df55.
... ... @@ -56,7 +56,7 @@
</select>
<sql id="Base_Column_List_with_table_name">
sog.id as id, sog.uid as uid, product_id, product_name,storage_id,depot_no,size_id,size_name,
sog.id as id, sog.uid as uid, product_id, product_name,storage_id,depot_no,sog.size_id,sog.size_name,
color_id, color_name, goods_price, sog.status as status, image_url, sog.is_del as is_del, batch_no,
sog.attributes as attributes, sog.region as region
</sql>
... ... @@ -143,17 +143,19 @@
</select>
<select id="selectEntryListByUidStatusGBSku" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List_with_table_name" />,COUNT(`size_id`) storage_num
FROM seller_order_goods sog,seller_order so WHERE sog.id = so.skup
AND sog.uid = #{condition.uid,jdbcType=INTEGER}
SELECT <include refid="Base_Column_List_with_table_name" />,COUNT(sog.size_id) storage_num
FROM seller_order_goods sog
join seller_order so on sog.id = so.skup
left join product_size ps on sog.size_id = ps.size_id
WHERE sog.uid = #{condition.uid,jdbcType=INTEGER}
<if test="isEntry">
AND so.payment = 11
</if>
<include refid="sql_where_skupTyps_scope" />
AND sog.status = #{condition.status, jdbcType=TINYINT}
AND product_id = #{condition.productId,jdbcType=INTEGER}
GROUP BY sog.attributes,size_id,`goods_price`
order by size_id,goods_price
GROUP BY sog.attributes,sog.size_id,`goods_price`
order by ps.order_by,sog.size_id,goods_price
limit #{offset, jdbcType=INTEGER}, #{limit, jdbcType=INTEGER}
</select>
... ...