瀏覽代碼

http://192.168.0.21/index.php?m=bug&f=view&bugID=25922
删除商品分类

lyhzzz 3 年之前
父節點
當前提交
68b0d1cccc

+ 0 - 8
platform-shop/src/main/java/com/platform/controller/CategoryController.java

@@ -90,15 +90,7 @@ public class CategoryController {
      */
     @RequestMapping("/queryAll")
     public Result queryAll(@RequestBody Map<String, Object> params) {
-
         List<CategoryEntity> list = categoryService.queryList(params);
-        //添加顶级菜单
-//        CategoryEntity root = new CategoryEntity();
-//        root.setId(0);
-//        root.setName("一级分类");
-//        root.setParentId(-1);
-//        root.setOpen(true);
-//        list.add(0,root);
         return Result.success(list);
     }
 

+ 3 - 0
platform-shop/src/main/resources/com/platform/dao/CategoryDao.xml

@@ -91,6 +91,9 @@
 		<if test="parentId != null and parentId != ''">
 			AND `parent_id` = #{parentId}
 		</if>
+		<if test="show != null and show != ''">
+			AND `is_show` = #{show}
+		</if>
         <choose>
             <when test="sidx != null and sidx.trim() != ''">
                 order by ${sidx} ${order}