新增小区图片接口
This commit is contained in:
+29
@@ -12,6 +12,7 @@ import com.fangjia.dal.mongo.model.*;
|
|||||||
import com.fangjia.open.dto.addressGovernance.MatchedBuildingDto;
|
import com.fangjia.open.dto.addressGovernance.MatchedBuildingDto;
|
||||||
import com.fangjia.open.model.AvgPriceQueryModel;
|
import com.fangjia.open.model.AvgPriceQueryModel;
|
||||||
import com.fangjia.open.model.BasicModel;
|
import com.fangjia.open.model.BasicModel;
|
||||||
|
import com.fangjia.open.model.weixin.DistrictModel;
|
||||||
import com.fangjia.open.util.CommonDtoUtils;
|
import com.fangjia.open.util.CommonDtoUtils;
|
||||||
import com.fangjia.service.datastore.RegionStatService;
|
import com.fangjia.service.datastore.RegionStatService;
|
||||||
import com.fangjia.service.district.DistrictFacilitysService;
|
import com.fangjia.service.district.DistrictFacilitysService;
|
||||||
@@ -20,6 +21,7 @@ import com.fangjia.service.district.RegionStatRentService;
|
|||||||
import com.fangjia.service.mongo.fangjia.AverageAnalyService;
|
import com.fangjia.service.mongo.fangjia.AverageAnalyService;
|
||||||
import com.fangjia.service.mongo.fangjia.RegionBlockService;
|
import com.fangjia.service.mongo.fangjia.RegionBlockService;
|
||||||
|
|
||||||
|
import com.fangjia.service.mongo.fangjia.SeaweedImagesService;
|
||||||
import net.sf.json.JSONArray;
|
import net.sf.json.JSONArray;
|
||||||
import net.sf.json.JSONException;
|
import net.sf.json.JSONException;
|
||||||
import net.sf.json.JSONObject;
|
import net.sf.json.JSONObject;
|
||||||
@@ -95,6 +97,7 @@ public class DistrictController {
|
|||||||
private RegionStatService regionStatService;
|
private RegionStatService regionStatService;
|
||||||
private RegionStatRentService regionStatRentService;
|
private RegionStatRentService regionStatRentService;
|
||||||
private DistrictFacilitysService districtFacilitysService;
|
private DistrictFacilitysService districtFacilitysService;
|
||||||
|
private SeaweedImagesService seaweedImagesService;
|
||||||
|
|
||||||
|
|
||||||
public static final String[] COLUMNS = { "id", "name", "estateType", "buildType", "licence", "buildArea", "allArea",
|
public static final String[] COLUMNS = { "id", "name", "estateType", "buildType", "licence", "buildArea", "allArea",
|
||||||
@@ -1168,6 +1171,28 @@ public class DistrictController {
|
|||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取小区图片
|
||||||
|
*
|
||||||
|
* @param districtModel
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Object listPicAction(DistrictModel districtModel) {
|
||||||
|
RestfulModelAndView mav = new RestfulModelAndView();
|
||||||
|
mav.setViewType("rest");
|
||||||
|
if (StringUtils.isBlank(districtModel.getId())) {
|
||||||
|
mav.setModel(new HttpCode(OpenHttpCodeEnum.ARGUMENT_LOSE, "ID必须输入"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
SeaweedImages seaweedImages = seaweedImagesService.findById(districtModel.getId());
|
||||||
|
if (seaweedImages != null) {
|
||||||
|
mav.setModel(BasicModel.buildOKModel().setResult(seaweedImages.getOutPics()));
|
||||||
|
} else {
|
||||||
|
mav.setModel(new HttpCode(OpenHttpCodeEnum.TARGET_DATA_NOT_EXIST, "图片数据不存在"));
|
||||||
|
}
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public Object addrFacilitysAction(DistrictSearchModel model, @Param(name = "city") String city, @Param(name = "address") String address) throws Exception{
|
public Object addrFacilitysAction(DistrictSearchModel model, @Param(name = "city") String city, @Param(name = "address") String address) throws Exception{
|
||||||
RestfulModelAndView mav = new RestfulModelAndView();
|
RestfulModelAndView mav = new RestfulModelAndView();
|
||||||
@@ -1288,4 +1313,8 @@ public class DistrictController {
|
|||||||
public void setDistrictFacilitysService(DistrictFacilitysService districtFacilitysService) {
|
public void setDistrictFacilitysService(DistrictFacilitysService districtFacilitysService) {
|
||||||
this.districtFacilitysService = districtFacilitysService;
|
this.districtFacilitysService = districtFacilitysService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setSeaweedImagesService(SeaweedImagesService seaweedImagesService) {
|
||||||
|
this.seaweedImagesService = seaweedImagesService;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
-16
@@ -102,22 +102,6 @@ public class DistrictController {
|
|||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取小区图片
|
|
||||||
*
|
|
||||||
* @param districtModel
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Object listPicAction(DistrictModel districtModel) {
|
|
||||||
if (StringUtils.isBlank(districtModel.getId())) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
SeaweedImages seaweedImages = seaweedImagesService.findById(districtModel.getId());
|
|
||||||
if (seaweedImages != null) {
|
|
||||||
return seaweedImages.getOutPics();
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private List<AutoCompleteBo> getDistrictByKeyword(String cat, String city, String keyword, int limit, final Double lng, final Double lat) {
|
private List<AutoCompleteBo> getDistrictByKeyword(String cat, String city, String keyword, int limit, final Double lng, final Double lat) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user