Ver código fonte

查询全部分类bugfix

chao 4 anos atrás
pai
commit
1cc60b9524
1 arquivos alterados com 8 adições e 5 exclusões
  1. 8 5
      src/main/resources/mapper/ProductTypeMapper.xml

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

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