5 年之前
父节点
当前提交
4de8a0bfb2
共有 1 个文件被更改,包括 4 次插入1 次删除
  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">
             <if test="tagId != null">
                 and tag_id = #{tagId}
                 and tag_id = #{tagId}
             </if>
             </if>
+            <if test="tagId == null">
+                and tag_id &lt;&gt; -1 and tag_id &lt;&gt; -2
+            </if>
         </where>
         </where>
         order by id desc
         order by id desc
     </select>
     </select>
@@ -197,7 +200,7 @@
                 and g.tag_id = #{tagId}
                 and g.tag_id = #{tagId}
             </if>
             </if>
             <if test="tagId == null">
             <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>
             </if>
         </where>
         </where>
         order by g.indate desc
         order by g.indate desc