Bladeren bron

支持redisson的集群部署

kobe6258 2 weken geleden
bovenliggende
commit
6ee5586d2a

+ 2 - 2
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/service/impl/TDampLinkService.java

@@ -66,9 +66,9 @@ public class TDampLinkService {
             linkFieldMap.put(field.getFiledType(), field);
             linkFieldMap.put(field.getFiledType(), field);
         }
         }
         //设置已经同步的指标
         //设置已经同步的指标
-        List<TDampDwIndexLink> indexLinks = tDampDwIndexLinkService.queryAll();
+        List<TDampDwIndexLink> indexLinks = tDampDwIndexLinkService.queryAll(linkInfo.getLinkPrefix());
         indexLinks.forEach(indexLink -> {
         indexLinks.forEach(indexLink -> {
-            int uniqueId = Integer.parseInt(indexLink.getLinkCode().substring(indexLink.getLinkCode().indexOf("ETA") + 3));
+            int uniqueId = Integer.parseInt(indexLink.getLinkCode().substring(indexLink.getLinkCode().indexOf(linkInfo.getLinkPrefix()) + 3));
             redisUtils.setBit(redisUtils.indexSyncKey(), uniqueId, true);
             redisUtils.setBit(redisUtils.indexSyncKey(), uniqueId, true);
             log.info("对接码:{}对应指标数据已同步,不在进行同步处理,指标编码{}", indexLink.getLinkCode(), indexLink.getIndexCode());
             log.info("对接码:{}对应指标数据已同步,不在进行同步处理,指标编码{}", indexLink.getLinkCode(), indexLink.getIndexCode());
         });
         });

+ 1 - 1
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/mapper/TDampDwIndexLinkDao.java

@@ -29,6 +29,6 @@ public interface TDampDwIndexLinkDao {
     int insert(@Param("entity") TDampDwIndexLink tDampDwIndexLink);
     int insert(@Param("entity") TDampDwIndexLink tDampDwIndexLink);
 
 
 
 
-    List<TDampDwIndexLink> queryAll();
+    List<TDampDwIndexLink> queryAll(@Param("prefix") String prefix);
 }
 }
 
 

+ 1 - 1
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/service/TDampDwIndexLinkService.java

@@ -21,5 +21,5 @@ public interface TDampDwIndexLinkService {
     TDampDwIndexLink insert(TDampDwIndexLink tDampDwIndexLink);
     TDampDwIndexLink insert(TDampDwIndexLink tDampDwIndexLink);
 
 
 
 
-    List<TDampDwIndexLink> queryAll();
+    List<TDampDwIndexLink> queryAll(String perfix);
 }
 }

+ 2 - 2
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/service/impl/TDampDwIndexLinkServiceImpl.java

@@ -35,8 +35,8 @@ public class TDampDwIndexLinkServiceImpl implements TDampDwIndexLinkService {
     }
     }
 
 
     @Override
     @Override
-    public List<TDampDwIndexLink> queryAll() {
-        return tDampDwIndexLinkDao.queryAll();
+    public List<TDampDwIndexLink> queryAll(String prefix) {
+        return tDampDwIndexLinkDao.queryAll(prefix);
     }
     }
 
 
 }
 }

+ 4 - 6
qhtx-eta-integrator/qhtx-integrator-infra/src/main/resources/mapper/ETAClassifyIndexFrameMappingDao.xml

@@ -23,8 +23,7 @@
             #{item.classifyName,jdbcType=VARCHAR} AS CLASSIFY_NAME,
             #{item.classifyName,jdbcType=VARCHAR} AS CLASSIFY_NAME,
             #{item.parentId,jdbcType=VARCHAR} AS PARENT_ID,
             #{item.parentId,jdbcType=VARCHAR} AS PARENT_ID,
             #{item.sort,jdbcType=INTEGER} AS SORT,
             #{item.sort,jdbcType=INTEGER} AS SORT,
