fix:新增租户同步spdm data服务数据
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package com.honeycombis.honeycom.tenant.feign;
|
||||
|
||||
import com.honeycombis.honeycom.common.core.constant.ServiceNameConstants;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
|
||||
|
||||
@FeignClient(contextId = "remoteSpdmTenantService", value = ServiceNameConstants.SPDM_SERVICE)
|
||||
public interface RemoteSpdmService {
|
||||
|
||||
@PostMapping("/honeycom-spdm/spdm-tenant/initNewTenant")
|
||||
void initNewTenant(@RequestParam Long tenantId);
|
||||
}
|
||||
@@ -25,6 +25,7 @@ import com.honeycombis.honeycom.tenant.dto.SysInviteSendDTO;
|
||||
import com.honeycombis.honeycom.tenant.dto.SysTenantAddDTO;
|
||||
import com.honeycombis.honeycom.tenant.dto.SysTenantUpdateDTO;
|
||||
import com.honeycombis.honeycom.tenant.entity.*;
|
||||
import com.honeycombis.honeycom.tenant.feign.RemoteSpdmService;
|
||||
import com.honeycombis.honeycom.tenant.mapper.SysTenantMapper;
|
||||
import com.honeycombis.honeycom.tenant.service.*;
|
||||
import com.honeycombis.honeycom.tenant.utils.BeanUtils;
|
||||
@@ -74,6 +75,7 @@ public class SysTenantServiceImpl extends ServiceImpl<SysTenantMapper, SysTenant
|
||||
|
||||
private final SysRoleFunctionService sysRoleFunctionService;
|
||||
private final RemoteMessageService remoteMessageService;
|
||||
private final RemoteSpdmService remoteSpdmService;
|
||||
|
||||
/**
|
||||
* 根据员工id查询所属租户
|
||||
@@ -280,6 +282,8 @@ public class SysTenantServiceImpl extends ServiceImpl<SysTenantMapper, SysTenant
|
||||
SysTenantVO sysTenantVO = new SysTenantVO(entity);
|
||||
// 初始化租户消息模板
|
||||
remoteMessageService.initTenantMessageConfig(entity.getTenantId(),SecurityConstants.FROM_IN);
|
||||
// 通知spdm初始化租户桶
|
||||
remoteSpdmService.initNewTenant(entity.getTenantId());
|
||||
return sysTenantVO;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user