|
@@ -4,6 +4,7 @@ import java.text.SimpleDateFormat;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.boman.common.core.utils.DateUtils;
|
|
|
import com.boman.common.core.utils.SecurityUtils;
|
|
|
import com.boman.common.core.utils.StringUtils;
|
|
@@ -13,7 +14,7 @@ import com.boman.web.core.domain.VaccineInfoUser;
|
|
|
import com.boman.web.core.mapper.VaccineInfoOperationMapper;
|
|
|
import com.boman.web.core.mapper.VaccineInfoUserMapper;
|
|
|
import com.boman.web.core.service.vaccineInfo.IVaccineInfoService;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.boman.web.core.mapper.VaccineInfoMapper;
|
|
|
import org.springframework.transaction.annotation.Isolation;
|
|
@@ -41,6 +42,34 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
|
|
|
@Resource
|
|
|
private VaccineInfoUserMapper vaccineInfoUserMapper;
|
|
|
|
|
|
+ public void syncData() {
|
|
|
+ int count = vaccineInfoMapper.selectCount();
|
|
|
+ int times = count / 1000;
|
|
|
+ int startPage = 0;
|
|
|
+ int endPage = 1000;
|
|
|
+ for (int i = 0;i < times + 1;i++) {
|
|
|
+ List<VaccineInfoOperation> list = vaccineInfoMapper.selectVaccineInfoListByPage(startPage, endPage);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ startPage += 1000;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private void save(List<VaccineInfoOperation> list) {
|
|
|
+ for(VaccineInfoOperation operation : list) {
|
|
|
+ vaccineInfoMapper.insertVaccineInfo(operation);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public static void main(String[] args) {
|
|
|
+ int count = 581208;
|
|
|
+ int times = count / 1000;
|
|
|
+ System.out.println(times);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 查询疫苗信息
|
|
|
*
|