Commit 3c18fc55 authored by lcl's avatar lcl

u

parent 0b356134
......@@ -123,13 +123,16 @@
</select>
<select id="selectCreditLevelGroup" resultType="java.util.Map">
select
ct.credit_level creditLevel, count(ct.credit_level) customerCount
from customer ct
join customer_user ctu on ct.customer_id = ctu.customer_id
where ctu.user_id = #{userId}
group by ct.credit_level
order by ct.credit_level desc
select ct.* from (
select
ct.credit_level creditLevel, count(ct.customer_id) customerCount
from customer ct
join customer_user ctu on ct.customer_id = ctu.customer_id
where ctu.user_id = #{userId} and ct.credit_level is not null
group by ct.credit_level
) ct
left join sys_dict_data sdd on (sdd.dict_label = ct.creditLevel and sdd.dict_type = 'credit_level_type')
order by sdd.dict_sort asc
</select>
</mapper>
......
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