Commit 3b48016a authored by lcl's avatar lcl

u

parent 8a089c53
......@@ -392,13 +392,16 @@
select
bi.amount_source,count(bi.id) businessCount, ROUND(sum(bi.investment_amount), 4) totalAmount
<include refid="businessSearchSql"/>
and bi.amount_source is not null
group by bi.amount_source
having businessCount > 0
</select>
<select id="selectTypeAnalyze" resultType="com.dsk.system.domain.business.vo.BusinessAnalyzeVo">
select
bi.project_type,count(bi.id) businessCount, ROUND(sum(bi.investment_amount), 4) totalAmount
<include refid="businessSearchSql"/>
and bi.project_type is not null
group by bi.project_type
<if test="status != null and status == 0 "> order by businessCount desc </if>
<if test="status != null and status == 2 "> order by totalAmount desc </if>
......@@ -408,6 +411,7 @@
select
bi.project_category,count(bi.id) businessCount, ROUND(sum(bi.investment_amount), 4) totalAmount
<include refid="businessSearchSql"/>
and bi.project_category is not null
group by bi.project_category
<if test="status != null and status == 0 "> order by businessCount desc </if>
<if test="status != null and status == 2 "> order by totalAmount desc </if>
......
......@@ -118,6 +118,7 @@
left join business_info bi on (bi.customer_id = ct.customer_id and bi.status = 2)
where ctu.status = 0 and ctu.user_id = #{userId}
group by ct.customer_id
having businessCount > 0
order by totalAmount desc
limit 10
</select>
......
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