Commit f86e146b authored by shiyu's avatar shiyu

统计佣金

parent 7f633c01
......@@ -639,10 +639,10 @@
</select>
<select id="countSelledNum" parameterType="java.lang.Long" resultType="java.lang.Long">
select sum(item_num) as selledNum from distribution_order where item_id = #{itemId} and state not in (1, 101)
select IFNULL(sum(item_num), 0) as selledNum from distribution_order where item_id = #{itemId} and state not in (1, 101)
</select>
<select id="sumAmountByIntroducer" parameterType="java.lang.Long" resultType="java.lang.Long">
select sum(amount) as amount from distribution_order where share_record_id = #{introducerId} and seller_id =#{sellerId} and state not in (1, 101)
select IFNULL(sum(amount), 0) as amount from distribution_order where share_record_id = #{introducerId} and seller_id =#{sellerId} and state not in (1, 101)
</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