From 6ef869b1adcf3a5bb8e4c3117dc507d173f13fd8 Mon Sep 17 00:00:00 2001 From: liukangdong <898885815@qq.com> Date: 星期三, 18 九月 2024 15:19:55 +0800 Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit --- server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncEmpowerServiceImpl.java | 27 ++++++++++----------------- 1 files changed, 10 insertions(+), 17 deletions(-) diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncEmpowerServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncEmpowerServiceImpl.java index 8223921..cfaa688 100644 --- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncEmpowerServiceImpl.java +++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncEmpowerServiceImpl.java @@ -28,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.Date; @@ -57,6 +58,7 @@ */ @Override public Integer syncEmpowerDetailData(Integer endId){ + log.error(""); // if(Constants.DEALING_HK_EMPOWER_DETAIL){ // return ; // } @@ -435,7 +437,12 @@ Thread t1=new Thread(new Runnable() { @Override public void run() { - dealAllListTask(allList); + try { + dealAllListTask(allList); + }catch (Exception e){ + log.info("======================涓嬪彂鎺堟潈寮傚父锛�"+e.getMessage()); + e.printStackTrace(); + } } }); t1.start(); @@ -524,21 +531,7 @@ } } - public class TaskRuner implements Runnable{ - private List<Empower> list ; - @Override - public void run() { - dealNewListTask(list); - } - - public List<Empower> getList() { - return list; - } - - public void setList(List<Empower> list) { - this.list = list; - } - } + @Transactional(rollbackFor = {BusinessException.class,Exception.class}) private void dealAllListTask(List<Empower> list) { //鎸夌収鐖剁骇鐢宠鍒嗘壒澶勭悊姣忔鐢宠鏁版嵁 if(list ==null || list.size()==0){ @@ -577,7 +570,7 @@ continue; } HKConstants.OPERA_TYPE flag = HKConstants.OPERA_TYPE.ADD; - if(Constants.equalsObject(c.getIsdeleted(),Constants.ONE)){ + if(Constants.equalsInteger(c.getIsdeleted(),Constants.ONE)){ flag = HKConstants.OPERA_TYPE.DEL; } if(addTaskData(c,taskId,flag.getKey())){ -- Gitblit v1.9.3