微调
This commit is contained in:
@@ -69,7 +69,7 @@ public class AdHarmonicServiceImpl extends ServiceImpl<AdHarmonicMappper, AdHarm
|
||||
List<AdHarmonicResult> adHarmonicResults = this.getBaseMapper().selectJoinList(AdHarmonicResult.class, wrapper);
|
||||
List<Double> harmNum = param.getHarmNum();
|
||||
|
||||
Map<String, List<RawDataVO>> info=new HashMap<>(3);
|
||||
Map<String, List<RawDataVO>> info=new LinkedHashMap<>(3);
|
||||
RawDataVO dataVO;
|
||||
List<RawDataVO> rawDataVOS;
|
||||
for (AdHarmonicResult harmonicResult : adHarmonicResults) {
|
||||
@@ -129,7 +129,7 @@ public class AdHarmonicServiceImpl extends ServiceImpl<AdHarmonicMappper, AdHarm
|
||||
List<AdHarmonicResult> adHarmonicResults = this.getBaseMapper().selectJoinList(AdHarmonicResult.class, wrapper);
|
||||
List<Double> harmNum = param.getHarmNum();
|
||||
|
||||
Map<String, RawResultDataVO> info=new HashMap<>(3);
|
||||
Map<String, RawResultDataVO> info=new LinkedHashMap<>(3);
|
||||
RawResultDataVO dataVO;
|
||||
for (AdHarmonicResult harmonicResult : adHarmonicResults) {
|
||||
for (Double i : harmNum) {
|
||||
|
||||
@@ -62,7 +62,7 @@ public class AdNonHarmonicServiceImpl extends ServiceImpl<AdNonHarmonicMapper, A
|
||||
.eq(ObjectUtil.isNotNull(param.getScriptId()), AdNonHarmonicResult::getScriptId, param.getScriptId())
|
||||
.in(ObjectUtil.isNotEmpty(param.getIndex()), AdNonHarmonicResult::getSort, param.getIndex());
|
||||
List<AdNonHarmonicResult> adHarmonicResults = this.getBaseMapper().selectJoinList(AdNonHarmonicResult.class, wrapper);
|
||||
Map<String, List<RawDataVO>> info = new HashMap<>(2);
|
||||
Map<String, List<RawDataVO>> info = new LinkedHashMap<>(2);
|
||||
Map<String, List<AdNonHarmonicResult>> adTypeMap = adHarmonicResults.stream().collect(Collectors.groupingBy(AdNonHarmonicResult::getAdType));
|
||||
List<DictTree> dictTreeById = dictTreeService.getDictTreeById(new ArrayList<>(adTypeMap.keySet()));
|
||||
Map<String, DictTree> dictTreeByName = dictTreeById.stream().collect(Collectors.toMap(DictTree::getId,Function.identity()));
|
||||
@@ -98,7 +98,7 @@ public class AdNonHarmonicServiceImpl extends ServiceImpl<AdNonHarmonicMapper, A
|
||||
|
||||
List<AdNonHarmonicResult> adHarmonicResults = this.getBaseMapper().selectJoinList(AdNonHarmonicResult.class, wrapper);
|
||||
|
||||
Map<String, RawResultDataVO> info = new HashMap<>(2);
|
||||
Map<String, RawResultDataVO> info = new LinkedHashMap<>(2);
|
||||
Map<String, AdNonHarmonicResult> adTypeMap = adHarmonicResults.stream().collect(Collectors.toMap(AdNonHarmonicResult::getAdType, Function.identity()));
|
||||
List<DictTree> dictTreeById = dictTreeService.getDictTreeById(new ArrayList<>(adTypeMap.keySet()));
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public class DetectionDataServiceImpl extends ReplenishMybatisServiceImpl<Detect
|
||||
if(CollUtil.isNotEmpty(monitorIds)){
|
||||
adNonHarmonicService.remove(new LambdaQueryWrapper<AdNonHarmonicResult>().in(AdNonHarmonicResult::getMonitorId, monitorIds)
|
||||
.eq(AdNonHarmonicResult::getScriptId,adNonHarmonicResultList.get(0).getScriptId())
|
||||
.eq(AdNonHarmonicResult::getAdType,adNonHarmonicResultList.get(0).getAdType()));
|
||||
.eq(AdNonHarmonicResult::getSort,adNonHarmonicResultList.get(0).getSort()));
|
||||
adNonHarmonicService.saveBatch(adNonHarmonicResultList, 100);
|
||||
}
|
||||
DynamicTableNameHandler.remove();
|
||||
@@ -53,7 +53,7 @@ public class DetectionDataServiceImpl extends ReplenishMybatisServiceImpl<Detect
|
||||
if(CollUtil.isNotEmpty(monitorIds)){
|
||||
this.remove(new LambdaQueryWrapper<AdHarmonicResult>().in(AdHarmonicResult::getMonitorId, monitorIds)
|
||||
.eq(AdHarmonicResult::getScriptId,adHarmonicResultList.get(0).getScriptId())
|
||||
.eq(AdHarmonicResult::getAdType,adHarmonicResultList.get(0).getAdType()));
|
||||
.eq(AdHarmonicResult::getSort,adHarmonicResultList.get(0).getSort()));
|
||||
this.saveBatch(adHarmonicResultList, 100);
|
||||
|
||||
}
|
||||
@@ -66,16 +66,13 @@ public class DetectionDataServiceImpl extends ReplenishMybatisServiceImpl<Detect
|
||||
public Boolean acceptAdNonResult(List<AdNonHarmonicResult> adNonHarmonicResultList, String code) {
|
||||
String adNonTableResult = "ad_non_harmonic_result_";
|
||||
DynamicTableNameHandler.setTableName(adNonTableResult + code);
|
||||
|
||||
for (AdNonHarmonicResult item : adNonHarmonicResultList) {
|
||||
adNonHarmonicService.remove(new LambdaQueryWrapper<AdNonHarmonicResult>()
|
||||
.eq(AdNonHarmonicResult::getMonitorId, item.getMonitorId())
|
||||
.eq(AdNonHarmonicResult::getSort, item.getSort())
|
||||
.eq(AdNonHarmonicResult::getScriptId, item.getScriptId())
|
||||
|
||||
);
|
||||
List<String> monitorIds = adNonHarmonicResultList.stream().map(AdNonHarmonicResult::getMonitorId).distinct().collect(Collectors.toList());
|
||||
if(CollUtil.isNotEmpty(monitorIds)){
|
||||
adNonHarmonicService.remove(new LambdaQueryWrapper<AdNonHarmonicResult>().in(AdNonHarmonicResult::getMonitorId, monitorIds)
|
||||
.eq(AdNonHarmonicResult::getScriptId,adNonHarmonicResultList.get(0).getScriptId())
|
||||
.eq(AdNonHarmonicResult::getSort,adNonHarmonicResultList.get(0).getSort()));
|
||||
adNonHarmonicService.saveBatch(adNonHarmonicResultList, 100);
|
||||
}
|
||||
adNonHarmonicService.saveBatch(adNonHarmonicResultList, 100);
|
||||
DynamicTableNameHandler.remove();
|
||||
return true;
|
||||
}
|
||||
@@ -85,15 +82,13 @@ public class DetectionDataServiceImpl extends ReplenishMybatisServiceImpl<Detect
|
||||
public Boolean acceptAdResult(List<AdHarmonicResult> adHarmonicResultList, String code) {
|
||||
String adTableResult = "ad_harmonic_result_";
|
||||
DynamicTableNameHandler.setTableName(adTableResult + code);
|
||||
for (AdHarmonicResult item : adHarmonicResultList) {
|
||||
this.remove(new LambdaQueryWrapper<AdHarmonicResult>()
|
||||
.eq(AdHarmonicResult::getMonitorId, item.getMonitorId())
|
||||
.eq(AdHarmonicResult::getSort, item.getSort())
|
||||
.eq(AdHarmonicResult::getScriptId, item.getScriptId())
|
||||
|
||||
);
|
||||
List<String> monitorIds = adHarmonicResultList.stream().map(AdHarmonicResult::getMonitorId).distinct().collect(Collectors.toList());
|
||||
if(CollUtil.isNotEmpty(monitorIds)){
|
||||
this.remove(new LambdaQueryWrapper<AdHarmonicResult>().in(AdHarmonicResult::getMonitorId, monitorIds)
|
||||
.eq(AdHarmonicResult::getScriptId,adHarmonicResultList.get(0).getScriptId())
|
||||
.eq(AdHarmonicResult::getSort,adHarmonicResultList.get(0).getSort()));
|
||||
this.saveBatch(adHarmonicResultList, 100);
|
||||
}
|
||||
this.saveBatch(adHarmonicResultList, 100);
|
||||
DynamicTableNameHandler.remove();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user