package cn.pluss.platform.payAreaRyx.impl;

import cn.pluss.platform.entity.PayAreaRyx;
import cn.pluss.platform.mapper.PayAreaRyxMapper;
import cn.pluss.platform.payAreaRyx.PayAreaRyxService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author bzg
 * @since 2022-02-23
 */
@Service
public class PayAreaRyxServiceImpl extends ServiceImpl<PayAreaRyxMapper, PayAreaRyx> implements PayAreaRyxService {


    @Override
    public PayAreaRyx getByArea(String province, String city, String area) {
        QueryWrapper<PayAreaRyx> queryWrapper = new QueryWrapper<PayAreaRyx>()
                .eq("province",province).eq("city",city).eq("area",area).last(" limit 1 ");
        return baseMapper.selectOne(queryWrapper);
    }
}
