添加容错机制

master
bynt 9 months ago
parent 494f8c25b5
commit 05e4bde01f

@ -67,7 +67,6 @@ public class TripartiteServiceImpl implements TripartiteService {
private final SysUserRolePromiseService sysUserRolePromiseService;
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean callbackByAppKeyAndNid(String appKey, PushClueDTO dto) {
@ -78,9 +77,11 @@ public class TripartiteServiceImpl implements TripartiteService {
if (StringUtils.isNotBlank(dto.getMobile())) {
phone = Base64.decodeStr(dto.getMobile());
}
// 格式校验
if (StringUtils.isNotBlank(called) && StringUtils.isNotBlank(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);
@ -98,14 +99,14 @@ public class TripartiteServiceImpl implements TripartiteService {
log.info("============ the distribute id {} this assigned id {} ============", userList, distributeId);
if (ObjectUtil.isNotNull(distributeId)) {
SysUserRolePromise promise = sysUserRolePromiseService.queryIsShowByUserId(distributeId);
if (ObjectUtil.isNotNull(promise) && ObjectUtil.isNotNull
if (ObjectUtil.isNotNull(promise) && ObjectUtil.isNotNull
(promise.getIsAutoAudits()) && promise.getIsAutoAudits().equals(Boolean.TRUE)) {
List<ClueDTO> list = Lists.newArrayList();
// 雪花算法id
Long clueId = IdUtil.getSnowflake(workerId, datacenterId).nextId();
ClueDTO clueDTO = ClueDTO.builder().originName(ClueSourceEnum.STORE_DISTRIBUTION.getDescription()).clueId(clueId).remark
(remark).nid(AESUtils.encrypt(phone, securityProperties.getPasswordSecretKey())).assignedBy
(reportUserId).createBy(distributeId).isNewClue(Boolean.TRUE).build();
(reportUserId).createBy(distributeId).isNewClue(Boolean.TRUE).build();
list.add(clueDTO);
clueService.saveClueListByStoreInfo(list);
}
@ -118,6 +119,6 @@ public class TripartiteServiceImpl implements TripartiteService {
return customService.createByCallBack(Collections.singletonList(customDTO));
}
}
return Boolean.FALSE;
return Boolean.TRUE;
}
}

Loading…
Cancel
Save