|
@@ -15,7 +15,9 @@ import com.bizmatics.service.util.SecurityUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.time.LocalDateTime;
|
|
|
import java.util.List;
|
|
|
+import java.util.UUID;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -71,7 +73,24 @@ public class SysTenantServiceImpl extends AbstractCrudService<SysTenantMapper, S
|
|
|
return new CommonPage<>(list, total, sysTenantOneVo.getSize(), sysTenantOneVo.getPage());
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
public void addTenantData(SysTenant sysTenant){
|
|
|
+ SysUser user = SecurityUtils.getLoginUser().getUser();
|
|
|
+ String uuid = UUID.randomUUID().toString();
|
|
|
+ uuid=uuid.replace("-", "");
|
|
|
+ sysTenant.setTenantCode(uuid);
|
|
|
+ sysTenant.setStatus("0");
|
|
|
+ sysTenant.setCreateBy(user.getUserName());
|
|
|
+ sysTenant.setCreateTime(LocalDateTime.now());
|
|
|
+ this.save(sysTenant);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void updateTenantData(SysTenant sysTenant){
|
|
|
+ SysUser user = SecurityUtils.getLoginUser().getUser();
|
|
|
+ sysTenant.setUpdateBy(user.getUserName());
|
|
|
+ sysTenant.setUpdateTime(LocalDateTime.now());
|
|
|
this.updateById(sysTenant);
|
|
|
}
|
|
|
}
|