Browse Source

查询全部分类2

chao 4 years ago
parent
commit
b8be09efb0
1 changed files with 5 additions and 5 deletions
  1. 5 5
      src/main/resources/mapper/ProductTypeMapper.xml

+ 5 - 5
src/main/resources/mapper/ProductTypeMapper.xml

@@ -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}
             </if>
         order by ifnull(sortIndex,10000) , addTime DESC
     </select>