Commit 88f67ee3 authored by shiyu's avatar shiyu

用户主页商品列表2

parent 1460ccb6
...@@ -352,13 +352,13 @@ ...@@ -352,13 +352,13 @@
</select> </select>
<select id="findMaxPriceRecord" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="findMaxPriceRecord" parameterType="java.lang.Long" resultMap="BaseResultMap">
SELECT o.* SELECT d.*
FROM distributor_share_record o FROM distributor_share_record d
JOIN JOIN
(SELECT item_id, MAX(price) as max_amount (SELECT item_id, MAX(price) as max_amount
FROM distributor_share_record FROM distributor_share_record
GROUP BY item_id) t GROUP BY item_id) t
ON o.item_id = t.item_id AND price = t.max_amount; ON d.item_id = t.item_id AND price = t.max_amount where d.distributor_id = #{distributorId} AND d.enabled =1;
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment