package com.template.services.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.template.model.pojo.SmartCoord;
import com.template.mapper.SmartCoordMapper;
import com.template.services.SmartCoordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ceshi
 * @since 2024-06-21
 */
@Service
public class SmartCoordServiceImpl extends ServiceImpl<SmartCoordMapper, SmartCoord> implements SmartCoordService {

    @Override
    public SmartCoord getBytype(String location) {
        LambdaQueryWrapper<SmartCoord> wrapper=new LambdaQueryWrapper<>();
        wrapper.eq(SmartCoord::getAddress,location);
        SmartCoord smartCoord = this.getOne(wrapper);
        return smartCoord;
    }
}
