Merge branch 'master' of http://gitlab.fangjia.com/dev0/main
This commit is contained in:
+4
-2
@@ -11,7 +11,6 @@ import com.fangjia.open.model.RestfulModelAndView;
|
|||||||
import com.fangjia.open.util.CommonDtoUtils;
|
import com.fangjia.open.util.CommonDtoUtils;
|
||||||
import net.sf.json.JSONObject;
|
import net.sf.json.JSONObject;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -247,7 +246,10 @@ public class AddrSvcController {
|
|||||||
String msg = json.getString("msg");
|
String msg = json.getString("msg");
|
||||||
BasicModel basicModel = new BasicModel(code, msg);
|
BasicModel basicModel = new BasicModel(code, msg);
|
||||||
if (json.containsKey("result")) {
|
if (json.containsKey("result")) {
|
||||||
basicModel.setResult(CommonDtoUtils.transformListV(DistrictDto.class, (JSONObject.fromObject(json.get("result"))).getJSONArray("content")));
|
JSONObject result = (JSONObject.fromObject(json.get("result")));
|
||||||
|
if (result.getInt("totalElements") > 0) {
|
||||||
|
basicModel.setResult(CommonDtoUtils.transformListV(DistrictDto.class, result.getJSONArray("content")));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
mav.setModel(basicModel);
|
mav.setModel(basicModel);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+5
-5
@@ -3668,11 +3668,11 @@ public class PropertyController {
|
|||||||
} else {
|
} else {
|
||||||
b.setDirection("");
|
b.setDirection("");
|
||||||
}
|
}
|
||||||
if (house.getPics() != null && !house.getPics().isEmpty()) {
|
// if (house.getPics() != null && !house.getPics().isEmpty()) {
|
||||||
b.setPic(transformPicsToFangJia(house.getPics().get(house.getPics().size() / 2)));
|
// b.setPic(transformPicsToFangJia(house.getPics().get(house.getPics().size() / 2)));
|
||||||
} else {
|
// } else {
|
||||||
b.setPic("");
|
// b.setPic("");
|
||||||
}
|
// }
|
||||||
if (house.getPublishDate() != null) {
|
if (house.getPublishDate() != null) {
|
||||||
if (new Date().before(house.getPublishDate())) {
|
if (new Date().before(house.getPublishDate())) {
|
||||||
house.setPublishDate(house.getModificationDate());
|
house.setPublishDate(house.getModificationDate());
|
||||||
|
|||||||
-2
@@ -141,7 +141,6 @@ public class DistrictController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Object districtDetailAction(DistrictModel districtModel,HttpServletRequest request,HttpServletResponse response) {
|
public Object districtDetailAction(DistrictModel districtModel,HttpServletRequest request,HttpServletResponse response) {
|
||||||
System.out.println("小区详情coming");
|
|
||||||
//id和name不能同时为空
|
//id和name不能同时为空
|
||||||
if(StringUtils.isBlank(districtModel.getId()) && (StringUtils.isBlank(districtModel.getCityName()) || StringUtils.isBlank(districtModel.getName()))) {
|
if(StringUtils.isBlank(districtModel.getId()) && (StringUtils.isBlank(districtModel.getCityName()) || StringUtils.isBlank(districtModel.getName()))) {
|
||||||
districtModel.setMsg("参数错误");
|
districtModel.setMsg("参数错误");
|
||||||
@@ -150,7 +149,6 @@ public class DistrictController {
|
|||||||
|
|
||||||
District district = null;
|
District district = null;
|
||||||
if(StringUtils.isNotBlank(districtModel.getId())) {
|
if(StringUtils.isNotBlank(districtModel.getId())) {
|
||||||
System.out.println("小区详情1");
|
|
||||||
district = districtService.findById(districtModel.getId());
|
district = districtService.findById(districtModel.getId());
|
||||||
|
|
||||||
if(district != null) {
|
if(district != null) {
|
||||||
|
|||||||
@@ -43,5 +43,11 @@
|
|||||||
<ladder>/address/fiveDivisionStructure</ladder>
|
<ladder>/address/fiveDivisionStructure</ladder>
|
||||||
</ladders>
|
</ladders>
|
||||||
</rule>
|
</rule>
|
||||||
|
<rule controller="property" action="detail2" channel="v2">
|
||||||
|
<ladders>
|
||||||
|
<ladder>/property/detail</ladder>
|
||||||
|
</ladders>
|
||||||
|
</rule>
|
||||||
|
|
||||||
</rules>
|
</rules>
|
||||||
</urlrewrite>
|
</urlrewrite>
|
||||||
Reference in New Issue
Block a user