feat(): 拆分多数据源模块,远程调用系统服务
parent
a5d1d43a03
commit
18914f5b70
|
@ -0,0 +1,38 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-common</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>muyu-common-saas</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
<description>
|
||||||
|
SaaS多数据源模块
|
||||||
|
</description>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-common-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>druid</artifactId>
|
||||||
|
<version>1.2.20</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-webmvc</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.many.datasource.config.contents;
|
package com.muyu.saas.contents;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongZl
|
* @author DongZl
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.many.datasource.config.contents;
|
package com.muyu.saas.contents;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SaaS常量 SaaSConstant
|
* SaaS常量 SaaSConstant
|
|
@ -1,16 +1,15 @@
|
||||||
package com.muyu.many.datasource.config;
|
package com.muyu.saas.datasource;
|
||||||
|
|
||||||
import com.alibaba.druid.pool.DruidDataSource;
|
import com.alibaba.druid.pool.DruidDataSource;
|
||||||
import com.muyu.common.core.utils.SpringUtils;
|
import com.muyu.common.core.utils.SpringUtils;
|
||||||
import com.muyu.many.datasource.config.domain.model.DataSourceInfo;
|
|
||||||
import com.muyu.many.datasource.config.domain.model.EnterPriseInfo;
|
import com.muyu.saas.domain.model.DataSourceInfo;
|
||||||
import com.muyu.many.datasource.config.factory.DruidDataSourceFactory;
|
import com.muyu.saas.domain.model.EnterPriseInfo;
|
||||||
import com.muyu.many.datasource.config.role.DynamicDataSource;
|
import com.muyu.saas.factory.DruidDataSourceFactory;
|
||||||
|
import com.muyu.saas.role.DynamicDataSource;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.context.annotation.Primary;
|
import org.springframework.context.annotation.Primary;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@ -40,9 +39,9 @@ public class ManyDataSource {
|
||||||
DruidDataSourceFactory druidDataSourceFactory= SpringUtils.getBean(DruidDataSourceFactory.class);
|
DruidDataSourceFactory druidDataSourceFactory= SpringUtils.getBean(DruidDataSourceFactory.class);
|
||||||
DynamicDataSource dynamicDataSource= SpringUtils.getBean(DynamicDataSource.class);
|
DynamicDataSource dynamicDataSource= SpringUtils.getBean(DynamicDataSource.class);
|
||||||
EnterPriseInfo enterPriseInfo = EnterPriseInfo.builder()
|
EnterPriseInfo enterPriseInfo = EnterPriseInfo.builder()
|
||||||
.entCode("liu_0603")
|
.entCode("liu_0605")
|
||||||
.ip("192.168.116.129")
|
.ip("192.168.116.129")
|
||||||
.port(3308)
|
.port(3309)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
DataSourceInfo dataSourceInfo = DataSourceInfo.hostAndPortBuild(enterPriseInfo.getEntCode(), enterPriseInfo.getIp(), enterPriseInfo.getPort());
|
DataSourceInfo dataSourceInfo = DataSourceInfo.hostAndPortBuild(enterPriseInfo.getEntCode(), enterPriseInfo.getIp(), enterPriseInfo.getPort());
|
|
@ -1,14 +1,13 @@
|
||||||
package com.muyu.many.datasource.config.domain.model;
|
package com.muyu.saas.domain.model;
|
||||||
|
|
||||||
|
|
||||||
import com.muyu.common.core.utils.StringUtils;
|
import com.muyu.common.core.utils.StringUtils;
|
||||||
|
import com.muyu.saas.contents.DatasourceContent;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import static com.muyu.many.datasource.config.contents.DatasourceContent.*;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DongZl
|
* @author DongZl
|
||||||
|
@ -45,9 +44,9 @@ public class DataSourceInfo {
|
||||||
public static DataSourceInfo hostAndPortBuild(String key,String host, Integer port){
|
public static DataSourceInfo hostAndPortBuild(String key,String host, Integer port){
|
||||||
return DataSourceInfo.builder()
|
return DataSourceInfo.builder()
|
||||||
.key(key)
|
.key(key)
|
||||||
.url(StringUtils.format(DATASOURCE_URL, host, port,port))
|
.url(StringUtils.format(DatasourceContent.DATASOURCE_URL, host, port,port))
|
||||||
.password(PASSWORD)
|
.password(DatasourceContent.PASSWORD)
|
||||||
.userName(USER_NAME)
|
.userName(DatasourceContent.USER_NAME)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.many.datasource.config.domain.model;
|
package com.muyu.saas.domain.model;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.many.datasource.config.exception;
|
package com.muyu.saas.exception;
|
||||||
|
|
||||||
import com.muyu.common.core.exception.ServiceException;
|
import com.muyu.common.core.exception.ServiceException;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.muyu.many.datasource.config.factory;
|
package com.muyu.saas.factory;
|
||||||
|
|
||||||
import com.alibaba.druid.pool.DruidDataSource;
|
import com.alibaba.druid.pool.DruidDataSource;
|
||||||
import com.muyu.many.datasource.config.domain.model.DataSourceInfo;
|
import com.muyu.saas.domain.model.DataSourceInfo;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.many.datasource.config.holder;
|
package com.muyu.saas.holder;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
|
@ -1,11 +1,11 @@
|
||||||
package com.muyu.many.datasource.config.interceptor;
|
package com.muyu.saas.interceptor;
|
||||||
|
|
||||||
import com.muyu.common.core.utils.ServletUtils;
|
import com.muyu.common.core.utils.ServletUtils;
|
||||||
import com.muyu.common.core.utils.SpringUtils;
|
import com.muyu.common.core.utils.SpringUtils;
|
||||||
import com.muyu.many.datasource.config.contents.SaaSConstant;
|
import com.muyu.saas.contents.SaaSConstant;
|
||||||
import com.muyu.many.datasource.config.exception.SaaSException;
|
import com.muyu.saas.exception.SaaSException;
|
||||||
import com.muyu.many.datasource.config.holder.DynamicDataSourceHolder;
|
import com.muyu.saas.holder.DynamicDataSourceHolder;
|
||||||
import com.muyu.many.datasource.config.role.DynamicDataSource;
|
import com.muyu.saas.role.DynamicDataSource;
|
||||||
import org.springframework.web.method.HandlerMethod;
|
import org.springframework.web.method.HandlerMethod;
|
||||||
import org.springframework.web.servlet.AsyncHandlerInterceptor;
|
import org.springframework.web.servlet.AsyncHandlerInterceptor;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.many.datasource.config.interceptor;
|
package com.muyu.saas.interceptor;
|
||||||
|
|
||||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
@ -1,7 +1,7 @@
|
||||||
package com.muyu.many.datasource.config.role;
|
package com.muyu.saas.role;
|
||||||
|
|
||||||
import com.alibaba.druid.pool.DruidDataSource;
|
import com.alibaba.druid.pool.DruidDataSource;
|
||||||
import com.muyu.many.datasource.config.holder.DynamicDataSourceHolder;
|
import com.muyu.saas.holder.DynamicDataSourceHolder;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
|
@ -0,0 +1,4 @@
|
||||||
|
com.muyu.saas.interceptor.WebMvcSaaSConfig
|
||||||
|
com.muyu.saas.factory.DruidDataSourceFactory
|
||||||
|
com.muyu.saas.datasource.ManyDataSource
|
||||||
|
com.muyu.saas.domain.model.EnterPriseInfo
|
|
@ -18,6 +18,7 @@
|
||||||
<module>muyu-common-datascope</module>
|
<module>muyu-common-datascope</module>
|
||||||
<module>muyu-common-datasource</module>
|
<module>muyu-common-datasource</module>
|
||||||
<module>muyu-common-system</module>
|
<module>muyu-common-system</module>
|
||||||
|
<module>muyu-common-saas</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<artifactId>muyu-common</artifactId>
|
<artifactId>muyu-common</artifactId>
|
||||||
|
|
|
@ -84,7 +84,11 @@
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.muyu</groupId>
|
||||||
<artifactId>muyu-common-swagger</artifactId>
|
<artifactId>muyu-common-swagger</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-common-saas</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
package com.muyu.customer.business;
|
package com.muyu.customer.business;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration;
|
||||||
import com.muyu.common.security.annotation.EnableCustomConfig;
|
import com.muyu.common.security.annotation.EnableCustomConfig;
|
||||||
import com.muyu.common.security.annotation.EnableMyFeignClients;
|
import com.muyu.common.security.annotation.EnableMyFeignClients;
|
||||||
import com.muyu.common.swagger.annotation.EnableCustomSwagger2;
|
import com.muyu.common.swagger.annotation.EnableCustomSwagger2;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 车联网客户业务系统启动类 MuYuCustomerBusinessApplication
|
* 车联网客户业务系统启动类 MuYuCustomerBusinessApplication
|
||||||
|
|
|
@ -3,6 +3,8 @@ package com.muyu.customer.business.controller;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.muyu.customer.business.mapper.VehicleMapper;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
@ -108,4 +110,12 @@ public class VehicleController extends BaseController {
|
||||||
public Result<String> remove(@PathVariable List<Long> ids) {
|
public Result<String> remove(@PathVariable List<Long> ids) {
|
||||||
return toAjax(vehicleService.removeBatchByIds(ids));
|
return toAjax(vehicleService.removeBatchByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private VehicleMapper vehicleMapper;
|
||||||
|
|
||||||
|
@GetMapping("/list/all")
|
||||||
|
public Result<List<Vehicle>> findAll () {
|
||||||
|
return Result.success(vehicleMapper.selectList(new QueryWrapper<>()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,12 +2,10 @@ package com.muyu.many.datasource.controller;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.many.datasource.config.holder.DynamicDataSourceHolder;
|
|
||||||
import com.muyu.many.datasource.domain.Vehicle;
|
import com.muyu.many.datasource.domain.Vehicle;
|
||||||
import com.muyu.many.datasource.mapper.VehicleMapper;
|
import com.muyu.many.datasource.mapper.VehicleMapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
com.muyu.many.datasource.config.interceptor.WebMvcSaaSConfig
|
|
|
@ -16,5 +16,19 @@
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-openfeign-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-common-security</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-common-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.muyu.net.working.feign;
|
||||||
|
|
||||||
|
import com.muyu.common.core.domain.Result;
|
||||||
|
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||||
|
import com.muyu.common.system.domain.SysDept;
|
||||||
|
import com.muyu.common.system.domain.SysUser;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户添加远程调用 UserFeign
|
||||||
|
*
|
||||||
|
* @author DeKangLiu
|
||||||
|
* Date 2024/6/6 09:06
|
||||||
|
*/
|
||||||
|
@FeignClient("muyu-system/dept")
|
||||||
|
public interface DeptFeign {
|
||||||
|
|
||||||
|
@RequiresPermissions("system:dept:add")
|
||||||
|
@PostMapping
|
||||||
|
public Result add (@Validated @RequestBody SysDept dept);
|
||||||
|
|
||||||
|
@RequiresPermissions("system:dept:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public Result list (SysDept dept);
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.muyu.net.working.feign;
|
||||||
|
|
||||||
|
import com.muyu.common.core.domain.Result;
|
||||||
|
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||||
|
import com.muyu.common.system.domain.SysDept;
|
||||||
|
import com.muyu.common.system.domain.SysUser;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户添加远程调用 UserFeign
|
||||||
|
*
|
||||||
|
* @author DeKangLiu
|
||||||
|
* Date 2024/6/6 09:06
|
||||||
|
*/
|
||||||
|
@FeignClient("muyu-system/user")
|
||||||
|
public interface UserFeign {
|
||||||
|
@RequiresPermissions("system:user:add")
|
||||||
|
@PostMapping("")
|
||||||
|
public Result add (@Validated @RequestBody SysUser user);
|
||||||
|
}
|
|
@ -18,7 +18,11 @@
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-net-working-remote</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.muyu</groupId>
|
||||||
<artifactId>muyu-net-working-common</artifactId>
|
<artifactId>muyu-net-working-common</artifactId>
|
||||||
|
|
|
@ -3,6 +3,10 @@ package com.muyu.net.working.controller;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.muyu.common.system.domain.SysDept;
|
||||||
|
import com.muyu.common.system.domain.SysUser;
|
||||||
|
import com.muyu.net.working.feign.DeptFeign;
|
||||||
|
import com.muyu.net.working.feign.UserFeign;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
@ -38,6 +42,10 @@ import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
public class EnterpriseController extends BaseController {
|
public class EnterpriseController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private EnterpriseService enterpriseService;
|
private EnterpriseService enterpriseService;
|
||||||
|
@Autowired
|
||||||
|
private UserFeign userFeign;
|
||||||
|
@Autowired
|
||||||
|
private DeptFeign deptFeign;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询车辆运营平台列表
|
* 查询车辆运营平台列表
|
||||||
|
@ -83,6 +91,16 @@ public class EnterpriseController extends BaseController {
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@ApiOperation("新增车辆运营平台")
|
@ApiOperation("新增车辆运营平台")
|
||||||
public Result<String> add(@RequestBody EnterpriseSaveReq enterpriseSaveReq) {
|
public Result<String> add(@RequestBody EnterpriseSaveReq enterpriseSaveReq) {
|
||||||
|
|
||||||
|
|
||||||
|
SysDept sysDept = new SysDept();
|
||||||
|
sysDept.setDeptName(enterpriseSaveReq.getEbterpriseName());
|
||||||
|
Result list = deptFeign.list(sysDept);
|
||||||
|
if (list!=null){
|
||||||
|
return Result.error("部门名称重复");
|
||||||
|
}
|
||||||
|
Result add = deptFeign.add(sysDept);
|
||||||
|
|
||||||
return toAjax(enterpriseService.save(Enterprise.saveBuild(enterpriseSaveReq)));
|
return toAjax(enterpriseService.save(Enterprise.saveBuild(enterpriseSaveReq)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,7 @@ public class SysDeptController extends BaseController {
|
||||||
return success(depts);
|
return success(depts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据部门编号获取详细信息
|
* 根据部门编号获取详细信息
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue