fine:()修改存在异常的东西
parent
6c23f33ec0
commit
042566eb3c
|
@ -10,7 +10,7 @@
|
|||
</parent>
|
||||
|
||||
<artifactId>cloud-property-common</artifactId>
|
||||
|
||||
<version>1.0.0</version>
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package com.muyu.common.domain;
|
||||
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
|
@ -18,10 +18,11 @@ import java.util.function.Supplier;
|
|||
* @Date:2024/8/21 1:00
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class Connect extends BaseEntity {
|
||||
@TableName("connect")
|
||||
public class Connect {
|
||||
|
||||
/**
|
||||
* id
|
||||
|
@ -58,6 +59,11 @@ public class Connect extends BaseEntity {
|
|||
*/
|
||||
private String databaseName;
|
||||
|
||||
/**
|
||||
* 数据接入类型
|
||||
*/
|
||||
private String dataAccType;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
|
@ -103,6 +109,7 @@ public class Connect extends BaseEntity {
|
|||
/**
|
||||
* 客户最近5条支付单
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private List<Connect> connectList;
|
||||
|
||||
public static Connect connectBuild(Connect connect1, Supplier<List<Connect>> function) {
|
||||
|
|
|
@ -16,11 +16,11 @@ import java.util.function.Supplier;
|
|||
* @Date:2024/8/23 11:39
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("TableFie")
|
||||
public class TableFie extends BaseEntity {
|
||||
@TableName("tablefie")
|
||||
public class TableFie{
|
||||
|
||||
private Integer id;
|
||||
@TableField(value = "field")
|
||||
|
@ -29,7 +29,7 @@ public class TableFie extends BaseEntity {
|
|||
private String collation;
|
||||
private String nullable;
|
||||
@TableField(value = "primarys")
|
||||
private String primary;
|
||||
private String primarys;
|
||||
private String annotation;
|
||||
|
||||
public static TableFie customerBuild(TableFie tableFie, Supplier<TableFie> function) {
|
||||
|
@ -38,7 +38,7 @@ public class TableFie extends BaseEntity {
|
|||
.type(tableFie.getType())
|
||||
.collation(tableFie.getCollation())
|
||||
.nullable(tableFie.getNullable())
|
||||
.primary(tableFie.getPrimary())
|
||||
.primarys(tableFie.getPrimarys())
|
||||
.annotation(tableFie.getAnnotation())
|
||||
.build();
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public class TableFie extends BaseEntity {
|
|||
.type(req.getType())
|
||||
.collation(req.getCollation())
|
||||
.nullable(req.getNullable())
|
||||
.primary(req.getPrimary())
|
||||
.primarys(req.getPrimarys())
|
||||
.annotation(req.getAnnotation())
|
||||
.build();
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ public class TableFie extends BaseEntity {
|
|||
.type(req.getType())
|
||||
.collation(req.getCollation())
|
||||
.nullable(req.getNullable())
|
||||
.primary(req.getPrimary())
|
||||
.primarys(req.getPrimarys())
|
||||
.annotation(req.getAnnotation())
|
||||
.build();
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ public class TableFie extends BaseEntity {
|
|||
.type(this.getType())
|
||||
.collation(this.getCollation())
|
||||
.nullable(this.getNullable())
|
||||
.primary(this.getPrimary())
|
||||
.primarys(this.getPrimarys())
|
||||
.annotation(this.getAnnotation())
|
||||
.build();
|
||||
}
|
||||
|
|
|
@ -23,9 +23,9 @@ public class TableNames extends BaseEntity {
|
|||
/**
|
||||
* 表名称
|
||||
*/
|
||||
private String[] tableName;
|
||||
private String[] tableName = new String[20];
|
||||
/**
|
||||
* 数据库名称
|
||||
*/
|
||||
private String[] dataName;
|
||||
private String[] dataName = new String[10];
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import io.swagger.v3.oas.annotations.Operation;
|
|||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
@ -38,7 +39,11 @@ public class ConnectController {
|
|||
public Result<List<Connect>> selectConnect(
|
||||
@Validated @RequestBody Connect connect
|
||||
){
|
||||
return Result.success(connectService.selectConnect(connect));
|
||||
List<Connect> connects = connectService.selectConnect(connect);
|
||||
if (CollectionUtils.isEmpty(connects)){
|
||||
return Result.success(null,"查询成功");
|
||||
}
|
||||
return Result.error(null,"查询失败");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -49,7 +49,7 @@ public class TableFieldController {
|
|||
@PostMapping("/add")
|
||||
@Operation(summary = "数据字段添加",description = "添加数据字段信息,添加成功之后才可以使用数据字段")
|
||||
public Result<String> save(@Validated @RequestBody TableFie tableFie){
|
||||
tableFieldService.save(com.muyu.common.domain.TableFie.addBuild(tableFie));
|
||||
tableFieldService.save(TableFie.addBuild(tableFie));
|
||||
return Result.success(null,"操作成功");
|
||||
}
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ public class DataSourceServiceImpl
|
|||
.type(rs.getString("Type"))
|
||||
.collation(rs.getString("Collation"))
|
||||
.nullable(rs.getString("Null")) // 转换为布尔值,假设你想要这个字段
|
||||
.primary(rs.getString("Key"))
|
||||
.primarys(rs.getString("Key"))
|
||||
.annotation(rs.getString("Comment"))
|
||||
.build();
|
||||
tableFIES.add(tableFie);
|
||||
|
@ -209,10 +209,11 @@ public class DataSourceServiceImpl
|
|||
ResultSet rs = preparedStatement.executeQuery();
|
||||
TableNames tableNames = new TableNames();
|
||||
int count = 0;
|
||||
String[] dataName = tableNames.getDataName();
|
||||
while (rs.next()) {
|
||||
String database = rs.getString("Database");
|
||||
|
||||
tableNames.getDataName()[count] = database;
|
||||
System.out.println(database);
|
||||
dataName[count] = database;
|
||||
count++;
|
||||
System.out.println(tableNames);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.muyu.server.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.common.domain.Connect;
|
||||
import com.muyu.server.mapper.OrderConnectMapper;
|
||||
|
@ -24,7 +23,7 @@ public class OrderConnectServiceImpl extends ServiceImpl<OrderConnectMapper, Con
|
|||
|
||||
LambdaQueryWrapper<Connect> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(Connect::getId,id);
|
||||
queryWrapper.orderBy(true,false,Connect::getCreateTime);
|
||||
queryWrapper.orderBy(true,false,Connect::getId);
|
||||
queryWrapper.last("limit "+limit);
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ public class TableFieldServiceImpl
|
|||
public List<TableFie> selectList(TableFie tableFie) {
|
||||
LambdaQueryWrapper<TableFie> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.like(
|
||||
StringUtils.isNotEmpty(tableFie.getType()),
|
||||
StringUtils.isNotBlank(tableFie.getType()),
|
||||
com.muyu.common.domain.TableFie::getType, tableFie.getType()
|
||||
);
|
||||
List<TableFie> tableFieList = this.list(queryWrapper);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue