推送人工评级A资源(正式)

master
yqy 10 months ago
parent 973d8522f0
commit 459be655cf

@ -41,26 +41,26 @@ public class OutsideReqServiceImpl implements OutsideReqService {
if (dbPushClueDTO != null && (dbPushClueDTO.getMobile() != null || dbPushClueDTO.getCalled() != null)) { if (dbPushClueDTO != null && (dbPushClueDTO.getMobile() != null || dbPushClueDTO.getCalled() != null)) {
String mobileDecodeStr = null; String mobileDecodeStr = null;
String remark = dbPushClueDTO.getRemark(); String remark = dbPushClueDTO.getRemark();
String empClientTypeName = dbPushClueDTO.getEmpClientTypeName();
String called = dbPushClueDTO.getCalled();
try { try {
if (StringUtils.isNotBlank(dbPushClueDTO.getMobile())) { if (StringUtils.isNotBlank(dbPushClueDTO.getMobile())) {
byte[] mobileDecode = Base64.getDecoder().decode(dbPushClueDTO.getMobile()); byte[] mobileDecode = Base64.getDecoder().decode(dbPushClueDTO.getMobile());
mobileDecodeStr = new String(mobileDecode, StandardCharsets.UTF_8); mobileDecodeStr = new String(mobileDecode, StandardCharsets.UTF_8);
} } else if (StringUtils.isNotBlank(called) && StringUtils.isNotBlank(empClientTypeName) && empClientTypeName.equals("A")) {
if (StringUtils.isNotBlank(dbPushClueDTO.getCalled())) { mobileDecodeStr = DecryptPnoUtil.decryptPno(called);
mobileDecodeStr = DecryptPnoUtil.decryptPno(dbPushClueDTO.getCalled()); }else {
return;
} }
} catch (Exception e) { } catch (Exception e) {
log.error("============推送解密手机号失败============"); log.error("============解密手机号失败============");
return; return;
} }
// 添加线索 // 添加线索
if (MobileUtil.checkPhone(mobileDecodeStr)){ boolean bool = MobileUtil.checkPhone(mobileDecodeStr);
syncTaskService.pushClueExecuteTask(appKey, mobileDecodeStr, remark); if (bool) syncTaskService.pushClueExecuteTask(appKey, mobileDecodeStr, remark);
}
else log.error("============号码非法============"); else log.error("============号码非法============");
} else {
log.info("============空数据 或 空手机号============");
} }
} }
@ -69,8 +69,7 @@ public class OutsideReqServiceImpl implements OutsideReqService {
String appKey = receivePushLeadsDTO.getAppKey(); String appKey = receivePushLeadsDTO.getAppKey();
List<String> clueList = receivePushLeadsDTO.getClueList(); List<String> clueList = receivePushLeadsDTO.getClueList();
UserSecretKeyEntity entity = userSecretKeyMapper UserSecretKeyEntity entity = userSecretKeyMapper.selectOne(new LambdaQueryWrapper<UserSecretKeyEntity>().eq(UserSecretKeyEntity::getAppKey, appKey));
.selectOne(new LambdaQueryWrapper<UserSecretKeyEntity>().eq(UserSecretKeyEntity::getAppKey, appKey));
if (entity != null && CollUtil.isNotEmpty(clueList)) { if (entity != null && CollUtil.isNotEmpty(clueList)) {
List<ClueEntity> clueEntityList = new ArrayList<>(); List<ClueEntity> clueEntityList = new ArrayList<>();
for (String clueStr : clueList) { for (String clueStr : clueList) {

@ -9,8 +9,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
@ -22,7 +20,6 @@ public class DistributeTaskSyncServiceImpl implements DistributeTaskSyncService
private final DistributeTaskMapper distributeTaskMapper; private final DistributeTaskMapper distributeTaskMapper;
@Override @Override
@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
public void executeTask(List<Long> userIdList, DistributeTaskService distributeTaskService) { public void executeTask(List<Long> userIdList, DistributeTaskService distributeTaskService) {
List<DistributeTaskEntity> taskEntities = distributeTaskMapper List<DistributeTaskEntity> taskEntities = distributeTaskMapper
.selectList(new LambdaQueryWrapper<DistributeTaskEntity>().eq(DistributeTaskEntity::getDefaultType, 0) .selectList(new LambdaQueryWrapper<DistributeTaskEntity>().eq(DistributeTaskEntity::getDefaultType, 0)

Loading…
Cancel
Save