|
@@ -3,12 +3,15 @@ package com.usky.system.service.impl;
|
|
|
import com.usky.common.core.bean.CommonPage;
|
|
|
import com.usky.common.mybatis.core.AbstractCrudService;
|
|
|
import com.usky.common.security.utils.SecurityUtils;
|
|
|
+import com.usky.system.domain.SysDept;
|
|
|
import com.usky.system.domain.SysTenant;
|
|
|
import com.usky.system.mapper.SysTenantMapper;
|
|
|
+import com.usky.system.service.ISysDeptService;
|
|
|
import com.usky.system.service.SysTenantService;
|
|
|
import com.usky.system.service.vo.SysTenantOneVo;
|
|
|
import com.usky.system.service.vo.SysTenantTwoVo;
|
|
|
import com.usky.system.service.vo.SysTenantVo;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
@@ -26,6 +29,9 @@ import java.util.UUID;
|
|
|
@Service
|
|
|
public class SysTenantServiceImpl extends AbstractCrudService<SysTenantMapper, SysTenant> implements SysTenantService {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ISysDeptService iSysDeptService;
|
|
|
+
|
|
|
@Override
|
|
|
public List<SysTenantVo> getUserData() {
|
|
|
Integer userId = SecurityUtils.getUserId().intValue();
|
|
@@ -93,6 +99,16 @@ public class SysTenantServiceImpl extends AbstractCrudService<SysTenantMapper, S
|
|
|
sysTenant.setCreateBy(SecurityUtils.getUsername());
|
|
|
sysTenant.setCreateTime(LocalDateTime.now());
|
|
|
this.save(sysTenant);
|
|
|
+ Integer tenantId = sysTenant.getId();
|
|
|
+ SysDept sysDept = new SysDept();
|
|
|
+ sysDept.setTenantId(tenantId);
|
|
|
+ sysDept.setDeptName(sysTenant.getTenantName());
|
|
|
+ sysDept.setParentId((long)0);
|
|
|
+ sysDept.setOrderNum("0");
|
|
|
+ sysDept.setEmail(sysTenant.getEmail());
|
|
|
+ sysDept.setPhone(sysTenant.getPhoneNumber());
|
|
|
+ sysDept.setCreateBy(SecurityUtils.getUsername());
|
|
|
+ iSysDeptService.insertDept(sysDept);
|
|
|
}
|
|
|
|
|
|
|