xiaoshushu il y a 4 ans
Parent
commit
76a4452b4e

+ 1 - 0
ruoyi-app/src/main/java/com/ruoyi/app/controller/shop/TbGoodsController.java

@@ -40,6 +40,7 @@ public class TbGoodsController extends BaseController {
     @GetMapping("/list")
     public TableDataInfo list(TbGoods tbGoods) {
         startPage();
+        tbGoods.setState(0);
         List<TbGoods> list = iTbGoodsService.selectTbGoodsList(tbGoods);
         return getDataTable(list);
     }

+ 1 - 0
ruoyi-system/src/main/resources/mapper/app/shop/TbGoodsMapper.xml

@@ -34,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="title != null  and title != ''">and g.title like concat('%', #{title},'%')</if>
             <if test="typeId != null ">and g.type_id = #{typeId}</if>
             <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''"> and g.create_time between #{beginTime} and #{endTime}</if>
+            <if test="state != null ">and g.state = #{state}</if>
         </where>
     </select>
 </mapper>