|
|
@ -254,39 +254,16 @@ public class PrUserProjectServiceImpl extends BaseServiceImpl<PrUserProjectDao, |
|
|
|
} |
|
|
|
r.setOrgName(orgName); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
insertPrVistRecord(formDTO); |
|
|
|
PrVistRecordDTO param = new PrVistRecordDTO(); |
|
|
|
param.setCustomerId(formDTO.getCustomerId()); |
|
|
|
param.setUserId(formDTO.getUserId()); |
|
|
|
param.setUserType(formDTO.getClient()); |
|
|
|
param.setCustomerId(formDTO.getCustomerId()); |
|
|
|
prVistRecordService.insertOrUpdate(param); |
|
|
|
|
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* desc:一步插入访问记录 不带projectKey |
|
|
|
* @param formDTO |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
private Future<?> insertPrVistRecord(TDuckListFormDTO formDTO) { |
|
|
|
return Executors.newCachedThreadPool().submit(()->{ |
|
|
|
log.info("insertPrVistRecord start ========="); |
|
|
|
PrVistRecordDTO param = new PrVistRecordDTO(); |
|
|
|
param.setCustomerId(formDTO.getCustomerId()); |
|
|
|
param.setUserId(formDTO.getUserId()); |
|
|
|
param.setUserType(formDTO.getOrgType()); |
|
|
|
param.setProjectKey(formDTO.getClient()); |
|
|
|
PrVistRecordDTO newestRecord = prVistRecordService.getNewestRecord(formDTO.getUserId()); |
|
|
|
PrVistRecordEntity entity = ConvertUtils.sourceToTarget(PrVistRecordDTO.class, PrVistRecordEntity.class); |
|
|
|
if (newestRecord == null) { |
|
|
|
prVistRecordService.insert(entity); |
|
|
|
} else { |
|
|
|
entity = new PrVistRecordEntity(); |
|
|
|
entity.setId(newestRecord.getId()); |
|
|
|
prVistRecordService.updateById(entity); |
|
|
|
} |
|
|
|
log.info("insertPrVistRecord end ========="); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description orgIds拼接 |
|
|
|
* @Param pids |
|
|
@ -827,7 +804,7 @@ public class PrUserProjectServiceImpl extends BaseServiceImpl<PrUserProjectDao, |
|
|
|
result.setRedPoint(NumConstant.ONE_STR); |
|
|
|
return result; |
|
|
|
} |
|
|
|
if (list.get(0).getCreatedTime().compareTo(visitRecord.getCreatedTime()) > 0) { |
|
|
|
if (list.get(0).getCreatedTime().compareTo(visitRecord.getUpdatedTime()) > 0) { |
|
|
|
result.setRedPoint(NumConstant.ONE_STR); |
|
|
|
} else { |
|
|
|
result.setRedPoint(NumConstant.ZERO_STR); |
|
|
|