fix: 修改排序异常问题

dev
laixingyu 3 years ago
parent c8bc2231db
commit 43b405d9b1

@ -107,17 +107,17 @@
ds.sort30 as sort30,ds.sort30_change as sort30Change,ds.trend30_value as trend30Value,ds.trend30_value_change as trend30ValueChange ds.sort30 as sort30,ds.sort30_change as sort30Change,ds.trend30_value as trend30Value,ds.trend30_value_change as trend30ValueChange
from dong_cai_secondary_industry d from dong_cai_secondary_industry d
left join dong_cai_secondary_industry_statistics ds on (d.security_name = ds.security_name) left join dong_cai_secondary_industry_statistics ds on (d.security_name = ds.security_name)
where d.business_date = #{firstDate} and ds.business_date = #{firstDate} and ds.sort > 0 where d.business_date = #{firstDate} and ds.business_date = #{firstDate} and ds.sort10 > 0
<choose> <choose>
<when test="sortSort != null and sortSort.trim() != '' and sortChangeSort != null and sortChangeSort.trim() != ''"> <when test="sortSort != null and sortSort.trim() != '' and sortChangeSort != null and sortChangeSort.trim() != ''">
order by sort ${sortSort},sortChange ${sortChangeSort} order by (sort10+0) ${sortSort},(sort10Change+0) ${sortChangeSort}
</when> </when>
<otherwise> <otherwise>
<if test="sortSort != null and sortSort.trim() != '' "> <if test="sortSort != null and sortSort.trim() != '' ">
order by sort ${sortSort} order by (sort10+0) ${sortSort}
</if> </if>
<if test="sortChangeSort != null and sortChangeSort.trim() != ''"> <if test="sortChangeSort != null and sortChangeSort.trim() != ''">
order by sortChange ${sortChangeSort} order by (sort10Change+0) ${sortChangeSort}
</if> </if>
</otherwise> </otherwise>
</choose> </choose>

Loading…
Cancel
Save