Przeglądaj źródła

查询全部分类bugfix

chao 4 lat temu
rodzic
commit
d00b3389d0

+ 7 - 4
src/main/resources/mapper/ProductTypeMapper.xml

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