feat(REQ-3581) - 调整 gateway 的处理逻辑
This commit is contained in:
parent
9b34776762
commit
0b0ecfff24
@ -1,5 +1,6 @@
|
|||||||
package cn.axzo.nanopart.visa.server.rpc;
|
package cn.axzo.nanopart.visa.server.rpc;
|
||||||
|
|
||||||
|
import cn.axzo.basics.common.util.AssertUtil;
|
||||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||||
import cn.axzo.im.center.api.feign.GroupApi;
|
import cn.axzo.im.center.api.feign.GroupApi;
|
||||||
import cn.axzo.im.center.api.feign.MessageApi;
|
import cn.axzo.im.center.api.feign.MessageApi;
|
||||||
@ -44,6 +45,7 @@ public class MsgCenterGateway {
|
|||||||
if(group.isSuccess() && Objects.nonNull(group.getData())) {
|
if(group.isSuccess() && Objects.nonNull(group.getData())) {
|
||||||
return group.getData();
|
return group.getData();
|
||||||
}
|
}
|
||||||
|
AssertUtil.isTrue(group.isSuccess(), group.getMsg());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,6 +60,7 @@ public class MsgCenterGateway {
|
|||||||
if(members.isSuccess() && Objects.nonNull(members.getData())) {
|
if(members.isSuccess() && Objects.nonNull(members.getData())) {
|
||||||
return members.getData();
|
return members.getData();
|
||||||
}
|
}
|
||||||
|
AssertUtil.isTrue(members.isSuccess(), members.getMsg());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,6 +70,7 @@ public class MsgCenterGateway {
|
|||||||
if(owner.isSuccess() && Objects.nonNull(owner.getData())) {
|
if(owner.isSuccess() && Objects.nonNull(owner.getData())) {
|
||||||
return owner.getData();
|
return owner.getData();
|
||||||
}
|
}
|
||||||
|
AssertUtil.isTrue(owner.isSuccess(), owner.getMsg());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,6 +80,7 @@ public class MsgCenterGateway {
|
|||||||
if(mesageId.isSuccess() && Objects.nonNull(mesageId.getData())) {
|
if(mesageId.isSuccess() && Objects.nonNull(mesageId.getData())) {
|
||||||
return mesageId.getData();
|
return mesageId.getData();
|
||||||
}
|
}
|
||||||
|
AssertUtil.isTrue(mesageId.isSuccess(), mesageId.getMsg());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,6 +90,7 @@ public class MsgCenterGateway {
|
|||||||
if (Objects.nonNull(sendCard) && sendCard.getCode() == 200) {
|
if (Objects.nonNull(sendCard) && sendCard.getCode() == 200) {
|
||||||
return sendCard.getData();
|
return sendCard.getData();
|
||||||
}
|
}
|
||||||
|
AssertUtil.isTrue(sendCard.getCode() == 200, sendCard.getMsg());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package cn.axzo.nanopart.visa.server.rpc;
|
package cn.axzo.nanopart.visa.server.rpc;
|
||||||
|
|
||||||
|
import cn.axzo.basics.common.util.AssertUtil;
|
||||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||||
import cn.axzo.maokai.api.client.OrganizationalUnitApi;
|
import cn.axzo.maokai.api.client.OrganizationalUnitApi;
|
||||||
import cn.axzo.maokai.api.vo.request.OrganizationalUnitQuery;
|
import cn.axzo.maokai.api.vo.request.OrganizationalUnitQuery;
|
||||||
@ -31,6 +32,7 @@ public class OrganizationalUnitGateway {
|
|||||||
if (unitResponse.isSuccess() && Objects.nonNull(unitResponse.getData())) {
|
if (unitResponse.isSuccess() && Objects.nonNull(unitResponse.getData())) {
|
||||||
return unitResponse.getData();
|
return unitResponse.getData();
|
||||||
}
|
}
|
||||||
|
AssertUtil.isTrue(unitResponse.isSuccess(), unitResponse.getMsg());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package cn.axzo.nanopart.visa.server.rpc;
|
package cn.axzo.nanopart.visa.server.rpc;
|
||||||
|
|
||||||
|
import cn.axzo.basics.common.util.AssertUtil;
|
||||||
import cn.axzo.basics.profiles.api.UserProfileServiceApi;
|
import cn.axzo.basics.profiles.api.UserProfileServiceApi;
|
||||||
import cn.axzo.basics.profiles.dto.basic.PersonProfileDto;
|
import cn.axzo.basics.profiles.dto.basic.PersonProfileDto;
|
||||||
import cn.azxo.framework.common.logger.MethodAroundLog;
|
import cn.azxo.framework.common.logger.MethodAroundLog;
|
||||||
@ -45,6 +46,7 @@ public class VisaProfileGateway {
|
|||||||
if (Objects.nonNull(personProfile) && personProfile.getCode() == 200) {
|
if (Objects.nonNull(personProfile) && personProfile.getCode() == 200) {
|
||||||
return personProfile.getData();
|
return personProfile.getData();
|
||||||
}
|
}
|
||||||
|
AssertUtil.isTrue(personProfile.getCode() == 200, personProfile.getMsg());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user