package com.ruoyi.xq.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.xq.domain.AreaCode;
import com.ruoyi.xq.dto.app.areacode.AreaCodeQuery;
import com.ruoyi.xq.mapper.AreaCodeMapper;
import com.ruoyi.xq.service.AreaCodeService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 行政区划Service业务层处理
 *
 * @author 77
 * @date 2024-03-19
 */
@Service
public class AreaCodeServiceImpl extends ServiceImpl<AreaCodeMapper,AreaCode> implements AreaCodeService {

    @Override
    public List<AreaCode> listAreaCode(AreaCodeQuery query) {
        List<AreaCode> list = this.list(Wrappers.lambdaQuery(AreaCode.class)
                .eq(AreaCode::getPcode, query.getPcode()));
        return list;
    }
}
