diff --git a/src/main/java/com/glxp/api/controller/sup/UserCertController.java b/src/main/java/com/glxp/api/controller/sup/UserCertController.java index 8f1f5bd..3583ea6 100644 --- a/src/main/java/com/glxp/api/controller/sup/UserCertController.java +++ b/src/main/java/com/glxp/api/controller/sup/UserCertController.java @@ -153,17 +153,22 @@ public class UserCertController extends BaseController { public BaseResponse filterMyAuth(UserCertEntityRequest request) { PageSimpleResponse basicUdiRelResponsePageSimpleResponse = new PageSimpleResponse<>(); - //判断是否有资质授权 - QueryWrapper authWrapper = new QueryWrapper(); - authWrapper.eq("corpId",request.getBusinessId()); - authWrapper.eq("authCompanyId",getCompanyId()); - List authList = userCertAuthService.list(authWrapper); - if(CollectionUtil.isEmpty(authList)){ - return ResultVOUtils.success(basicUdiRelResponsePageSimpleResponse); + String corpId = request.getCorpId(); + if(StringUtils.isEmpty(corpId)){ + //判断是否有资质授权 + corpId = request.getBusinessId(); + QueryWrapper authWrapper = new QueryWrapper(); + authWrapper.eq("corpId",corpId); + authWrapper.eq("authCompanyId",getCompanyId()); + List authList = userCertAuthService.list(authWrapper); + if(CollectionUtil.isEmpty(authList)){ + return ResultVOUtils.success(basicUdiRelResponsePageSimpleResponse); + } } + QueryWrapper queryWrapper = new QueryWrapper(); - queryWrapper.eq("businessId",request.getBusinessId()); + queryWrapper.eq("businessId",corpId); queryWrapper.isNull("relationCertId"); int offset = (request.getPage() - 1) * request.getLimit(); Page pages = PageHelper.offsetPage(offset, request.getLimit()); diff --git a/src/main/java/com/glxp/api/req/purchase/UserCertEntityRequest.java b/src/main/java/com/glxp/api/req/purchase/UserCertEntityRequest.java index dda3732..2a9acff 100644 --- a/src/main/java/com/glxp/api/req/purchase/UserCertEntityRequest.java +++ b/src/main/java/com/glxp/api/req/purchase/UserCertEntityRequest.java @@ -13,6 +13,9 @@ public class UserCertEntityRequest extends ListPageRequest { @ApiModelProperty(value = "往来单位ID") private String businessId; + @ApiModelProperty(value = "往来单位ID") + private String corpId; + /** * 证书编号 */