小区唯一查询
This commit is contained in:
+2
@@ -466,6 +466,8 @@ public interface DistrictService extends ModeService<DistrictKey, DistrictBo> {
|
||||
*/
|
||||
public List<District> findByKey(String city, String region, String name, String cat);
|
||||
|
||||
public List<District> findAllByNameAndCat(String city, String region, String name, String cat);
|
||||
|
||||
/**
|
||||
* 查找周边最相似的楼盘
|
||||
*
|
||||
|
||||
+14
@@ -2191,6 +2191,20 @@ public class DistrictServiceImpl implements DistrictService {
|
||||
return districtDao.findAllByParams(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<District> findAllByNameAndCat(String city, String region, String name, String cat) {
|
||||
List<QueryParam> params = new ArrayList<QueryParam>(5);
|
||||
params.add(new QueryParam("city", city));
|
||||
if (StringUtils.isNotBlank(region)) {
|
||||
params.add(new QueryParam("region", region));
|
||||
}
|
||||
if (StringUtils.isNotBlank(name)) {
|
||||
params.add(new QueryParam("name", name));
|
||||
}
|
||||
params.add(new QueryParam("category", cat));
|
||||
return districtDao.findAllByParams(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public District findOneByKey(DistrictKey districtKey, String cat) {
|
||||
List<District> districts = findByKey(districtKey.getCity(), districtKey.getRegion(), districtKey.getName(),
|
||||
|
||||
Reference in New Issue
Block a user