fix(): 修复bug
parent
934367b1ea
commit
9f40bbaaf6
|
@ -15,8 +15,6 @@ import com.muyu.common.core.utils.StringUtils;
|
||||||
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 lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.apache.ibatis.session.SqlSessionFactory;
|
|
||||||
import org.mybatis.spring.SqlSessionFactoryBean;
|
|
||||||
import org.springframework.boot.ApplicationArguments;
|
import org.springframework.boot.ApplicationArguments;
|
||||||
import org.springframework.boot.ApplicationRunner;
|
import org.springframework.boot.ApplicationRunner;
|
||||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||||
|
@ -66,7 +64,7 @@ public class ManyDataSource implements ApplicationRunner {
|
||||||
RemoteUserService remoteUserService = SpringUtils.getBean(RemoteUserService.class);
|
RemoteUserService remoteUserService = SpringUtils.getBean(RemoteUserService.class);
|
||||||
Result<List<SysUser>> entListResult = remoteUserService.entList();
|
Result<List<SysUser>> entListResult = remoteUserService.entList();
|
||||||
if (entListResult==null){
|
if (entListResult==null){
|
||||||
throw new SaaSException("saas远调数据源错误");
|
throw new SaaSException("saas远调数据源异常");
|
||||||
}
|
}
|
||||||
List<SysUser> data = entListResult.getData();
|
List<SysUser> data = entListResult.getData();
|
||||||
if (entListResult.getCode() == Result.SUCCESS && data != null){
|
if (entListResult.getCode() == Result.SUCCESS && data != null){
|
||||||
|
|
|
@ -70,17 +70,6 @@
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.muyu</groupId>
|
||||||
<artifactId>cloud-common-api-doc</artifactId>
|
<artifactId>cloud-common-api-doc</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- XllJob定时任务 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.muyu</groupId>
|
|
||||||
<artifactId>cloud-common-xxl</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.muyu</groupId>
|
|
||||||
<artifactId>cloud-common-rabbit</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -11,7 +11,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
* @author muyu
|
* @author muyu
|
||||||
*/
|
*/
|
||||||
@EnableCustomConfig
|
@EnableCustomConfig
|
||||||
//@EnableCustomSwagger2
|
|
||||||
@EnableMyFeignClients
|
@EnableMyFeignClients
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class CloudCarApplication {
|
public class CloudCarApplication {
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
# Tomcat
|
||||||
|
server:
|
||||||
|
port: 14000
|
||||||
|
|
||||||
|
# nacos线上地址
|
||||||
|
nacos:
|
||||||
|
addr: 106.15.136.7:8848
|
||||||
|
user-name: nacos
|
||||||
|
password: nacos
|
||||||
|
namespace: xzr
|
||||||
|
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
# 应用名称
|
||||||
|
name: cloud-car
|
||||||
|
profiles:
|
||||||
|
# 环境配置
|
||||||
|
active: dev
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
discovery:
|
||||||
|
# 服务注册地址
|
||||||
|
server-addr: ${nacos.addr}
|
||||||
|
# nacos用户名
|
||||||
|
username: ${nacos.user-name}
|
||||||
|
# nacos密码
|
||||||
|
password: ${nacos.password}
|
||||||
|
# 命名空间
|
||||||
|
namespace: ${nacos.namespace}
|
||||||
|
config:
|
||||||
|
# 服务注册地址
|
||||||
|
server-addr: ${nacos.addr}
|
||||||
|
# nacos用户名
|
||||||
|
username: ${nacos.user-name}
|
||||||
|
# nacos密码
|
||||||
|
password: ${nacos.password}
|
||||||
|
# 命名空间
|
||||||
|
namespace: ${nacos.namespace}
|
||||||
|
# 配置文件格式
|
||||||
|
file-extension: yml
|
||||||
|
# 共享配置
|
||||||
|
shared-configs:
|
||||||
|
# 系统共享配置
|
||||||
|
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
|
# 系统环境Config共享配置
|
||||||
|
- application-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
com.muyu.system.mapper: DEBUG
|
|
@ -0,0 +1,154 @@
|
||||||
|
package com.muyu.many.datasource.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
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 io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: zi run
|
||||||
|
* @Date 2024/9/23 23:33
|
||||||
|
* @Description
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@TableName(value = "sys_car", autoResultMap = true)
|
||||||
|
public class Car {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自增主键
|
||||||
|
*/
|
||||||
|
@JsonFormat
|
||||||
|
@Schema
|
||||||
|
@NotNull
|
||||||
|
@Excel
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆VIN码
|
||||||
|
*/
|
||||||
|
@JsonFormat
|
||||||
|
@Schema
|
||||||
|
@Excel
|
||||||
|
@NotBlank
|
||||||
|
@TableField(value = "car_vin")
|
||||||
|
private String carVin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆车牌号
|
||||||
|
*/
|
||||||
|
@JsonFormat
|
||||||
|
@Schema
|
||||||
|
@Excel
|
||||||
|
@NotBlank
|
||||||
|
@TableField(value = "car_plate")
|
||||||
|
private String carPlate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆品牌
|
||||||
|
*/
|
||||||
|
@JsonFormat
|
||||||
|
@Schema
|
||||||
|
@Excel
|
||||||
|
@NotBlank
|
||||||
|
@TableField(value = "car_model")
|
||||||
|
private String carModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆类型
|
||||||
|
*/
|
||||||
|
@JsonFormat
|
||||||
|
@Schema
|
||||||
|
@Excel
|
||||||
|
@NotBlank
|
||||||
|
@TableField(value = "car_type")
|
||||||
|
private String carType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 连线时间
|
||||||
|
*/
|
||||||
|
@JsonFormat
|
||||||
|
@Schema
|
||||||
|
@Excel
|
||||||
|
@NotBlank
|
||||||
|
@TableField(value = "car_last_join_time")
|
||||||
|
private Date carLastJoinTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 离线时间
|
||||||
|
*/
|
||||||
|
@Schema
|
||||||
|
@Excel
|
||||||
|
@NotBlank
|
||||||
|
@TableField(value = "car_last_offline_time")
|
||||||
|
private Date carLastOfflineTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@Schema
|
||||||
|
@Excel
|
||||||
|
@NotBlank
|
||||||
|
@TableField(value = "status")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@Schema
|
||||||
|
@Excel
|
||||||
|
@NotBlank
|
||||||
|
@TableField(value = "create_by")
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Schema
|
||||||
|
@Excel
|
||||||
|
@NotBlank
|
||||||
|
@TableField(value = "create_time")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
@Schema
|
||||||
|
@Excel
|
||||||
|
@NotBlank
|
||||||
|
@TableField(value = "update_by")
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Schema
|
||||||
|
@Excel
|
||||||
|
@NotBlank
|
||||||
|
@TableField(value = "update_time")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@Schema
|
||||||
|
@Excel
|
||||||
|
@NotBlank
|
||||||
|
@TableField(value = "remark")
|
||||||
|
private String remark;
|
||||||
|
}
|
|
@ -0,0 +1,100 @@
|
||||||
|
package com.muyu.many.datasource.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.muyu.common.core.annotation.Excel;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: zi run
|
||||||
|
* @Date 2024/9/23 23:24
|
||||||
|
* @Description
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@TableName(value = "sys_corpuscle_fence", autoResultMap = true)
|
||||||
|
public class FenceGroup {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自增主键
|
||||||
|
*/
|
||||||
|
@Schema
|
||||||
|
@Excel
|
||||||
|
@NotNull
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 围栏编码
|
||||||
|
*/
|
||||||
|
@Schema
|
||||||
|
@Excel
|
||||||
|
@NotBlank
|
||||||
|
@TableField(value = "fence_code")
|
||||||
|
private String fenceCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务类型
|
||||||
|
*/
|
||||||
|
@Schema
|
||||||
|
@Excel
|
||||||
|
@NotEmpty
|
||||||
|
@TableField(value = "fence_business")
|
||||||
|
private String fenceBusiness;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 围栏名称
|
||||||
|
*/
|
||||||
|
@Schema
|
||||||
|
@Excel
|
||||||
|
@NotBlank
|
||||||
|
@TableField(value = "fence_name")
|
||||||
|
private String fenceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 围栏类型
|
||||||
|
*/
|
||||||
|
@Schema
|
||||||
|
@Excel
|
||||||
|
@NotNull
|
||||||
|
@TableField(value = "fence_type")
|
||||||
|
private String fenceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 围栏位置
|
||||||
|
*/
|
||||||
|
@Schema
|
||||||
|
@Excel
|
||||||
|
@NotBlank
|
||||||
|
@TableField(value = "fence_position")
|
||||||
|
private String fencePosition;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 启动状态
|
||||||
|
*/
|
||||||
|
@Schema
|
||||||
|
@Excel
|
||||||
|
@NotEmpty
|
||||||
|
@TableField(value = "status")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述信息
|
||||||
|
*/
|
||||||
|
@Schema
|
||||||
|
@Excel
|
||||||
|
@NotBlank
|
||||||
|
@TableField(value = "fence_desc")
|
||||||
|
private String fenceDesc;
|
||||||
|
}
|
Loading…
Reference in New Issue