Commit 88f67ee3 authored by shiyu's avatar shiyu

用户主页商品列表2

parent 1460ccb6
......@@ -352,13 +352,13 @@
</select>
<select id="findMaxPriceRecord" parameterType="java.lang.Long" resultMap="BaseResultMap">
SELECT o.*
FROM distributor_share_record o
SELECT d.*
FROM distributor_share_record d
JOIN
(SELECT item_id, MAX(price) as max_amount
FROM distributor_share_record
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>
</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