|
@@ -5,6 +5,7 @@ import com.huimv.manager.mapper.BaseFarmInfoDao;
|
|
|
import com.huimv.manager.service.BaseFarmInfoService;
|
|
|
import com.huimv.manager.utils.PageUtils;
|
|
|
import com.huimv.manager.utils.Query;
|
|
|
+import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.List;
|
|
@@ -24,6 +25,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
@Service("baseFarmInfoService")
|
|
|
public class BaseFarmInfoServiceImpl extends ServiceImpl<BaseFarmInfoDao, BaseFarmInfoEntity> implements BaseFarmInfoService {
|
|
|
|
|
|
+
|
|
|
@Override
|
|
|
public PageUtils queryPage(Map<String, Object> params) {
|
|
|
IPage<BaseFarmInfoEntity> page = this.page(
|
|
@@ -38,8 +40,11 @@ public class BaseFarmInfoServiceImpl extends ServiceImpl<BaseFarmInfoDao, BaseFa
|
|
|
public List findByCityCode(Map<String, Object> params) {
|
|
|
|
|
|
String countyCode = (String)params.get("countyCode");
|
|
|
+ if ("330000".equals(countyCode)){
|
|
|
+ countyCode = null;
|
|
|
+ }
|
|
|
QueryWrapper<BaseFarmInfoEntity> wrapper = new QueryWrapper<>();
|
|
|
- wrapper.eq("county",countyCode).or().eq("city",countyCode);
|
|
|
+ wrapper.eq(StringUtils.isNotBlank(countyCode),"county",countyCode).or().eq(StringUtils.isNotBlank(countyCode),"city",countyCode);
|
|
|
return baseMapper.selectList(wrapper);
|
|
|
}
|
|
|
}
|