package com.stylefeng.guns.modular.system.service.impl; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import com.stylefeng.guns.modular.system.dao.SystemPriceCityMapper; import com.stylefeng.guns.modular.system.model.SystemPriceCity; import com.stylefeng.guns.modular.system.service.ISystemPriceCityService; import org.springframework.stereotype.Service; /** * @author zhibing.pu * @Date 2025/7/26 9:25 */ @Service public class SystemPriceCityServiceImpl extends ServiceImpl implements ISystemPriceCityService { /** * 查询匹配数据 * @param provinceCode * @param cityCode * @param districtCode * @return */ @Override public SystemPriceCity queryOne(String provinceCode, String cityCode, String districtCode) { SystemPriceCity systemPriceCity = this.selectOne(new EntityWrapper().eq("areaCode", provinceCode).eq("cityCode", cityCode).eq("provinceCode", districtCode)); if(null == systemPriceCity){ systemPriceCity = this.selectOne(new EntityWrapper().eq("areaCode", provinceCode).eq("cityCode", cityCode)); if(null == systemPriceCity){ systemPriceCity = this.selectOne(new EntityWrapper().eq("areaCode", provinceCode)); } } return systemPriceCity; }}