ZoneServiceImpl.java 795 Bytes
package com.huaheng.pc.config.zone.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huaheng.pc.config.zone.domain.Zone;
import com.huaheng.pc.config.zone.mapper.ZoneMapper;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("zone")
public class ZoneServiceImpl extends ServiceImpl<ZoneMapper, Zone> implements ZoneService {

    @Override
    public List<Map<String, Object>> getZoneCodeList() {
        LambdaQueryWrapper<Zone> lambda = Wrappers.lambdaQuery();
        lambda.select(Zone::getId, Zone::getCode, Zone::getName);
        return this.listMaps(lambda);
    }
}