liupeng 4 years ago
parent
commit
24c2f737ac

+ 0 - 9
code/sapparent/sapservice/src/main/java/org/fouram/service/SyncSapUserToWxService.java

@@ -17,11 +17,7 @@ import org.springframework.transaction.annotation.Transactional;
 public class SyncSapUserToWxService extends BaseService {
 public class SyncSapUserToWxService extends BaseService {
 
 
 	@Autowired
 	@Autowired
-	private WxUserService wxUserService;
-	@Autowired
 	private SapUserService sapUserService;
 	private SapUserService sapUserService;
-	@Autowired
-	private WxDepartService wxDepartService;
 
 
 	@Transactional
 	@Transactional
 	public SyncWeixinUserOutput syncWeixinUser() throws Exception {
 	public SyncWeixinUserOutput syncWeixinUser() throws Exception {
@@ -44,13 +40,8 @@ public class SyncSapUserToWxService extends BaseService {
 		return SyncWeixinUserOutput.builder().state("正在同步,请稍等").build();
 		return SyncWeixinUserOutput.builder().state("正在同步,请稍等").build();
 	}
 	}
 
 
-	@Transactional
 	public void taskBiz() throws Exception {
 	public void taskBiz() throws Exception {
 		WebConstants.CACHE.put(WebConstants.CACHE_SYNC_SAP, DateUtil.getTime());
 		WebConstants.CACHE.put(WebConstants.CACHE_SYNC_SAP, DateUtil.getTime());
-		// 更新微信部门
-		wxDepartService.saveWxDeparts();
-		// 更新微信用户
-		wxUserService.saveWxUsers();
 		// 更新所有数据无效
 		// 更新所有数据无效
 		sapUserService.updateAllDelFlag(DelFlagEnum.UNABLE.getCode());
 		sapUserService.updateAllDelFlag(DelFlagEnum.UNABLE.getCode());
 		// 保存SAP用户数据-数据没变化的result状态保持不变
 		// 保存SAP用户数据-数据没变化的result状态保持不变

+ 5 - 1
code/sapparent/sapservice/src/main/java/org/fouram/service/WxUserService.java

@@ -118,6 +118,10 @@ public class WxUserService extends BaseService {
 				sb.append(wxUserDepart.getFullDepartName()).append(";");
 				sb.append(wxUserDepart.getFullDepartName()).append(";");
 			}
 			}
 		}
 		}
-		return sb.substring(0, sb.length() - 1);
+		if(sb.length() > 0) {
+			return sb.substring(0, sb.length() - 1);
+		} else {
+			return sb.toString();
+		}
 	}
 	}
 }
 }