5 năm trước cách đây
mục cha
commit
4de8a0bfb2
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      pcbms/src/main/resources/mapper/GoodsMapper.xml

+ 4 - 1
pcbms/src/main/resources/mapper/GoodsMapper.xml

@@ -122,6 +122,9 @@
             <if test="tagId != null">
                 and tag_id = #{tagId}
             </if>
+            <if test="tagId == null">
+                and tag_id &lt;&gt; -1 and tag_id &lt;&gt; -2
+            </if>
         </where>
         order by id desc
     </select>
@@ -197,7 +200,7 @@
                 and g.tag_id = #{tagId}
             </if>
             <if test="tagId == null">
-                and g.tag_id !=-1 and g.tag_id !=-2
+                and g.tag_id &lt;&gt; -1 and g.tag_id &lt;&gt; -2
             </if>
         </where>
         order by g.indate desc