tjf 3 jaren geleden
bovenliggende
commit
6b142e2ffa

+ 10 - 10
boman-web-core/src/main/java/com/boman/web/core/controller/TestController.java

@@ -92,15 +92,15 @@ public class TestController {
     @PostMapping("/setCzrk")
     public AjaxResult setCzrk() {
         //587731
-        for (int i = 0; i < 59; i++) {
-            int startPage = i * 10000;
-            int endPage = 10000;
-            List<VaccineInfoOperation> vaccineInfoOperations = mapper.selectVaccineInfoListByPage(startPage, endPage);
-            if (vaccineInfoOperations.size() > 0) {
-                for (VaccineInfoOperation vaccineInfoOperation : vaccineInfoOperations) {
-                    if (vaccineInfoOperation != null) {
-                        Czrk czrk = new Czrk();
-                        czrk.setUserName(vaccineInfoOperation.getUserName());
+        int id = 593843;
+        List<VaccineInfoOperation> vaccineInfoOperations = mapper.selectVaccineInfoListById(id);
+        if (vaccineInfoOperations.size() > 0) {
+            for (VaccineInfoOperation vaccineInfoOperation : vaccineInfoOperations) {
+                if (vaccineInfoOperation != null) {
+                    Czrk czrk = new Czrk();
+                    String userName = vaccineInfoOperation.getUserName();
+                    if (!userName.contains("测试") && userName.length() < 5) {
+                        czrk.setUserName(userName);
                         czrk.setGender(vaccineInfoOperation.getGender());
                         czrk.setAge(vaccineInfoOperation.getAge());
                         czrk.setBirthday(vaccineInfoOperation.getBirthday());
@@ -268,7 +268,7 @@ public class TestController {
                     }
                 }
             }
-            System.out.println("处理完成" + startPage + "数据");
+            //System.out.println("处理完成" + startPage + "数据");
         }
         return AjaxResult.success("全部完成");
     }

+ 1 - 0
boman-web-core/src/main/java/com/boman/web/core/mapper/VaccineInfoMapper.java

@@ -43,6 +43,7 @@ public interface VaccineInfoMapper
 
 
     public List<VaccineInfoOperation> selectVaccineInfoListByPage(@Param("startNum") int startNum, @Param("endNum") int endNum);
+    public List<VaccineInfoOperation> selectVaccineInfoListById(@Param("id") int id);
 
 
     /**

+ 4 - 0
boman-web-core/src/main/resources/mapper/VaccineInfoMapper.xml

@@ -514,6 +514,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select * from vaccine_info limit   #{startNum}, #{endNum}
     </select>
 
+    <select id="selectVaccineInfoListById" parameterType="Integer" resultMap="VaccineInfoResult">
+        select * from vaccine_info where id > #{id}
+    </select>
+
     <select id="handleData" resultMap="VaccineInfoResult">
         SELECT (DATE_FORMAT(substring(t.id_card, 7, 8), "%Y-%m-%d")) AS birthday
             , ((YEAR(now())) - (YEAR(substring(t.id_card, 7, 8)))) AS age