Explorar el Código

安阳数据同步

qin hace 10 meses
padre
commit
a41bbd6b8f

+ 3 - 3
src/main/java/com/poteviohealth/cgp/statistics/mapper/OrderMapper.java

@@ -238,7 +238,7 @@ public interface OrderMapper extends BaseMapper<Order>{
 
 
     @SqlParser(filter = true)
-    int goldSendListSize(@Param(Constants.WRAPPER) Wrapper wrapper, @Param("dbName") String dbName);
+    int goldSendListSize(@Param("yearTime") Integer yearTime,@Param(Constants.WRAPPER) Wrapper wrapper, @Param("dbName") String dbName);
 
     /**
      * excel
@@ -246,7 +246,7 @@ public interface OrderMapper extends BaseMapper<Order>{
      * @return
      */
     @SqlParser(filter=true)
-    LinkedList<GoldSendExcelDTO> goldSendList(@Param(Constants.WRAPPER) Wrapper wrapper,@Param("dbName") String dbName, @Param("start")Integer start);
+    LinkedList<GoldSendExcelDTO> goldSendList(@Param("yearTime") Integer yearTime,@Param(Constants.WRAPPER) Wrapper wrapper,@Param("dbName") String dbName, @Param("start")Integer start);
 
     /**
      * excel
@@ -254,6 +254,6 @@ public interface OrderMapper extends BaseMapper<Order>{
      * @return
      */
     @SqlParser(filter=true)
-    LinkedList<GoldSendBankExcelDTO> goldSendBankList(@Param(Constants.WRAPPER) Wrapper wrapper,@Param("dbName") String dbName, @Param("start")Integer start);
+    LinkedList<GoldSendBankExcelDTO> goldSendBankList(@Param("yearTime") Integer yearTime,@Param(Constants.WRAPPER) Wrapper wrapper,@Param("dbName") String dbName, @Param("start")Integer start);
 
 }

+ 4 - 4
src/main/java/com/poteviohealth/cgp/statistics/service/impl/OrderServiceImpl.java

@@ -320,13 +320,13 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implem
     public List<GoldSendExcelDTO> excelGoldSendList(GoldSendPage vo) {
         try {
             QueryWrapper queryWrapper = getQueryWrapper(vo);
-            int  count = baseMapper.goldSendListSize(queryWrapper,dbName);
+            int  count = baseMapper.goldSendListSize(vo.getYearTime(),queryWrapper,dbName);
             //每页10000条,计算总页数
             int maxPage = (int) Math.ceil(count/10000.0);
             int start = 0;
             LinkedList<GoldSendExcelDTO> list = Lists.newLinkedList();
             for (int i = 0; i < maxPage; i++) {
-                LinkedList<GoldSendExcelDTO> findList = baseMapper.goldSendList(queryWrapper,dbName,start);
+                LinkedList<GoldSendExcelDTO> findList = baseMapper.goldSendList(vo.getYearTime(),queryWrapper,dbName,start);
                 start = findList.getLast().getId();
                 list.addAll(findList);
             }
@@ -381,13 +381,13 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implem
     public List<GoldSendBankExcelDTO> excelGoldSendBankList(GoldSendPage page) {
         try {
             QueryWrapper queryWrapper = getQueryWrapper(page);
-            int  count = baseMapper.goldSendListSize(queryWrapper,dbName);
+            int  count = baseMapper.goldSendListSize(page.getYearTime(),queryWrapper,dbName);
             //每页10000条,计算总页数
             int maxPage = (int) Math.ceil(count/10000.0);
             int start = 0;
             LinkedList<GoldSendBankExcelDTO> list = Lists.newLinkedList();
             for (int i = 0; i < maxPage; i++) {
-                LinkedList<GoldSendBankExcelDTO> findList = baseMapper.goldSendBankList(queryWrapper,dbName,start);
+                LinkedList<GoldSendBankExcelDTO> findList = baseMapper.goldSendBankList(page.getYearTime(),queryWrapper,dbName,start);
                 start = findList.getLast().getId();
                 list.addAll(findList);
             }

+ 3 - 3
src/main/resources/mapper/statistics/OrderMapper.xml

@@ -510,7 +510,7 @@
 
     <select id="goldSendListSize" resultType="int">
         select count(*)
-        from ${dbName}_customer.c_gold_send d where d.yn = 0
+        from ${dbName}_customer.c_gold_send_${yearTime} d where d.yn = 0
         and  ${ew.sqlSegment}
     </select>
 
@@ -528,7 +528,7 @@
         case when d.gold_type = 0 then '80-89周岁'
              when d.gold_type = 1 then '90-99周岁'
              when d.gold_type = 2 then '100周岁以上' end as goldTypeStr
-        from ${dbName}_customer.c_gold_send d
+        from ${dbName}_customer.c_gold_send_${yearTime} d
         where d.yn = 0
         and d.id > #{start}
         and  ${ew.sqlSegment}
@@ -539,7 +539,7 @@
     <select id="goldSendBankList" resultType="com.poteviohealth.cgp.statistics.model.outdto.GoldSendBankExcelDTO">
         select d.id,d.name,d.id_number,'1' as idNumberType,TRUNCATE(d.money/100,2) as moneyStr,d.area_code,d.link_mobile,
                d.now_address,d.bank_code,d.bank_card,d.bank_holder
-        from ${dbName}_customer.c_gold_send d
+        from ${dbName}_customer.c_gold_send_${yearTime} d
         where d.yn = 0
           and d.id > #{start}
           and  ${ew.sqlSegment}