-            #{item.frameLevel,jdbcType=VARCHAR} AS FRAME_LEVEL,
-            #{item.createTime,jdbcType=TIMESTAMP} AS CREATE_TIME
+            #{item.frameLevel,jdbcType=VARCHAR} AS FRAME_LEVEL
             FROM dual
             FROM dual
         </foreach>
         </foreach>
         ) s ON (t.CLASSIFY_ID = s.CLASSIFY_ID)
         ) s ON (t.CLASSIFY_ID = s.CLASSIFY_ID)
@@ -32,13 +31,12 @@
         UPDATE SET
         UPDATE SET
         t.classify_name = s.classify_name,
         t.classify_name = s.classify_name,
         t.parent_id = s.parent_id,
         t.parent_id = s.parent_id,
-        t.sort=s.sort,
-        t.update_time=SYSDATE
+        t.sort=s.sort
         WHEN NOT MATCHED THEN
         WHEN NOT MATCHED THEN
         INSERT
         INSERT
-        (CLASSIFY_ID,INDEX_FRAME_ID,CLASSIFY_NAME,PARENT_ID,SORT,FRAME_LEVEL,UNIQUE_CODE,CREATE_TIME)
+        (CLASSIFY_ID,INDEX_FRAME_ID,CLASSIFY_NAME,PARENT_ID,SORT,FRAME_LEVEL,UNIQUE_CODE)
         VALUES
         VALUES
-        (s.CLASSIFY_ID,s.INDEX_FRAME_ID,s.CLASSIFY_NAME,s.PARENT_ID,s.SORT,s.FRAME_LEVEL,s.UNIQUE_CODE,s.CREATE_TIME)
+        (s.CLASSIFY_ID,s.INDEX_FRAME_ID,s.CLASSIFY_NAME,s.PARENT_ID,s.SORT,s.FRAME_LEVEL,s.UNIQUE_CODE)
     </update>
     </update>
 
 
     <select id="getClassifyMappingList" resultMap="EtaClassifyIndexFrameMappingMap">
     <select id="getClassifyMappingList" resultMap="EtaClassifyIndexFrameMappingMap">

+ 1 - 1
qhtx-eta-integrator/qhtx-integrator-infra/src/main/resources/mapper/TDampDwIndexLinkDao.xml

@@ -44,7 +44,7 @@
     </insert>
     </insert>
 <select id="queryAll" resultMap="TDampDwIndexLinkMap">
 <select id="queryAll" resultMap="TDampDwIndexLinkMap">
     select INDEX_CODE, LINK_CODE
     select INDEX_CODE, LINK_CODE
-    from T_DAMP_DW_INDEX_LINK
+    from T_DAMP_DW_INDEX_LINK where  LINK_CODE LIKE  #{prefix} || '%'
 </select>
 </select>
 </mapper>
 </mapper>
 
 

+ 2 - 2
qhtx-eta-integrator/qhtx-integrator-infra/src/main/resources/mapper/TDampDwLinkDataDao.xml

@@ -46,7 +46,7 @@
     <!--统计总行数-->
     <!--统计总行数-->
     <select id="count" resultType="Long">
     <select id="count" resultType="Long">
         select count(1)
         select count(1)
-        from T_DAMP_DW_LINK_DATA
+        from T_DAMP_DW_LINK_DATA where LINK_CODE like 'ETA%'
     </select>
     </select>
 
 
 
 
@@ -59,7 +59,7 @@
                LINK_FILED_IDS,
                LINK_FILED_IDS,
                ELEMENT_VAL,
                ELEMENT_VAL,
                ELEMENT_NAME
                ELEMENT_NAME
-        from T_DAMP_DW_LINK_DATA
+        from T_DAMP_DW_LINK_DATA  where LINK_CODE like 'ETA%'
     </select>
     </select>
 
 
 </mapper>
 </mapper>