|
@@ -13,6 +13,7 @@ import com.qhtx.eta.domain.entity.DWIndexDataDTO;
|
|
import com.qhtx.eta.domain.entity.DWIndexFrameDTO;
|
|
import com.qhtx.eta.domain.entity.DWIndexFrameDTO;
|
|
import com.qhtx.eta.domain.service.DWIndexFrameService;
|
|
import com.qhtx.eta.domain.service.DWIndexFrameService;
|
|
import com.qhtx.eta.domain.utils.RedisUtils;
|
|
import com.qhtx.eta.domain.utils.RedisUtils;
|
|
|
|
+import com.qhtx.eta.infra.annotation.UseDataSource;
|
|
import com.qhtx.eta.infra.datasource.DataSourceContextHolder;
|
|
import com.qhtx.eta.infra.datasource.DataSourceContextHolder;
|
|
import com.qhtx.eta.infra.entity.dw.TDampDwLinkDetail;
|
|
import com.qhtx.eta.infra.entity.dw.TDampDwLinkDetail;
|
|
import com.qhtx.eta.infra.entity.dw.*;
|
|
import com.qhtx.eta.infra.entity.dw.*;
|
|
@@ -66,8 +67,6 @@ public class DWIndexFrameServiceImpl implements DWIndexFrameService {
|
|
@Resource
|
|
@Resource
|
|
private TDampDwLinkDetailService tDampDwLinkDetailService;
|
|
private TDampDwLinkDetailService tDampDwLinkDetailService;
|
|
|
|
|
|
- @Resource
|
|
|
|
- private DWIndexFrameDao dwIndexFrameDao;
|
|
|
|
@Resource
|
|
@Resource
|
|
private TDampDwIndexService tDampDwIndexService;
|
|
private TDampDwIndexService tDampDwIndexService;
|
|
@Resource(name = "IndexDataThreadPool")
|
|
@Resource(name = "IndexDataThreadPool")
|
|
@@ -84,7 +83,7 @@ public class DWIndexFrameServiceImpl implements DWIndexFrameService {
|
|
// throw new ETAException(ErrorEnum.DW_INDEX_TABLE_CODE_GET_ERROR);
|
|
// throw new ETAException(ErrorEnum.DW_INDEX_TABLE_CODE_GET_ERROR);
|
|
synchronized (this) {
|
|
synchronized (this) {
|
|
if (!redisUtils.exist(ETAConstants.REDIS_INDEX_FRAME_TABLE_CODE_KEY)) {
|
|
if (!redisUtils.exist(ETAConstants.REDIS_INDEX_FRAME_TABLE_CODE_KEY)) {
|
|
- String maxTableCode = dwIndexFrameDao.getMaxTableCode();
|
|
|
|
|
|
+ String maxTableCode = indexFrameService.getMaxTableCode();
|
|
long maxData = maxTableCode == null ? 0L : Long.parseLong(maxTableCode.replaceAll(ETAConstants.INDEX_FRAME_TABLE_CODE_PREFIX, ""));
|
|
long maxData = maxTableCode == null ? 0L : Long.parseLong(maxTableCode.replaceAll(ETAConstants.INDEX_FRAME_TABLE_CODE_PREFIX, ""));
|
|
redisUtils.setNX(ETAConstants.REDIS_INDEX_FRAME_TABLE_CODE_KEY, maxData);
|
|
redisUtils.setNX(ETAConstants.REDIS_INDEX_FRAME_TABLE_CODE_KEY, maxData);
|
|
}
|
|
}
|