package com.qs.mp.common.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.qs.mp.common.domain.Area;
import com.qs.mp.common.mapper.AreaMapper;
import com.qs.mp.common.service.IAreaService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author quanshu
 * @since 2022-03-02
 */
@Service
public class AreaServiceImpl extends ServiceImpl<AreaMapper, Area> implements IAreaService {
  @Override
  public List<Area> listByPid(Long pid) {
    return getBaseMapper().selectList(new LambdaQueryWrapper<Area>().eq(Area::getParentId, pid));
  }
}
