@@ -6,14 +6,14 @@
bigTypeID as bigTypeId, typeSort, `name`, bigTypeCode, wwwValidFlag, crmValidFlag, wwwIcon, crmIcon, addTime, sortIndex
from bigtype
where
- <if test="typeSort == '1' or typeSort == '2'">
- typeSort = #{typeSort}
- </if>
<if test="source == 'www'.toString()">
- and wwwValidFlag = '1'
+ wwwValidFlag = '1'
</if>
<if test="source == 'crm'.toString()">
- and crmValidFlag = '1'
+ crmValidFlag = '1'
+ </if>
+ <if test="typeSort == '1' or typeSort == '2'">
+ and typeSort = #{typeSort}
order by ifnull(sortIndex,10000) , addTime DESC
</select>