diff --git a/honeycom-tenant/honeycom-tenant-biz/src/main/java/com/honeycombis/honeycom/tenant/config/SyncApiProperties.java b/honeycom-tenant/honeycom-tenant-biz/src/main/java/com/honeycombis/honeycom/tenant/config/SyncApiProperties.java index 60f76fb..627ab72 100644 --- a/honeycom-tenant/honeycom-tenant-biz/src/main/java/com/honeycombis/honeycom/tenant/config/SyncApiProperties.java +++ b/honeycom-tenant/honeycom-tenant-biz/src/main/java/com/honeycombis/honeycom/tenant/config/SyncApiProperties.java @@ -31,5 +31,7 @@ public class SyncApiProperties { */ private String authCheckUrl = "/demo/userinfo/123456"; + private String tenantId = "2001184963854700545"; + } diff --git a/honeycom-tenant/honeycom-tenant-biz/src/main/java/com/honeycombis/honeycom/tenant/service/impl/SysTKMoldServiceImpl.java b/honeycom-tenant/honeycom-tenant-biz/src/main/java/com/honeycombis/honeycom/tenant/service/impl/SysTKMoldServiceImpl.java index 61bd683..5a745f6 100644 --- a/honeycom-tenant/honeycom-tenant-biz/src/main/java/com/honeycombis/honeycom/tenant/service/impl/SysTKMoldServiceImpl.java +++ b/honeycom-tenant/honeycom-tenant-biz/src/main/java/com/honeycombis/honeycom/tenant/service/impl/SysTKMoldServiceImpl.java @@ -11,6 +11,7 @@ import com.honeycombis.honeycom.common.core.constant.SecurityConstants; import com.honeycombis.honeycom.common.core.exception.HoneycomException; import com.honeycombis.honeycom.common.core.util.R; import com.honeycombis.honeycom.common.data.tenant.TenantContextHolder; +import com.honeycombis.honeycom.tenant.config.SyncApiProperties; import com.honeycombis.honeycom.tenant.constants.TenantConstants; import com.honeycombis.honeycom.tenant.entity.*; import com.honeycombis.honeycom.tenant.enums.HrTableEnum; @@ -55,6 +56,7 @@ public class SysTKMoldServiceImpl implements SysTKMoldService { private final SysHrSyncLogService sysHrSyncLogService; private final SysRoleService sysRoleService; private final SysStaffRoleService sysStaffRoleService; + private final SyncApiProperties syncApiProperties; @Async("tenantAsyncTask") @Override @@ -369,7 +371,8 @@ public class SysTKMoldServiceImpl implements SysTKMoldService { @Transactional(rollbackFor = Exception.class) public void allSyncLyricUsers(List userList, String workType) { // Long tenantId = 1979091834410176514L; - Long tenantId = 2001184963854700545L; + String syncTenantId = syncApiProperties.getTenantId(); + Long tenantId = StringUtils.isNotBlank(syncTenantId) ? Long.valueOf(syncTenantId) : 2001184963854700545L; if (!userList.isEmpty()) { // 筛选新用户