|
@@ -4,9 +4,12 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.java110.api.listener.AbstractServiceApiListener;
|
|
import com.java110.api.listener.AbstractServiceApiListener;
|
|
|
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.core.smo.community.ICommunityInnerServiceSMO;
|
|
|
import com.java110.core.smo.owner.IOwnerAppUserInnerServiceSMO;
|
|
import com.java110.core.smo.owner.IOwnerAppUserInnerServiceSMO;
|
|
|
import com.java110.core.smo.owner.IOwnerInnerServiceSMO;
|
|
import com.java110.core.smo.owner.IOwnerInnerServiceSMO;
|
|
|
import com.java110.core.smo.user.IUserInnerServiceSMO;
|
|
import com.java110.core.smo.user.IUserInnerServiceSMO;
|
|
|
|
|
+import com.java110.dto.community.CommunityDto;
|
|
|
|
|
+import com.java110.dto.demo.DemoDto;
|
|
|
import com.java110.dto.owner.OwnerAppUserDto;
|
|
import com.java110.dto.owner.OwnerAppUserDto;
|
|
|
import com.java110.dto.user.UserDto;
|
|
import com.java110.dto.user.UserDto;
|
|
|
import com.java110.event.service.api.ServiceDataFlowEvent;
|
|
import com.java110.event.service.api.ServiceDataFlowEvent;
|
|
@@ -36,6 +39,9 @@ public class ListAppUserBindingOwnersListener extends AbstractServiceApiListener
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private IOwnerAppUserInnerServiceSMO ownerAppUserInnerServiceSMOImpl;
|
|
private IOwnerAppUserInnerServiceSMO ownerAppUserInnerServiceSMOImpl;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private ICommunityInnerServiceSMO communityInnerServiceSMOImpl;
|
|
|
|
|
+
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private IUserInnerServiceSMO userInnerServiceSMOImpl;
|
|
private IUserInnerServiceSMO userInnerServiceSMOImpl;
|
|
|
|
|
|
|
@@ -81,17 +87,17 @@ public class ListAppUserBindingOwnersListener extends AbstractServiceApiListener
|
|
|
|
|
|
|
|
String openId = userDtos.get(0).getOpenId();
|
|
String openId = userDtos.get(0).getOpenId();
|
|
|
|
|
|
|
|
- if(!reqJson.containsKey("page")){
|
|
|
|
|
- reqJson.put("page",1);
|
|
|
|
|
|
|
+ if (!reqJson.containsKey("page")) {
|
|
|
|
|
+ reqJson.put("page", 1);
|
|
|
}
|
|
}
|
|
|
- if(!reqJson.containsKey("row")){
|
|
|
|
|
- reqJson.put("row",10);
|
|
|
|
|
|
|
+ if (!reqJson.containsKey("row")) {
|
|
|
|
|
+ reqJson.put("row", 10);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
OwnerAppUserDto ownerAppUserDto = BeanConvertUtil.covertBean(reqJson, OwnerAppUserDto.class);
|
|
OwnerAppUserDto ownerAppUserDto = BeanConvertUtil.covertBean(reqJson, OwnerAppUserDto.class);
|
|
|
- if(!StringUtil.isEmpty(openId)) {//这里微信小程序
|
|
|
|
|
|
|
+ if (!StringUtil.isEmpty(openId)) {//这里微信小程序
|
|
|
ownerAppUserDto.setOpenId(openId);
|
|
ownerAppUserDto.setOpenId(openId);
|
|
|
- }else{ //这种是业主注册的
|
|
|
|
|
|
|
+ } else { //这种是业主注册的
|
|
|
|
|
|
|
|
ownerAppUserDto.setUserId(userId);
|
|
ownerAppUserDto.setUserId(userId);
|
|
|
}
|
|
}
|
|
@@ -102,6 +108,7 @@ public class ListAppUserBindingOwnersListener extends AbstractServiceApiListener
|
|
|
|
|
|
|
|
if (count > 0) {
|
|
if (count > 0) {
|
|
|
auditAppUserBindingOwners = BeanConvertUtil.covertBeanList(ownerAppUserInnerServiceSMOImpl.queryOwnerAppUsers(ownerAppUserDto), ApiAuditAppUserBindingOwnerDataVo.class);
|
|
auditAppUserBindingOwners = BeanConvertUtil.covertBeanList(ownerAppUserInnerServiceSMOImpl.queryOwnerAppUsers(ownerAppUserDto), ApiAuditAppUserBindingOwnerDataVo.class);
|
|
|
|
|
+ refreshCommunityArea(auditAppUserBindingOwners);
|
|
|
} else {
|
|
} else {
|
|
|
auditAppUserBindingOwners = new ArrayList<>();
|
|
auditAppUserBindingOwners = new ArrayList<>();
|
|
|
}
|
|
}
|
|
@@ -118,6 +125,43 @@ public class ListAppUserBindingOwnersListener extends AbstractServiceApiListener
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 刷入小区地区
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param auditAppUserBindingOwners
|
|
|
|
|
+ */
|
|
|
|
|
+ private void refreshCommunityArea(List<ApiAuditAppUserBindingOwnerDataVo> auditAppUserBindingOwners) {
|
|
|
|
|
+ CommunityDto communityDto = new CommunityDto();
|
|
|
|
|
+ communityDto.setCommunityIds(getCommunityIds(auditAppUserBindingOwners));
|
|
|
|
|
+ List<CommunityDto> communityDtos = communityInnerServiceSMOImpl.queryCommunitys(communityDto);
|
|
|
|
|
+
|
|
|
|
|
+ for (CommunityDto tmpCommunityDto : communityDtos) {
|
|
|
|
|
+ for (ApiAuditAppUserBindingOwnerDataVo apiAuditAppUserBindingOwnerDataVo : auditAppUserBindingOwners) {
|
|
|
|
|
+ if(apiAuditAppUserBindingOwnerDataVo.getCommunityId().equals(tmpCommunityDto.getCommunityId())){
|
|
|
|
|
+ apiAuditAppUserBindingOwnerDataVo.setAreaCode(tmpCommunityDto.getAreaCode());
|
|
|
|
|
+ apiAuditAppUserBindingOwnerDataVo.setAreaName(tmpCommunityDto.getAreaName());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取批量userId
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param auditAppUserBindingOwners 业主绑定信息
|
|
|
|
|
+ * @return 批量userIds 信息
|
|
|
|
|
+ */
|
|
|
|
|
+ private String[] getCommunityIds(List<ApiAuditAppUserBindingOwnerDataVo> auditAppUserBindingOwners) {
|
|
|
|
|
+ List<String> communityIds = new ArrayList<String>();
|
|
|
|
|
+ for (ApiAuditAppUserBindingOwnerDataVo apiAuditAppUserBindingOwnerDataVo : auditAppUserBindingOwners) {
|
|
|
|
|
+ communityIds.add(apiAuditAppUserBindingOwnerDataVo.getCommunityId());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return communityIds.toArray(new String[communityIds.size()]);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public IOwnerAppUserInnerServiceSMO getOwnerAppUserInnerServiceSMOImpl() {
|
|
public IOwnerAppUserInnerServiceSMO getOwnerAppUserInnerServiceSMOImpl() {
|
|
|
return ownerAppUserInnerServiceSMOImpl;
|
|
return ownerAppUserInnerServiceSMOImpl;
|
|
|
}
|
|
}
|