最初的我来三级菜单查询
package com.jt.service.Impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jt.mapper.ItemCatMapper;
import com.jt.pojo.ItemCat;
import com.jt.service.ItemCatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@Service
public class ItemCatServiceImpl implements ItemCatService {
@Autowired
ItemCatMapper mapper;
/**
* 1 查询3级商品分类信息
* 请求路径: /itemCat/findItemCatList
* 请求类型: get
* 请求参数: type
* @return
*/
@Transactional
public List<ItemCat> getItemCatList(){
//开始时间
long stati =System.currentTimeMillis();
//创建条件构造器
QueryWrapper wrapper = new QueryWrapper();
wrapper.eq("parent_id", 0);
//先查询一级目录
List<ItemCat> itemCat = mapper.selectList(wrapper