java110
2020-06-14 063b2b4e1f0d79da8c8c6f38cd94ada19c1b2cdc
查询用户绑定
1个文件已修改
21 ■■■■■ 已修改文件
service-api/src/main/java/com/java110/api/listener/owner/ListAppUserBindingOwnersListener.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-api/src/main/java/com/java110/api/listener/owner/ListAppUserBindingOwnersListener.java
@@ -4,17 +4,14 @@
import com.java110.api.listener.AbstractServiceApiListener;
import com.java110.core.annotation.Java110Listener;
import com.java110.core.context.DataFlowContext;
import com.java110.core.event.service.api.ServiceDataFlowEvent;
import com.java110.core.smo.community.ICommunityInnerServiceSMO;
import com.java110.core.smo.user.IOwnerAppUserInnerServiceSMO;
import com.java110.core.smo.user.IUserInnerServiceSMO;
import com.java110.dto.community.CommunityDto;
import com.java110.dto.owner.OwnerAppUserDto;
import com.java110.dto.user.UserDto;
import com.java110.core.event.service.api.ServiceDataFlowEvent;
import com.java110.utils.constant.ServiceCodeConstant;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
import com.java110.utils.util.StringUtil;
import com.java110.vo.api.auditAppUserBindingOwner.ApiAuditAppUserBindingOwnerDataVo;
import com.java110.vo.api.auditAppUserBindingOwner.ApiAuditAppUserBindingOwnerVo;
import org.springframework.beans.factory.annotation.Autowired;
@@ -63,9 +60,9 @@
    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
        //super.validatePageInfo(reqJson);
        Map<String, String> headers = event.getDataFlowContext().getRequestHeaders();
        //  Map<String, String> headers = event.getDataFlowContext().getRequestHeaders();
        Assert.hasKeyAndValue(headers, "userid", "请求头中未包含用户信息");
        //   Assert.hasKeyAndValue(headers, "userid", "请求头中未包含用户信息");
    }
    @Override
@@ -73,7 +70,7 @@
        Map<String, String> headers = event.getDataFlowContext().getRequestHeaders();
        String userId = headers.get("userid");
        //     String userId = headers.get("userid");
        //根据userId 查询openId
//        UserDto userDto = new UserDto();
@@ -92,11 +89,9 @@
        }
        OwnerAppUserDto ownerAppUserDto = BeanConvertUtil.covertBean(reqJson, OwnerAppUserDto.class);
//        if (!StringUtil.isEmpty(openId)) {//这里微信小程序
//            ownerAppUserDto.setOpenId(openId);
//        } else { //这种是业主注册的
            ownerAppUserDto.setUserId(userId);
//        }
        if (headers.containsKey("userid")) {//这里微信小程序
            ownerAppUserDto.setUserId(headers.get("userid"));
        }
        int count = ownerAppUserInnerServiceSMOImpl.queryOwnerAppUsersCount(ownerAppUserDto);
@@ -133,7 +128,7 @@
        for (CommunityDto tmpCommunityDto : communityDtos) {
            for (ApiAuditAppUserBindingOwnerDataVo apiAuditAppUserBindingOwnerDataVo : auditAppUserBindingOwners) {
                if(apiAuditAppUserBindingOwnerDataVo.getCommunityId().equals(tmpCommunityDto.getCommunityId())){
                if (apiAuditAppUserBindingOwnerDataVo.getCommunityId().equals(tmpCommunityDto.getCommunityId())) {
                    apiAuditAppUserBindingOwnerDataVo.setAreaCode(tmpCommunityDto.getAreaCode());
                    apiAuditAppUserBindingOwnerDataVo.setAreaName(tmpCommunityDto.getAreaName());
                    apiAuditAppUserBindingOwnerDataVo.setParentAreaCode(tmpCommunityDto.getParentAreaCode());