添加容错机制

master
bynt 9 months ago
parent 494f8c25b5
commit 05e4bde01f

@ -67,7 +67,6 @@ public class TripartiteServiceImpl implements TripartiteService {
private final SysUserRolePromiseService sysUserRolePromiseService; private final SysUserRolePromiseService sysUserRolePromiseService;
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Boolean callbackByAppKeyAndNid(String appKey, PushClueDTO dto) { public Boolean callbackByAppKeyAndNid(String appKey, PushClueDTO dto) {
@ -78,9 +77,11 @@ public class TripartiteServiceImpl implements TripartiteService {
if (StringUtils.isNotBlank(dto.getMobile())) { if (StringUtils.isNotBlank(dto.getMobile())) {
phone = Base64.decodeStr(dto.getMobile()); phone = Base64.decodeStr(dto.getMobile());
} }
// 格式校验
if (StringUtils.isNotBlank(called) && StringUtils.isNotBlank(typeName) if (StringUtils.isNotBlank(called) && StringUtils.isNotBlank(typeName)
&& Announcement.TABLE_ALIAS.equalsIgnoreCase(typeName)) { && Announcement.TABLE_ALIAS.equalsIgnoreCase(typeName)) {
phone = DecryptPnoUtil.decryptPno(called); phone = called.length() > DefaultNumberConstants.ELEVEN_NUMBER
? DecryptPnoUtil.decryptPno(called) : called;
} }
PushLinkEntity byAppKey = pushLinkService.getByAppKey(appKey); PushLinkEntity byAppKey = pushLinkService.getByAppKey(appKey);
@ -118,6 +119,6 @@ public class TripartiteServiceImpl implements TripartiteService {
return customService.createByCallBack(Collections.singletonList(customDTO)); return customService.createByCallBack(Collections.singletonList(customDTO));
} }
} }
return Boolean.FALSE; return Boolean.TRUE;
} }
} }

Loading…
Cancel
Save