Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-module-gen
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-module-gen
Commits
8aab79ce
提交
8aab79ce
authored
10月 22, 2024
作者:
李秋林
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新服务-执行sql
上级
f27bcf11
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
175 行增加
和
7 行删除
+175
-7
pom.xml
pom.xml
+7
-0
settings.xml
settings.xml
+161
-0
GenController.java
src/main/java/com/sfa/gen/controller/GenController.java
+4
-5
GenTableMapper.java
src/main/java/com/sfa/gen/mapper/GenTableMapper.java
+2
-1
IGenTableService.java
src/main/java/com/sfa/gen/service/IGenTableService.java
+1
-1
没有找到文件。
pom.xml
浏览文件 @
8aab79ce
...
@@ -74,6 +74,13 @@
...
@@ -74,6 +74,13 @@
<artifactId>
wangxiaolu-sfa-common-swagger
</artifactId>
<artifactId>
wangxiaolu-sfa-common-swagger
</artifactId>
</dependency>
</dependency>
<!-- https://mvnrepository.com/artifact/com.alibaba/druid-spring-boot-starter -->
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
druid-spring-boot-starter
</artifactId>
<version>
${druid-spring-boot-starter.version}
</version>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
settings.xml
0 → 100644
浏览文件 @
8aab79ce
<?xml version="1.0" encoding="UTF-8"?>
<settings
xmlns=
"http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"
>
<localRepository>
/Library/apache-maven-3.8.6/repository
</localRepository>
<mirrors>
<!-- <mirror>-->
<!-- <id>mirror</id>-->
<!-- <mirrorOf>!rdc-releases,!rdc-snapshots</mirrorOf>-->
<!-- <name>mirror</name>-->
<!-- <url>http://maven.aliyun.com/nexus/content/groups/public</url>-->
<!-- </mirror>-->
<mirror>
<id>
nexus-tencentyun
</id>
<!-- 此配置避免了本仓库制品的拉取流量被切换到腾讯云镜像源,保证您在使用镜像加速的同时可以从本仓库拉取制品 -->
<mirrorOf>
!g-pkkp8204-wangxiaolu-sfa-maven
</mirrorOf>
<name>
Nexus tencentyun
</name>
<url>
http://mirrors.cloud.tencent.com/nexus/repository/maven-public/
</url>
</mirror>
</mirrors>
<servers>
<server>
<id>
rdc-releases
</id>
<username>
G8G0iR
</username>
<password>
Do1l7QXnPg
</password>
</server>
<server>
<id>
rdc-snapshots
</id>
<username>
G8G0iR
</username>
<password>
Do1l7QXnPg
</password>
</server>
<server>
<id>
g-pkkp8204-wangxiaolu-sfa-maven
</id>
<username>
liqiulin@wangxiaolu.com.cn
</username>
<password>
Wangxiaolu_lql123
</password>
</server>
</servers>
<profiles>
<profile>
<id>
nexus
</id>
<repositories>
<repository>
<id>
central
</id>
<url>
http://maven.aliyun.com/nexus/content/groups/public
</url>
<releases>
<enabled>
true
</enabled>
</releases>
<snapshots>
<enabled>
false
</enabled>
</snapshots>
</repository>
<repository>
<id>
snapshots
</id>
<url>
http://maven.aliyun.com/nexus/content/groups/public
</url>
<releases>
<enabled>
false
</enabled>
</releases>
<snapshots>
<enabled>
true
</enabled>
</snapshots>
</repository>
<repository>
<id>
rdc-releases
</id>
<url>
https://repo.rdc.aliyun.com/repository/35126-release-kef1BI/
</url>
<releases>
<enabled>
true
</enabled>
</releases>
<snapshots>
<enabled>
false
</enabled>
</snapshots>
</repository>
<repository>
<id>
rdc-snapshots
</id>
<url>
https://repo.rdc.aliyun.com/repository/35126-snapshot-j8LEe7/
</url>
<releases>
<enabled>
false
</enabled>
</releases>
<snapshots>
<enabled>
true
</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>
central
</id>
<url>
http://maven.aliyun.com/nexus/content/groups/public
</url>
<releases>
<enabled>
true
</enabled>
</releases>
<snapshots>
<enabled>
false
</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>
snapshots
</id>
<url>
http://maven.aliyun.com/nexus/content/groups/public
</url>
<releases>
<enabled>
false
</enabled>
</releases>
<snapshots>
<enabled>
true
</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>
rdc-releases
</id>
<url>
https://repo.rdc.aliyun.com/repository/35126-release-kef1BI/
</url>
<releases>
<enabled>
true
</enabled>
</releases>
<snapshots>
<enabled>
false
</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>
rdc-snapshots
</id>
<url>
https://repo.rdc.aliyun.com/repository/35126-snapshot-j8LEe7/
</url>
<releases>
<enabled>
false
</enabled>
</releases>
<snapshots>
<enabled>
true
</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<id>
Repository Proxy
</id>
<activation>
<activeByDefault>
true
</activeByDefault>
</activation>
<repositories>
<repository>
<id>
g-pkkp8204-wangxiaolu-sfa-maven
</id>
<name>
maven
</name>
<url>
https://g-pkkp8204-maven.pkg.coding.net/repository/wangxiaolu-sfa/maven/
</url>
<releases>
<enabled>
true
</enabled>
</releases>
<snapshots>
<enabled>
true
</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>
nexus
</activeProfile>
</activeProfiles>
</settings>
\ No newline at end of file
src/main/java/com/sfa/gen/controller/GenController.java
浏览文件 @
8aab79ce
...
@@ -29,7 +29,7 @@ import com.sfa.common.core.web.page.TableDataInfo;
...
@@ -29,7 +29,7 @@ import com.sfa.common.core.web.page.TableDataInfo;
import
com.sfa.common.log.annotation.Log
;
import
com.sfa.common.log.annotation.Log
;
import
com.sfa.common.log.enums.BusinessType
;
import
com.sfa.common.log.enums.BusinessType
;
import
com.sfa.common.security.annotation.RequiresPermissions
;
import
com.sfa.common.security.annotation.RequiresPermissions
;
import
com.
ruoyi.common
.utils.sql.SqlUtil
;
import
com.
sfa.common.core
.utils.sql.SqlUtil
;
import
com.sfa.gen.domain.GenTable
;
import
com.sfa.gen.domain.GenTable
;
import
com.sfa.gen.domain.GenTableColumn
;
import
com.sfa.gen.domain.GenTableColumn
;
import
com.sfa.gen.service.IGenTableColumnService
;
import
com.sfa.gen.service.IGenTableColumnService
;
...
@@ -65,7 +65,7 @@ public class GenController extends BaseController
...
@@ -65,7 +65,7 @@ public class GenController extends BaseController
/**
/**
* 创建表结构(保存)
* 创建表结构(保存)
*/
*/
@
PreAuthorize
(
"@ss.hasRole('admin')"
)
@
RequiresPermissions
(
"@ss.hasRole('admin')"
)
@Log
(
title
=
"创建表"
,
businessType
=
BusinessType
.
OTHER
)
@Log
(
title
=
"创建表"
,
businessType
=
BusinessType
.
OTHER
)
@PostMapping
(
"/createTable"
)
@PostMapping
(
"/createTable"
)
public
AjaxResult
createTableSave
(
String
sql
)
public
AjaxResult
createTableSave
(
String
sql
)
...
@@ -87,9 +87,8 @@ public class GenController extends BaseController
...
@@ -87,9 +87,8 @@ public class GenController extends BaseController
}
}
}
}
}
}
List
<
GenTable
>
tableList
=
genTableService
.
selectDbTableListByNames
(
tableNames
.
toArray
(
new
String
[
tableNames
.
size
()]));
List
<
GenTable
>
tableList
=
genTableService
.
selectDbTableListByNames
(
tableNames
.
toArray
(
new
String
[
0
]));
String
operName
=
SecurityUtils
.
getUsername
();
genTableService
.
importGenTable
(
tableList
);
genTableService
.
importGenTable
(
tableList
,
operName
);
return
AjaxResult
.
success
();
return
AjaxResult
.
success
();
}
}
catch
(
Exception
e
)
catch
(
Exception
e
)
...
...
src/main/java/com/sfa/gen/mapper/GenTableMapper.java
浏览文件 @
8aab79ce
...
@@ -91,5 +91,5 @@ public interface GenTableMapper
...
@@ -91,5 +91,5 @@ public interface GenTableMapper
* @param sql 创建表语句
* @param sql 创建表语句
* @return 结果
* @return 结果
*/
*/
public
boolean
createTable
(
String
sql
);
public
int
createTable
(
String
sql
);
}
}
\ No newline at end of file
src/main/java/com/sfa/gen/service/IGenTableService.java
浏览文件 @
8aab79ce
...
@@ -72,7 +72,7 @@ public interface IGenTableService
...
@@ -72,7 +72,7 @@ public interface IGenTableService
* @param sql 表结构
* @param sql 表结构
* @return 结果
* @return 结果
*/
*/
public
int
createTable
(
String
sql
);
public
boolean
createTable
(
String
sql
);
/**
/**
* 导入表结构
* 导入表结构
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论