@@ -6,14 +6,17 @@
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="typeSort == '0'">
+ typeSort in (1,2)
<if test="source == 'www'.toString()">
- wwwValidFlag = '1'
+ and wwwValidFlag = '1'
</if>
<if test="source == 'crm'.toString()">
- crmValidFlag = '1'
- </if>
- <if test="typeSort == '1' or typeSort == '2'">
- and typeSort = #{typeSort}
+ and crmValidFlag = '1'
order by ifnull(sortIndex,10000) , addTime DESC
</select>