浏览代码

增加图片查询判断条件

xusonglin 5 年之前
父节点
当前提交
3b5bedb711
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/main/resources/mapper/PhotoMapper.xml

+ 2 - 0
src/main/resources/mapper/PhotoMapper.xml

@@ -59,6 +59,7 @@
             photo
         where
             type = 2
+            and activated = 1
         order by create_time desc
         limit 1
     </select>
@@ -70,6 +71,7 @@
             photo
         where
             type = 1
+            and activated = 1
         order by create_time desc
     </select>
 </mapper>