|
@@ -2,15 +2,15 @@ package com.java110.api.listener.community;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.java110.api.listener.AbstractServiceApiListener;
|
|
import com.java110.api.listener.AbstractServiceApiListener;
|
|
|
-import com.java110.intf.common.IAreaInnerServiceSMO;
|
|
|
|
|
-import com.java110.dto.area.AreaDto;
|
|
|
|
|
-import com.java110.utils.constant.ServiceCodeConstant;
|
|
|
|
|
-import com.java110.utils.util.BeanConvertUtil;
|
|
|
|
|
import com.java110.core.annotation.Java110Listener;
|
|
import com.java110.core.annotation.Java110Listener;
|
|
|
import com.java110.core.context.DataFlowContext;
|
|
import com.java110.core.context.DataFlowContext;
|
|
|
-import com.java110.intf.community.ICommunityInnerServiceSMO;
|
|
|
|
|
-import com.java110.dto.community.CommunityDto;
|
|
|
|
|
import com.java110.core.event.service.api.ServiceDataFlowEvent;
|
|
import com.java110.core.event.service.api.ServiceDataFlowEvent;
|
|
|
|
|
+import com.java110.dto.area.AreaDto;
|
|
|
|
|
+import com.java110.dto.community.CommunityDto;
|
|
|
|
|
+import com.java110.intf.common.IAreaInnerServiceSMO;
|
|
|
|
|
+import com.java110.intf.community.ICommunityInnerServiceSMO;
|
|
|
|
|
+import com.java110.utils.constant.ServiceCodeConstant;
|
|
|
|
|
+import com.java110.utils.util.BeanConvertUtil;
|
|
|
import com.java110.vo.api.community.ApiCommunityDataVo;
|
|
import com.java110.vo.api.community.ApiCommunityDataVo;
|
|
|
import com.java110.vo.api.community.ApiCommunityVo;
|
|
import com.java110.vo.api.community.ApiCommunityVo;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -72,9 +72,17 @@ public class ListCommunitysListener extends AbstractServiceApiListener {
|
|
|
int count = communityInnerServiceSMOImpl.queryCommunitysCount(communityDto);
|
|
int count = communityInnerServiceSMOImpl.queryCommunitysCount(communityDto);
|
|
|
|
|
|
|
|
List<ApiCommunityDataVo> communitys = null;
|
|
List<ApiCommunityDataVo> communitys = null;
|
|
|
-
|
|
|
|
|
|
|
+ ApiCommunityDataVo apiCommunityDataVo = null;
|
|
|
if (count > 0) {
|
|
if (count > 0) {
|
|
|
- communitys = BeanConvertUtil.covertBeanList(communityInnerServiceSMOImpl.queryCommunitys(communityDto), ApiCommunityDataVo.class);
|
|
|
|
|
|
|
+ communitys = new ArrayList<>();
|
|
|
|
|
+ List<CommunityDto> communityDtos = communityInnerServiceSMOImpl.queryCommunitys(communityDto);
|
|
|
|
|
+
|
|
|
|
|
+ for (CommunityDto tmpCommunityDto : communityDtos) {
|
|
|
|
|
+ apiCommunityDataVo = BeanConvertUtil.covertBean(tmpCommunityDto, ApiCommunityDataVo.class);
|
|
|
|
|
+ apiCommunityDataVo.setCommunityAttrDtos(tmpCommunityDto.getCommunityAttrDtos());
|
|
|
|
|
+ communitys.add(apiCommunityDataVo);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
refreshCommunityCity(communitys);
|
|
refreshCommunityCity(communitys);
|
|
|
} else {
|
|
} else {
|
|
@@ -104,7 +112,7 @@ public class ListCommunitysListener extends AbstractServiceApiListener {
|
|
|
for (ApiCommunityDataVo communityDataVo : communitys) {
|
|
for (ApiCommunityDataVo communityDataVo : communitys) {
|
|
|
areaCodes.add(communityDataVo.getCityCode());
|
|
areaCodes.add(communityDataVo.getCityCode());
|
|
|
}
|
|
}
|
|
|
- if(areaCodes.size() > 0){
|
|
|
|
|
|
|
+ if (areaCodes.size() > 0) {
|
|
|
AreaDto areaDto = new AreaDto();
|
|
AreaDto areaDto = new AreaDto();
|
|
|
areaDto.setAreaCodes(areaCodes.toArray(new String[areaCodes.size()]));
|
|
areaDto.setAreaCodes(areaCodes.toArray(new String[areaCodes.size()]));
|
|
|
List<AreaDto> areaDtos = areaInnerServiceSMOImpl.getProvCityArea(areaDto);
|
|
List<AreaDto> areaDtos = areaInnerServiceSMOImpl.getProvCityArea(areaDto);
|