1.增加检测结果信息入库
2.优化代码,三相不平衡,闪变,暂态业务逻辑提交
This commit is contained in:
@@ -1,16 +1,9 @@
|
||||
package com.njcn.gather.storage.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.gather.storage.pojo.po.AdHarmonicResult;
|
||||
import com.njcn.db.mybatisplus.mapper.BatchBaseMapper;
|
||||
import com.njcn.gather.storage.pojo.po.AdNonHarmonicResult;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface AdNonHarmonicMapper extends BaseMapper<AdNonHarmonicResult> {
|
||||
|
||||
|
||||
|
||||
|
||||
public interface AdNonHarmonicMapper extends BatchBaseMapper<AdNonHarmonicResult> {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
package com.njcn.gather.storage.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.db.mybatisplus.mapper.BatchBaseMapper;
|
||||
import com.njcn.gather.storage.pojo.po.AdHarmonicResult;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface DetectionDataDealMapper extends BaseMapper<AdHarmonicResult> {
|
||||
public interface DetectionDataDealMapper extends BatchBaseMapper<AdHarmonicResult> {
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.gather.storage.mapper.AdNonHarmonicMapper">
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.gather.storage.mapper.DetectionDataDealMapper">
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.njcn.gather.storage.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -36,7 +37,7 @@ public class AdHarmonicResult {
|
||||
*/
|
||||
private String scriptId;
|
||||
|
||||
|
||||
@TableField("`INDEX`")
|
||||
private Integer index;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.njcn.gather.storage.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -36,6 +37,7 @@ public class AdNonHarmonicResult {
|
||||
*/
|
||||
private String scriptId;
|
||||
|
||||
@TableField("`INDEX`")
|
||||
private Integer index;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
package com.njcn.gather.storage.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.gather.storage.pojo.po.AdHarmonicResult;
|
||||
import com.njcn.db.mybatisplus.service.IReplenishMybatisService;
|
||||
import com.njcn.gather.storage.pojo.po.AdNonHarmonicResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface AdNonHarmonicService extends IService<AdNonHarmonicResult> {
|
||||
public interface AdNonHarmonicService extends IReplenishMybatisService<AdNonHarmonicResult> {
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package com.njcn.gather.storage.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.db.mybatisplus.service.IReplenishMybatisService;
|
||||
import com.njcn.gather.storage.pojo.po.AdHarmonicResult;
|
||||
import com.njcn.gather.storage.pojo.po.AdNonHarmonicResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface DetectionDataDealService extends IService<AdHarmonicResult> {
|
||||
public interface DetectionDataDealService extends IReplenishMybatisService<AdHarmonicResult> {
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,23 +1,17 @@
|
||||
package com.njcn.gather.storage.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.db.mybatisplus.handler.DynamicTableNameHandler;
|
||||
import com.njcn.db.mybatisplus.service.impl.ReplenishMybatisServiceImpl;
|
||||
import com.njcn.gather.storage.mapper.AdNonHarmonicMapper;
|
||||
import com.njcn.gather.storage.mapper.DetectionDataDealMapper;
|
||||
import com.njcn.gather.storage.pojo.po.AdHarmonicResult;
|
||||
import com.njcn.gather.storage.pojo.po.AdNonHarmonicResult;
|
||||
import com.njcn.gather.storage.service.AdNonHarmonicService;
|
||||
import com.njcn.gather.storage.service.DetectionDataDealService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class AdNonHarmonicServiceImpl extends ServiceImpl<AdNonHarmonicMapper, AdNonHarmonicResult> implements AdNonHarmonicService {
|
||||
public class AdNonHarmonicServiceImpl extends ReplenishMybatisServiceImpl<AdNonHarmonicMapper, AdNonHarmonicResult> implements AdNonHarmonicService {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.njcn.gather.storage.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.db.mybatisplus.handler.DynamicTableNameHandler;
|
||||
import com.njcn.db.mybatisplus.service.impl.ReplenishMybatisServiceImpl;
|
||||
import com.njcn.gather.storage.mapper.DetectionDataDealMapper;
|
||||
import com.njcn.gather.storage.pojo.po.AdHarmonicResult;
|
||||
import com.njcn.gather.storage.pojo.po.AdNonHarmonicResult;
|
||||
@@ -18,7 +18,7 @@ import java.util.List;
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class DetectionDataServiceImpl extends ServiceImpl<DetectionDataDealMapper, AdHarmonicResult> implements DetectionDataDealService {
|
||||
public class DetectionDataServiceImpl extends ReplenishMybatisServiceImpl<DetectionDataDealMapper, AdHarmonicResult> implements DetectionDataDealService {
|
||||
|
||||
private final AdNonHarmonicService adNonHarmonicService;
|
||||
|
||||
@@ -43,7 +43,7 @@ public class DetectionDataServiceImpl extends ServiceImpl<DetectionDataDealMappe
|
||||
|
||||
@Override
|
||||
public Boolean acceptAdNonResult(List<AdNonHarmonicResult> adNonHarmonicResultList,String code) {
|
||||
String adNonTableResult = "ad_non_harmonic_";
|
||||
String adNonTableResult = "ad_non_harmonic_result_";
|
||||
DynamicTableNameHandler.setTableName(adNonTableResult +code);
|
||||
adNonHarmonicService.saveBatch(adNonHarmonicResultList,100);
|
||||
DynamicTableNameHandler.remove();
|
||||
@@ -52,7 +52,7 @@ public class DetectionDataServiceImpl extends ServiceImpl<DetectionDataDealMappe
|
||||
|
||||
@Override
|
||||
public Boolean acceptAdResult(List<AdHarmonicResult> adHarmonicResultList,String code) {
|
||||
String adTableResult = "ad_harmonic_";
|
||||
String adTableResult = "ad_harmonic_result_";
|
||||
DynamicTableNameHandler.setTableName(adTableResult +code);
|
||||
this.saveBatch(adHarmonicResultList,100);
|
||||
DynamicTableNameHandler.remove();
|
||||
|
||||
Reference in New Issue
Block a user