text(完善多数据源)
commit
902b5eccbe
|
@ -34,5 +34,10 @@
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-webmvc</artifactId>
|
<artifactId>spring-webmvc</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
||||||
|
<version>4.3.0</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -7,6 +7,8 @@ import com.muyu.clw.common.many.datasource.factory.DruidDataSourceFactory;
|
||||||
import com.muyu.clw.common.many.datasource.role.DynamicDataSource;
|
import com.muyu.clw.common.many.datasource.role.DynamicDataSource;
|
||||||
import com.muyu.common.core.utils.SpringUtils;
|
import com.muyu.common.core.utils.SpringUtils;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
|
import org.springframework.boot.ApplicationArguments;
|
||||||
|
import org.springframework.boot.ApplicationRunner;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Primary;
|
import org.springframework.context.annotation.Primary;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
@ -28,17 +30,25 @@ import java.util.Map;
|
||||||
@Log4j2
|
@Log4j2
|
||||||
@Component
|
@Component
|
||||||
public class ManyDataSource {
|
public class ManyDataSource {
|
||||||
public static List<EntInfo> dataSourceInfoList(EntInfo entInfo) {
|
public static List<EntInfo> dataSourceInfoList() {
|
||||||
List<EntInfo> list = new ArrayList<>();
|
List<EntInfo> list = new ArrayList<>();
|
||||||
list.add(entInfo);
|
list.add(
|
||||||
|
EntInfo.builder()
|
||||||
|
.entCode("ent_6330")
|
||||||
|
.ip("123.56.102.11")
|
||||||
|
.port(3308)
|
||||||
|
.build()
|
||||||
|
);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@Primary
|
@Primary
|
||||||
public static DynamicDataSource dynamicDataSource(DruidDataSourceFactory druidDataSourceFactory,EntInfo entInfoList) {
|
public static DynamicDataSource dynamicDataSource(DruidDataSourceFactory druidDataSourceFactory) {
|
||||||
|
|
||||||
Map<Object, Object> dataSourceMap = new HashMap<>();
|
Map<Object, Object> dataSourceMap = new HashMap<>();
|
||||||
dataSourceInfoList(entInfoList)
|
dataSourceInfoList()
|
||||||
.stream()
|
.stream()
|
||||||
.map(entInfo -> DataSourceInfo.hostAndPortBuild(entInfo.getEntCode(),entInfo.getIp(),entInfo.getPort()))
|
.map(entInfo -> DataSourceInfo.hostAndPortBuild(entInfo.getEntCode(),entInfo.getIp(),entInfo.getPort()))
|
||||||
.forEach(dataSourceInfo -> {
|
.forEach(dataSourceInfo -> {
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
com.muyu.clw.common.saas.interceptor.WebMvcSaaSConfig
|
com.muyu.clw.common.saas.interceptor.WebMvcSaaSConfig
|
||||||
com.muyu.clw.common.many.datasource.factory.DruidDataSourceFactory
|
com.muyu.clw.common.many.datasource.factory.DruidDataSourceFactory
|
||||||
|
com.muyu.clw.common.many.datasource.ManyDataSource
|
||||||
|
com.muyu.clw.common.saas.domain.model.EntInfo
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
<?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-businessPlatform</artifactId>
|
|
||||||
<version>3.6.3</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>muyu-businessPlatform-remove</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>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,101 +0,0 @@
|
||||||
package com.muyu.businessPlatform.service.impl;
|
|
||||||
|
|
||||||
import com.muyu.businessPlatform.domain.Vehicle;
|
|
||||||
import com.muyu.businessPlatform.mapper.VehicleMapper;
|
|
||||||
import com.muyu.businessPlatform.service.IVehicleService;
|
|
||||||
import com.muyu.common.core.utils.DateUtils;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 车辆Service业务层处理
|
|
||||||
*
|
|
||||||
* @author wan
|
|
||||||
* @date 2024-05-31
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class VehicleServiceImpl implements IVehicleService
|
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private VehicleMapper vehicleMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询车辆
|
|
||||||
*
|
|
||||||
* @param id 车辆主键
|
|
||||||
* @return 车辆
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Vehicle selectVehicleById(Long id)
|
|
||||||
{
|
|
||||||
return vehicleMapper.selectVehicleById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询车辆列表
|
|
||||||
*
|
|
||||||
* @param vehicle 车辆
|
|
||||||
* @return 车辆
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<Vehicle> selectVehicleList(Vehicle vehicle)
|
|
||||||
{
|
|
||||||
return vehicleMapper.selectVehicleList(vehicle);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增车辆
|
|
||||||
*
|
|
||||||
* @param vehicle 车辆
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int insertVehicle(Vehicle vehicle)
|
|
||||||
{
|
|
||||||
vehicle.setCreateTime(DateUtils.getNowDate());
|
|
||||||
String userKey = UUID.randomUUID().toString();
|
|
||||||
vehicle.setVin(userKey);
|
|
||||||
return vehicleMapper.insertVehicle(vehicle);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改车辆
|
|
||||||
*
|
|
||||||
* @param vehicle 车辆
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int updateVehicle(Vehicle vehicle)
|
|
||||||
{
|
|
||||||
vehicle.setUpdateTime(DateUtils.getNowDate());
|
|
||||||
return vehicleMapper.updateVehicle(vehicle);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除车辆
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的车辆主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteVehicleByIds(Long[] ids)
|
|
||||||
{
|
|
||||||
return vehicleMapper.deleteVehicleByIds(ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除车辆信息
|
|
||||||
*
|
|
||||||
* @param id 车辆主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteVehicleById(Long id)
|
|
||||||
{
|
|
||||||
return vehicleMapper.deleteVehicleById(id);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -76,25 +76,20 @@ public class Enterprise extends BaseEntity
|
||||||
@Excel(name = "企业入驻平台时期", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "企业入驻平台时期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
private Date registrationDate;
|
private Date registrationDate;
|
||||||
|
|
||||||
/** 企业认证id */
|
|
||||||
@Excel(name = "企业认证id")
|
|
||||||
private Long certificationId;
|
|
||||||
|
|
||||||
/** 认证时间 */
|
/** 认证时间 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
@Excel(name = "认证时间", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "认证时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
private Date authenticationDate;
|
private Date authenticationDate;
|
||||||
|
|
||||||
|
/** 审核状态 */
|
||||||
|
@Excel(name = "审核状态")
|
||||||
|
private Integer examineStatus;
|
||||||
|
|
||||||
/** 服务级别 */
|
/** 服务级别 */
|
||||||
@Excel(name = "服务级别")
|
@Excel(name = "服务级别")
|
||||||
private Integer serviceLevel;
|
private Integer serviceLevel;
|
||||||
|
|
||||||
/** 开通服务id */
|
/** 开通服务id */
|
||||||
@Excel(name = "开通服务id")
|
@Excel(name = "开通服务级别")
|
||||||
private Long openServerId;
|
private Integer openServerId;
|
||||||
|
|
||||||
/** 增值服务id */
|
|
||||||
@Excel(name = "增值服务id")
|
|
||||||
private Long addServerId;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.muyu</groupId>
|
||||||
<artifactId>muyu-businessPlatform-common</artifactId>
|
<artifactId>muyu-modules-many-common</artifactId>
|
||||||
<version>3.6.3</version>
|
<version>3.6.3</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@ -107,15 +107,5 @@
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.muyu</groupId>
|
||||||
<artifactId>muyu-common-system</artifactId>
|
<artifactId>muyu-common-system</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.muyu</groupId>
|
|
||||||
<artifactId>muyu-modules-system</artifactId>
|
|
||||||
<version>3.6.3</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.muyu</groupId>
|
|
||||||
<artifactId>muyu-common-saas</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
package com.muyu.authentication;
|
package com.muyu.authentication;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业模块
|
* 企业模块
|
||||||
|
|
|
@ -96,10 +96,5 @@ public class EnterpriseController extends BaseController
|
||||||
return toAjax(enterpriseService.deleteEnterpriseByIds(ids));
|
return toAjax(enterpriseService.deleteEnterpriseByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/AllList")
|
|
||||||
public Result<List<Enterprise>> AllList(@RequestParam Long id){
|
|
||||||
return Result.success(
|
|
||||||
enterpriseService.AllList(id)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,5 +61,4 @@ public interface IEnterpriseService extends IService<Enterprise>
|
||||||
*/
|
*/
|
||||||
public int deleteEnterpriseById(Long id);
|
public int deleteEnterpriseById(Long id);
|
||||||
|
|
||||||
List<Enterprise> AllList(Long id);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,16 @@
|
||||||
package com.muyu.authentication.service.impl;
|
package com.muyu.authentication.service.impl;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.muyu.authentication.mapper.EnterpriseMapper;
|
import com.muyu.authentication.mapper.EnterpriseMapper;
|
||||||
import com.muyu.clw.common.many.datasource.ManyDataSource;
|
|
||||||
import com.muyu.clw.common.many.datasource.domain.model.DataSourceInfo;
|
|
||||||
import com.muyu.clw.common.many.datasource.factory.DruidDataSourceFactory;
|
|
||||||
import com.muyu.clw.common.saas.domain.model.EntInfo;
|
|
||||||
import com.muyu.common.core.utils.DateUtils;
|
import com.muyu.common.core.utils.DateUtils;
|
||||||
import com.muyu.common.system.domain.SysUser;
|
import com.muyu.common.system.domain.SysUser;
|
||||||
import com.muyu.common.system.remote.RemoteUserService;
|
import com.muyu.common.system.remote.RemoteUserService;
|
||||||
import com.muyu.system.mapper.SysUserMapper;
|
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.muyu.domain.Enterprise;
|
import com.muyu.domain.Enterprise;
|
||||||
import com.muyu.authentication.service.IEnterpriseService;
|
import com.muyu.authentication.service.IEnterpriseService;
|
||||||
|
@ -127,26 +122,4 @@ public class EnterpriseServiceImpl extends ServiceImpl<EnterpriseMapper,Enterpri
|
||||||
{
|
{
|
||||||
return enterpriseMapper.deleteById(id);
|
return enterpriseMapper.deleteById(id);
|
||||||
}
|
}
|
||||||
@Autowired
|
|
||||||
private DruidDataSourceFactory druidDataSourceFactory;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<Enterprise> AllList(Long id) {
|
|
||||||
Enterprise enterprise = enterpriseMapper.selectOne(
|
|
||||||
new LambdaQueryWrapper<>() {{
|
|
||||||
eq(Enterprise::getId, id);
|
|
||||||
}}
|
|
||||||
);
|
|
||||||
String substring = enterprise.getContactPhone().substring(enterprise.getContactPhone().length() - 4);
|
|
||||||
Integer enterpriseId = Math.toIntExact(enterprise.getId());
|
|
||||||
|
|
||||||
EntInfo build = EntInfo.builder()
|
|
||||||
.entCode("ent_" + substring)
|
|
||||||
.ip("123.56.102.11")
|
|
||||||
.port(3306 + enterpriseId)
|
|
||||||
.build();
|
|
||||||
ManyDataSource.dynamicDataSource(druidDataSourceFactory,build);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{ "properties": [ ] }
|
|
|
@ -16,11 +16,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="email" column="email" />
|
<result property="email" column="email" />
|
||||||
<result property="status" column="status" />
|
<result property="status" column="status" />
|
||||||
<result property="registrationDate" column="registration_date" />
|
<result property="registrationDate" column="registration_date" />
|
||||||
<result property="certificationId" column="certification_id" />
|
<result property="examineStatus" column="examine_status" />
|
||||||
<result property="authenticationDate" column="authentication_date" />
|
<result property="authenticationDate" column="authentication_date" />
|
||||||
<result property="serviceLevel" column="service_level" />
|
<result property="serviceLevel" column="service_level" />
|
||||||
<result property="openServerId" column="open_server_id" />
|
<result property="openServerId" column="open_server_id" />
|
||||||
<result property="addServerId" column="add_server_id" />
|
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
|
@ -29,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectEnterpriseVo">
|
<sql id="selectEnterpriseVo">
|
||||||
select id, enterprise_name, legal_person, business_license_number, establishment_date, business_scope, address, contact_phone, email, status, registration_date, certification_id, authentication_date, service_level, open_server_id, add_server_id, create_by, create_time, update_by, update_time, remark from enterprise
|
select id, enterprise_name, legal_person, business_license_number, establishment_date, business_scope, address, contact_phone, email, status, registration_date, examine_status, authentication_date, service_level, open_server_id, create_by, create_time, update_by, update_time, remark from enterprise
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectEnterpriseList" parameterType="com.muyu.domain.Enterprise" resultMap="EnterpriseResult">
|
<select id="selectEnterpriseList" parameterType="com.muyu.domain.Enterprise" resultMap="EnterpriseResult">
|
||||||
|
@ -45,11 +44,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="email != null and email != ''"> and email = #{email}</if>
|
<if test="email != null and email != ''"> and email = #{email}</if>
|
||||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
<if test="registrationDate != null "> and registration_date = #{registrationDate}</if>
|
<if test="registrationDate != null "> and registration_date = #{registrationDate}</if>
|
||||||
<if test="certificationId != null "> and certification_id = #{certificationId}</if>
|
<if test="examineStatus != null "> and examine_status = #{examine_status}</if>
|
||||||
<if test="authenticationDate != null "> and authentication_date = #{authenticationDate}</if>
|
<if test="authenticationDate != null "> and authentication_date = #{authenticationDate}</if>
|
||||||
<if test="serviceLevel != null "> and service_level = #{serviceLevel}</if>
|
<if test="serviceLevel != null "> and service_level = #{serviceLevel}</if>
|
||||||
<if test="openServerId != null "> and open_server_id = #{openServerId}</if>
|
<if test="openServerId != null "> and open_server_id = #{openServerId}</if>
|
||||||
<if test="addServerId != null "> and add_server_id = #{addServerId}</if>
|
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -5,22 +5,27 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.muyu</groupId>
|
||||||
<artifactId>muyu-businessPlatform</artifactId>
|
<artifactId>muyu-modules-many</artifactId>
|
||||||
<version>3.6.3</version>
|
<version>3.6.3</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>muyu-businessPlatform-common</artifactId>
|
<artifactId>muyu-modules-many-common</artifactId>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
<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>
|
<dependencies>
|
||||||
|
<!-- 系统公共核心包 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.muyu</groupId>
|
||||||
<artifactId>muyu-common-core</artifactId>
|
<artifactId>muyu-common-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-common-security</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
|
@ -0,0 +1,98 @@
|
||||||
|
package com.muyu.many.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.muyu.common.core.annotation.Excel;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业对象 enterprise
|
||||||
|
*
|
||||||
|
* @author wan
|
||||||
|
* @date 2024-05-31
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@TableName("enterprise")
|
||||||
|
public class Enterprise extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
@TableId(value = "id",type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 企业名称 */
|
||||||
|
@Excel(name = "企业名称")
|
||||||
|
private String enterpriseName;
|
||||||
|
|
||||||
|
/** 法定代表人 */
|
||||||
|
@Excel(name = "法定代表人")
|
||||||
|
private String legalPerson;
|
||||||
|
|
||||||
|
/** 经营执照凭证号码 */
|
||||||
|
@Excel(name = "经营执照凭证号码")
|
||||||
|
private String businessLicenseNumber;
|
||||||
|
|
||||||
|
/** 企业成立时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "企业成立时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date establishmentDate;
|
||||||
|
|
||||||
|
/** 经营范围 */
|
||||||
|
@Excel(name = "经营范围")
|
||||||
|
private String businessScope;
|
||||||
|
|
||||||
|
/** 注册地址 */
|
||||||
|
@Excel(name = "注册地址")
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/** 企业联系方式 */
|
||||||
|
@Excel(name = "企业联系方式")
|
||||||
|
private String contactPhone;
|
||||||
|
|
||||||
|
/** 公司邮箱 */
|
||||||
|
@Excel(name = "公司邮箱")
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/** 企业当前状态 */
|
||||||
|
@Excel(name = "企业当前状态")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/** 企业入驻平台时期 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "企业入驻平台时期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date registrationDate;
|
||||||
|
|
||||||
|
/** 企业认证id */
|
||||||
|
@Excel(name = "企业认证id")
|
||||||
|
private Long certificationId;
|
||||||
|
|
||||||
|
/** 认证时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "认证时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date authenticationDate;
|
||||||
|
|
||||||
|
/** 服务级别 */
|
||||||
|
@Excel(name = "服务级别")
|
||||||
|
private Integer serviceLevel;
|
||||||
|
|
||||||
|
/** 开通服务id */
|
||||||
|
@Excel(name = "开通服务id")
|
||||||
|
private Long openServerId;
|
||||||
|
|
||||||
|
/** 增值服务id */
|
||||||
|
@Excel(name = "增值服务id")
|
||||||
|
private Long addServerId;
|
||||||
|
|
||||||
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.businessPlatform.domain;
|
package com.muyu.many.domain;
|
||||||
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
import com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电子围栏对象 fence
|
* 电子围栏对象 fence
|
|
@ -1,12 +1,13 @@
|
||||||
package com.muyu.businessPlatform.domain;
|
package com.muyu.many.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.muyu.common.core.annotation.Excel;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
import com.muyu.common.core.annotation.Excel;
|
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 车辆对象 vehicle
|
* 车辆对象 vehicle
|
|
@ -5,18 +5,17 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.muyu</groupId>
|
||||||
<artifactId>muyu-businessPlatform</artifactId>
|
<artifactId>muyu-modules-many</artifactId>
|
||||||
<version>3.6.3</version>
|
<version>3.6.3</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>muyu-businessPlatform-server</artifactId>
|
<artifactId>muyu-modules-many-server</artifactId>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
<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>
|
<dependencies>
|
||||||
<!-- SpringCloud Alibaba Nacos -->
|
<!-- SpringCloud Alibaba Nacos -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -87,14 +86,39 @@
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.muyu</groupId>
|
||||||
<artifactId>muyu-common-core</artifactId>
|
<artifactId>muyu-modules-many-common</artifactId>
|
||||||
<version>3.6.3</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.muyu</groupId>
|
|
||||||
<artifactId>muyu-businessPlatform-common</artifactId>
|
|
||||||
<version>3.6.3</version>
|
<version>3.6.3</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-common-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-common-system</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-common-saas</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>druid</artifactId>
|
||||||
|
<version>1.2.20</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
||||||
|
<version>4.3.0</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
|
@ -1,10 +1,14 @@
|
||||||
package com.muyu.businessPlatform;
|
package com.muyu.authentication;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration;
|
||||||
|
import com.muyu.clw.common.many.datasource.holder.DynamicDataSourceHolder;
|
||||||
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.actuate.jdbc.DataSourceHealthIndicator;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业模块
|
* 企业模块
|
||||||
|
@ -15,8 +19,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
@EnableCustomSwagger2
|
@EnableCustomSwagger2
|
||||||
@EnableMyFeignClients
|
@EnableMyFeignClients
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class MuYuBusinessPlatformApplication {
|
public class MuYuManyApplication {
|
||||||
public static void main (String[] args) {
|
public static void main (String[] args) {
|
||||||
SpringApplication.run(MuYuBusinessPlatformApplication.class, args);
|
SpringApplication.run(MuYuManyApplication.class, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,7 +1,6 @@
|
||||||
package com.muyu.businessPlatform.controller;
|
package com.muyu.authentication.controller;
|
||||||
|
|
||||||
import com.muyu.businessPlatform.domain.Fence;
|
import com.muyu.authentication.service.IFenceService;
|
||||||
import com.muyu.businessPlatform.service.IFenceService;
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||||
import com.muyu.common.core.web.controller.BaseController;
|
import com.muyu.common.core.web.controller.BaseController;
|
||||||
|
@ -9,6 +8,7 @@ import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
import com.muyu.common.log.annotation.Log;
|
import com.muyu.common.log.annotation.Log;
|
||||||
import com.muyu.common.log.enums.BusinessType;
|
import com.muyu.common.log.enums.BusinessType;
|
||||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||||
|
import com.muyu.many.domain.Fence;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ public class FenceController extends BaseController
|
||||||
/**
|
/**
|
||||||
* 查询电子围栏列表
|
* 查询电子围栏列表
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("businessPlatform:fence:list")
|
@RequiresPermissions("many:fence:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public Result<TableDataInfo<Fence>> list(Fence fence)
|
public Result<TableDataInfo<Fence>> list(Fence fence)
|
||||||
{
|
{
|
||||||
|
@ -43,7 +43,7 @@ public class FenceController extends BaseController
|
||||||
/**
|
/**
|
||||||
* 导出电子围栏列表
|
* 导出电子围栏列表
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("businessPlatform:fence:export")
|
@RequiresPermissions("many:fence:export")
|
||||||
@Log(title = "电子围栏", businessType = BusinessType.EXPORT)
|
@Log(title = "电子围栏", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, Fence fence)
|
public void export(HttpServletResponse response, Fence fence)
|
||||||
|
@ -56,7 +56,7 @@ public class FenceController extends BaseController
|
||||||
/**
|
/**
|
||||||
* 获取电子围栏详细信息
|
* 获取电子围栏详细信息
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("businessPlatform:fence:query")
|
@RequiresPermissions("many:fence:query")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public Result getInfo(@PathVariable("id") Long id)
|
public Result getInfo(@PathVariable("id") Long id)
|
||||||
{
|
{
|
||||||
|
@ -66,7 +66,7 @@ public class FenceController extends BaseController
|
||||||
/**
|
/**
|
||||||
* 新增电子围栏
|
* 新增电子围栏
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("businessPlatform:fence:add")
|
@RequiresPermissions("many:fence:add")
|
||||||
@Log(title = "电子围栏", businessType = BusinessType.INSERT)
|
@Log(title = "电子围栏", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public Result add(@RequestBody Fence fence)
|
public Result add(@RequestBody Fence fence)
|
||||||
|
@ -77,7 +77,7 @@ public class FenceController extends BaseController
|
||||||
/**
|
/**
|
||||||
* 修改电子围栏
|
* 修改电子围栏
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("businessPlatform:fence:edit")
|
@RequiresPermissions("many:fence:edit")
|
||||||
@Log(title = "电子围栏", businessType = BusinessType.UPDATE)
|
@Log(title = "电子围栏", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public Result edit(@RequestBody Fence fence)
|
public Result edit(@RequestBody Fence fence)
|
||||||
|
@ -88,7 +88,7 @@ public class FenceController extends BaseController
|
||||||
/**
|
/**
|
||||||
* 删除电子围栏
|
* 删除电子围栏
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("businessPlatform:fence:remove")
|
@RequiresPermissions("many:fence:remove")
|
||||||
@Log(title = "电子围栏", businessType = BusinessType.DELETE)
|
@Log(title = "电子围栏", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public Result remove(@PathVariable Long[] ids)
|
public Result remove(@PathVariable Long[] ids)
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.muyu.authentication.controller;
|
||||||
|
|
||||||
|
import com.muyu.authentication.service.ManyEnterpriseService;
|
||||||
|
import com.muyu.common.core.domain.Result;
|
||||||
|
import com.muyu.many.domain.Enterprise;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户登录 企业业务展示平台Controller
|
||||||
|
*
|
||||||
|
* @ClassName ManyEnterpriseController
|
||||||
|
* @Author AnNan.Wang
|
||||||
|
* @Date 2024/6/6 15:24
|
||||||
|
*/
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/manyEnterprise")
|
||||||
|
public class ManyEnterpriseController {
|
||||||
|
@Autowired
|
||||||
|
private ManyEnterpriseService manyEnterpriseService;
|
||||||
|
|
||||||
|
@PostMapping("/AllList")
|
||||||
|
public Result<List<Enterprise>> AllList(@RequestHeader("ent_code") String headerValue){
|
||||||
|
return Result.success(
|
||||||
|
manyEnterpriseService.AllList(headerValue)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,7 +1,6 @@
|
||||||
package com.muyu.businessPlatform.controller;
|
package com.muyu.authentication.controller;
|
||||||
|
|
||||||
import com.muyu.businessPlatform.domain.Vehicle;
|
import com.muyu.authentication.service.IVehicleService;
|
||||||
import com.muyu.businessPlatform.service.IVehicleService;
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||||
import com.muyu.common.core.web.controller.BaseController;
|
import com.muyu.common.core.web.controller.BaseController;
|
||||||
|
@ -9,6 +8,7 @@ import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
import com.muyu.common.log.annotation.Log;
|
import com.muyu.common.log.annotation.Log;
|
||||||
import com.muyu.common.log.enums.BusinessType;
|
import com.muyu.common.log.enums.BusinessType;
|
||||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||||
|
import com.muyu.many.domain.Vehicle;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@ -31,24 +31,22 @@ public class VehicleController extends BaseController
|
||||||
/**
|
/**
|
||||||
* 查询车辆列表
|
* 查询车辆列表
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("businessPlatform:vehicle:list")
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public Result<TableDataInfo<Vehicle>> list(Vehicle vehicle)
|
public Result<TableDataInfo<Vehicle>> list(Vehicle vehicle,@RequestHeader("ent_code") String entCode)
|
||||||
{
|
{
|
||||||
startPage();
|
startPage();
|
||||||
List<Vehicle> list = vehicleService.selectVehicleList(vehicle);
|
List<Vehicle> list = vehicleService.selectVehicleList(vehicle, entCode);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出车辆列表
|
* 导出车辆列表
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("businessPlatform:vehicle:export")
|
|
||||||
@Log(title = "车辆", businessType = BusinessType.EXPORT)
|
@Log(title = "车辆", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, Vehicle vehicle)
|
public void export(HttpServletResponse response, Vehicle vehicle,@RequestHeader("ent_code") String entCode)
|
||||||
{
|
{
|
||||||
List<Vehicle> list = vehicleService.selectVehicleList(vehicle);
|
List<Vehicle> list = vehicleService.selectVehicleList(vehicle, entCode);
|
||||||
ExcelUtil<Vehicle> util = new ExcelUtil<Vehicle>(Vehicle.class);
|
ExcelUtil<Vehicle> util = new ExcelUtil<Vehicle>(Vehicle.class);
|
||||||
util.exportExcel(response, list, "车辆数据");
|
util.exportExcel(response, list, "车辆数据");
|
||||||
}
|
}
|
||||||
|
@ -56,43 +54,39 @@ public class VehicleController extends BaseController
|
||||||
/**
|
/**
|
||||||
* 获取车辆详细信息
|
* 获取车辆详细信息
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("businessPlatform:vehicle:query")
|
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public Result getInfo(@PathVariable("id") Long id)
|
public Result getInfo(@PathVariable("id") Long id,@RequestHeader("ent_code") String entCode)
|
||||||
{
|
{
|
||||||
return success(vehicleService.selectVehicleById(id));
|
return success(vehicleService.selectVehicleById(id,entCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增车辆
|
* 新增车辆
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("businessPlatform:vehicle:add")
|
|
||||||
@Log(title = "车辆", businessType = BusinessType.INSERT)
|
@Log(title = "车辆", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public Result add(@RequestBody Vehicle vehicle)
|
public Result add(@RequestBody Vehicle vehicle,@RequestHeader("ent_code") String entCode)
|
||||||
{
|
{
|
||||||
return toAjax(vehicleService.insertVehicle(vehicle));
|
return toAjax(vehicleService.insertVehicle(vehicle,entCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改车辆
|
* 修改车辆
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("businessPlatform:vehicle:edit")
|
|
||||||
@Log(title = "车辆", businessType = BusinessType.UPDATE)
|
@Log(title = "车辆", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public Result edit(@RequestBody Vehicle vehicle)
|
public Result edit(@RequestBody Vehicle vehicle,@RequestHeader("ent_code") String entCode)
|
||||||
{
|
{
|
||||||
return toAjax(vehicleService.updateVehicle(vehicle));
|
return toAjax(vehicleService.updateVehicle(vehicle,entCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除车辆
|
* 删除车辆
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("businessPlatform:vehicle:remove")
|
|
||||||
@Log(title = "车辆", businessType = BusinessType.DELETE)
|
@Log(title = "车辆", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public Result remove(@PathVariable Long[] ids)
|
public Result remove(@PathVariable Long[] ids,@RequestHeader("ent_code") String entCode)
|
||||||
{
|
{
|
||||||
return toAjax(vehicleService.deleteVehicleByIds(ids));
|
return toAjax(vehicleService.deleteVehicleByIds(ids,entCode));
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,7 +1,8 @@
|
||||||
package com.muyu.businessPlatform.mapper;
|
package com.muyu.authentication.mapper;
|
||||||
|
|
||||||
|
|
||||||
import com.muyu.businessPlatform.domain.Fence;
|
|
||||||
|
import com.muyu.many.domain.Fence;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.muyu.authentication.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.muyu.many.domain.Enterprise;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mapper 实现层
|
||||||
|
*
|
||||||
|
* @author AnNan.Wang
|
||||||
|
* @ClassName: ManyEnterpriseMapper
|
||||||
|
* @createTime: 2024/6/6 15:52
|
||||||
|
*/
|
||||||
|
public interface ManyEnterpriseMapper extends BaseMapper<Enterprise> {
|
||||||
|
}
|
|
@ -1,7 +1,8 @@
|
||||||
package com.muyu.businessPlatform.mapper;
|
package com.muyu.authentication.mapper;
|
||||||
|
|
||||||
|
|
||||||
import com.muyu.businessPlatform.domain.Vehicle;
|
|
||||||
|
import com.muyu.many.domain.Vehicle;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
package com.muyu.businessPlatform.service;
|
package com.muyu.authentication.service;
|
||||||
|
|
||||||
|
|
||||||
import com.muyu.businessPlatform.domain.Fence;
|
|
||||||
|
import com.muyu.many.domain.Fence;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
package com.muyu.businessPlatform.service;
|
package com.muyu.authentication.service;
|
||||||
|
|
||||||
|
|
||||||
import com.muyu.businessPlatform.domain.Vehicle;
|
|
||||||
|
|
||||||
|
import com.muyu.many.domain.Vehicle;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -19,15 +21,16 @@ public interface IVehicleService
|
||||||
* @param id 车辆主键
|
* @param id 车辆主键
|
||||||
* @return 车辆
|
* @return 车辆
|
||||||
*/
|
*/
|
||||||
public Vehicle selectVehicleById(Long id);
|
public Vehicle selectVehicleById(Long id, String entCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询车辆列表
|
* 查询车辆列表
|
||||||
*
|
*
|
||||||
* @param vehicle 车辆
|
* @param vehicle 车辆
|
||||||
|
* @param entCode
|
||||||
* @return 车辆集合
|
* @return 车辆集合
|
||||||
*/
|
*/
|
||||||
public List<Vehicle> selectVehicleList(Vehicle vehicle);
|
public List<Vehicle> selectVehicleList(Vehicle vehicle, String entCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增车辆
|
* 新增车辆
|
||||||
|
@ -35,7 +38,7 @@ public interface IVehicleService
|
||||||
* @param vehicle 车辆
|
* @param vehicle 车辆
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int insertVehicle(Vehicle vehicle);
|
public int insertVehicle(Vehicle vehicle, String entCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改车辆
|
* 修改车辆
|
||||||
|
@ -43,7 +46,7 @@ public interface IVehicleService
|
||||||
* @param vehicle 车辆
|
* @param vehicle 车辆
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int updateVehicle(Vehicle vehicle);
|
public int updateVehicle(Vehicle vehicle, String entCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除车辆
|
* 批量删除车辆
|
||||||
|
@ -51,7 +54,7 @@ public interface IVehicleService
|
||||||
* @param ids 需要删除的车辆主键集合
|
* @param ids 需要删除的车辆主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteVehicleByIds(Long[] ids);
|
public int deleteVehicleByIds(Long[] ids, String entCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除车辆信息
|
* 删除车辆信息
|
||||||
|
@ -59,5 +62,5 @@ public interface IVehicleService
|
||||||
* @param id 车辆主键
|
* @param id 车辆主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteVehicleById(Long id);
|
public int deleteVehicleById(Long id, String entCode);
|
||||||
}
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.muyu.authentication.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.muyu.many.domain.Enterprise;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AnNan.Wang
|
||||||
|
* @ClassName: ManyEnterpriseService
|
||||||
|
* @createTime: 2024/6/6 15:27
|
||||||
|
*/
|
||||||
|
|
||||||
|
public interface ManyEnterpriseService extends IService<Enterprise> {
|
||||||
|
List<Enterprise> AllList(String headerValue);
|
||||||
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
package com.muyu.businessPlatform.service.impl;
|
package com.muyu.authentication.service.impl;
|
||||||
|
|
||||||
import com.muyu.businessPlatform.domain.Fence;
|
import com.muyu.authentication.mapper.FenceMapper;
|
||||||
import com.muyu.businessPlatform.mapper.FenceMapper;
|
import com.muyu.authentication.service.IFenceService;
|
||||||
import com.muyu.businessPlatform.service.IFenceService;
|
|
||||||
import com.muyu.common.core.utils.DateUtils;
|
import com.muyu.common.core.utils.DateUtils;
|
||||||
|
import com.muyu.many.domain.Fence;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.muyu.authentication.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.muyu.authentication.mapper.ManyEnterpriseMapper;
|
||||||
|
import com.muyu.authentication.service.ManyEnterpriseService;
|
||||||
|
import com.muyu.clw.common.many.datasource.ManyDataSource;
|
||||||
|
import com.muyu.clw.common.many.datasource.factory.DruidDataSourceFactory;
|
||||||
|
import com.muyu.clw.common.many.datasource.holder.DynamicDataSourceHolder;
|
||||||
|
import com.muyu.clw.common.saas.domain.model.EntInfo;
|
||||||
|
import com.muyu.many.domain.Enterprise;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实现层
|
||||||
|
*
|
||||||
|
* @ClassName ManyEnterpriseServiceImpl
|
||||||
|
* @Author AnNan.Wang
|
||||||
|
* @Date 2024/6/6 15:28
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class ManyEnterpriseServiceImpl extends ServiceImpl<ManyEnterpriseMapper, Enterprise>
|
||||||
|
implements ManyEnterpriseService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ManyEnterpriseMapper manyEnterpriseMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Enterprise> AllList(String headerValue) {
|
||||||
|
//切换数据库 切换到从数据库
|
||||||
|
DynamicDataSourceHolder.setDynamicDataSourceKey(headerValue);
|
||||||
|
List<Enterprise> enterprises = manyEnterpriseMapper.selectList(null);
|
||||||
|
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||||
|
return enterprises;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,127 @@
|
||||||
|
package com.muyu.authentication.service.impl;
|
||||||
|
|
||||||
|
import com.muyu.authentication.mapper.VehicleMapper;
|
||||||
|
import com.muyu.authentication.service.IVehicleService;
|
||||||
|
import com.muyu.clw.common.many.datasource.holder.DynamicDataSourceHolder;
|
||||||
|
import com.muyu.common.core.utils.DateUtils;
|
||||||
|
import com.muyu.many.domain.Vehicle;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆Service业务层处理
|
||||||
|
*
|
||||||
|
* @author wan
|
||||||
|
* @date 2024-05-31
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class VehicleServiceImpl implements IVehicleService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private VehicleMapper vehicleMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询车辆
|
||||||
|
*
|
||||||
|
* @param id 车辆主键
|
||||||
|
* @return 车辆
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Vehicle selectVehicleById(Long id, String entCode)
|
||||||
|
{
|
||||||
|
getMany(entCode);
|
||||||
|
Vehicle vehicle = vehicleMapper.selectVehicleById(id);
|
||||||
|
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||||
|
return vehicle;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询车辆列表
|
||||||
|
*
|
||||||
|
* @param vehicle 车辆
|
||||||
|
* @param entCode
|
||||||
|
* @return 车辆
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Vehicle> selectVehicleList(Vehicle vehicle, String entCode)
|
||||||
|
{
|
||||||
|
getMany(entCode);
|
||||||
|
List<Vehicle> vehicles = vehicleMapper.selectVehicleList(vehicle);
|
||||||
|
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||||
|
return vehicles;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增车辆
|
||||||
|
*
|
||||||
|
* @param vehicle 车辆
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertVehicle(Vehicle vehicle, String entCode)
|
||||||
|
{
|
||||||
|
getMany(entCode);
|
||||||
|
vehicle.setCreateTime(DateUtils.getNowDate());
|
||||||
|
String userKey = UUID.randomUUID().toString();
|
||||||
|
vehicle.setVin(userKey);
|
||||||
|
int i = vehicleMapper.insertVehicle(vehicle);
|
||||||
|
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改车辆
|
||||||
|
*
|
||||||
|
* @param vehicle 车辆
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateVehicle(Vehicle vehicle, String entCode)
|
||||||
|
{
|
||||||
|
getMany(entCode);
|
||||||
|
vehicle.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
int i = vehicleMapper.updateVehicle(vehicle);
|
||||||
|
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除车辆
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的车辆主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteVehicleByIds(Long[] ids, String entCode)
|
||||||
|
{
|
||||||
|
getMany(entCode);
|
||||||
|
int i = vehicleMapper.deleteVehicleByIds(ids);
|
||||||
|
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||||
|
return i;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除车辆信息
|
||||||
|
*
|
||||||
|
* @param id 车辆主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteVehicleById(Long id, String entCode)
|
||||||
|
{
|
||||||
|
getMany(entCode);
|
||||||
|
int i = vehicleMapper.deleteVehicleById(id);
|
||||||
|
DynamicDataSourceHolder.removeDynamicDataSourceKey();
|
||||||
|
return i;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getMany(String entCode){
|
||||||
|
//切换数据库 切换到从数据库
|
||||||
|
DynamicDataSourceHolder.setDynamicDataSourceKey(entCode);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,12 +1,12 @@
|
||||||
# Tomcat
|
# Tomcat
|
||||||
server:
|
server:
|
||||||
port: 9402
|
port: 9403
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
# 应用名称
|
# 应用名称
|
||||||
name: ruoyi-businessPlatform
|
name: ruoyi-many
|
||||||
profiles:
|
profiles:
|
||||||
# 环境配置
|
# 环境配置
|
||||||
active: dev
|
active: dev
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||||
<!-- 日志存放路径 -->
|
<!-- 日志存放路径 -->
|
||||||
<property name="log.path" value="logs/muyu-company-server"/>
|
<property name="log.path" value="logs/muyu-modules-many-server"/>
|
||||||
<!-- 日志输出格式 -->
|
<!-- 日志输出格式 -->
|
||||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.muyu.businessPlatform.mapper.FenceMapper">
|
<mapper namespace="com.muyu.authentication.mapper.FenceMapper">
|
||||||
|
|
||||||
<resultMap type="com.muyu.businessPlatform.domain.Fence" id="FenceResult">
|
<resultMap type="com.muyu.many.domain.Fence" id="FenceResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="name" column="name" />
|
<result property="name" column="name" />
|
||||||
<result property="fenceType" column="fence_type" />
|
<result property="fenceType" column="fence_type" />
|
||||||
|
@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select id, name, fence_type, longitude_and_latitude, create_by, create_time, update_by, update_time, remark from fence
|
select id, name, fence_type, longitude_and_latitude, create_by, create_time, update_by, update_time, remark from fence
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectFenceList" parameterType="com.muyu.businessPlatform.domain.Fence" resultMap="FenceResult">
|
<select id="selectFenceList" parameterType="com.muyu.many.domain.Fence" resultMap="FenceResult">
|
||||||
<include refid="selectFenceVo"/>
|
<include refid="selectFenceVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||||
|
@ -34,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertFence" parameterType="com.muyu.businessPlatform.domain.Fence" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertFence" parameterType="com.muyu.many.domain.Fence" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into fence
|
insert into fence
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="name != null">name,</if>
|
<if test="name != null">name,</if>
|
||||||
|
@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateFence" parameterType="com.muyu.businessPlatform.domain.Fence">
|
<update id="updateFence" parameterType="com.muyu.many.domain.Fence">
|
||||||
update fence
|
update fence
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="name != null">name = #{name},</if>
|
<if test="name != null">name = #{name},</if>
|
|
@ -2,9 +2,9 @@
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.muyu.businessPlatform.mapper.VehicleMapper">
|
<mapper namespace="com.muyu.authentication.mapper.VehicleMapper">
|
||||||
|
|
||||||
<resultMap type="com.muyu.businessPlatform.domain.Vehicle" id="VehicleResult">
|
<resultMap type="com.muyu.many.domain.Vehicle" id="VehicleResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="vin" column="vin" />
|
<result property="vin" column="vin" />
|
||||||
<result property="brand" column="brand" />
|
<result property="brand" column="brand" />
|
||||||
|
@ -32,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select id, vin, brand, model, production_date, body_type, color, engine_capacity, fuel_type, transmission, drive_type, mileage, registration_date, license_number, holder, vehicle_type, create_by, create_time, update_by, update_time, remark from vehicle
|
select id, vin, brand, model, production_date, body_type, color, engine_capacity, fuel_type, transmission, drive_type, mileage, registration_date, license_number, holder, vehicle_type, create_by, create_time, update_by, update_time, remark from vehicle
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectVehicleList" parameterType="com.muyu.businessPlatform.domain.Vehicle" resultMap="VehicleResult">
|
<select id="selectVehicleList" parameterType="com.muyu.many.domain.Vehicle" resultMap="VehicleResult">
|
||||||
<include refid="selectVehicleVo"/>
|
<include refid="selectVehicleVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="vin != null and vin != ''"> and vin = #{vin}</if>
|
<if test="vin != null and vin != ''"> and vin = #{vin}</if>
|
||||||
|
@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertVehicle" parameterType="com.muyu.businessPlatform.domain.Vehicle" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertVehicle" parameterType="com.muyu.many.domain.Vehicle" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into vehicle
|
insert into vehicle
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="vin != null">vin,</if>
|
<if test="vin != null">vin,</if>
|
||||||
|
@ -106,7 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateVehicle" parameterType="com.muyu.businessPlatform.domain.Vehicle">
|
<update id="updateVehicle" parameterType="com.muyu.many.domain.Vehicle">
|
||||||
update vehicle
|
update vehicle
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="vin != null">vin = #{vin},</if>
|
<if test="vin != null">vin = #{vin},</if>
|
|
@ -9,13 +9,13 @@
|
||||||
<version>3.6.3</version>
|
<version>3.6.3</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>muyu-businessPlatform</artifactId>
|
<artifactId>muyu-modules-many</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
<description>多数据源 业务层</description>
|
||||||
<modules>
|
<modules>
|
||||||
<module>muyu-businessPlatform-common</module>
|
<module>muyu-modules-many-common</module>
|
||||||
<module>muyu-businessPlatform-server</module>
|
<module>muyu-modules-many-server</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>17</maven.compiler.target>
|
|
@ -14,7 +14,7 @@
|
||||||
<module>muyu-modules-job</module>
|
<module>muyu-modules-job</module>
|
||||||
<module>muyu-modules-file</module>
|
<module>muyu-modules-file</module>
|
||||||
<module>muyu-company</module>
|
<module>muyu-company</module>
|
||||||
<module>muyu-businessPlatform</module>
|
<module>muyu-modules-many</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<artifactId>muyu-modules</artifactId>
|
<artifactId>muyu-modules</artifactId>
|
||||||
|
|
Loading…
Reference in New Issue