|
|
@@ -249,6 +249,15 @@ public class IpTokenInterfaceServiceImpl implements IpTokenInterfaceService {
|
|
|
IpTokenPO ipTokenPO;
|
|
|
// 校验唯一性
|
|
|
if(id != null){
|
|
|
+ List<IpTokenInterfacePO> interfaceList = ipTokenInterfaceRepository.queryRefList(param.getAccountId(), param.getInterfaceId());
|
|
|
+ if(!interfaceList.isEmpty()){
|
|
|
+ for (IpTokenInterfacePO tokenInterfacePO : interfaceList) {
|
|
|
+ if(!tokenInterfacePO.getId().equals(id)){
|
|
|
+ throw new RuntimeException("该账号下已存在对应接口");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
ipTokenInterfacePO = ipTokenInterfaceRepository.findById(param.getId()).get();
|
|
|
ipTokenPO = ipTokenRepository.findById(ipTokenInterfacePO.getTid()).get();
|
|
|
if(ipTokenPO == null){
|