Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-tool
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tool
amos-tool
Commits
25f5aedd
Commit
25f5aedd
authored
Dec 14, 2023
by
chenzai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
90cf39d2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
70 deletions
+2
-70
RelationResource.java
...om/yeejoin/amos/api/tool/controller/RelationResource.java
+0
-51
StudioResourceService.java
...oin/amos/api/tool/face/service/StudioResourceService.java
+1
-1
ToolLibraryService.java
...eejoin/amos/api/tool/face/service/ToolLibraryService.java
+1
-12
application-dev.properties
src/main/resources/application-dev.properties
+0
-6
No files found.
src/main/java/com/yeejoin/amos/api/tool/controller/RelationResource.java
View file @
25f5aedd
...
@@ -52,39 +52,9 @@ public class RelationResource {
...
@@ -52,39 +52,9 @@ public class RelationResource {
*
*
* @return String
* @return String
*/
*/
// @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
// @GetMapping(value = "/export/{agencyCode}/{sequenceNbrs}")
// @ApiOperation(httpMethod = "GET", value = "导出", notes = "导出")
//// public ResponseModel<String> generateSQL(
//// @RequestParam(value = "databaseName",required = false) String databaseName,
// public void generateSQL(
// @PathVariable String agencyCode,
// @PathVariable String sequenceNbrs,
// HttpServletResponse response,
// HttpServletRequest request) throws Exception {
// Map<String, Object> variables = new HashMap<>();
// variables.put("agencyCode", agencyCode);
// String referer = request.getHeader("Referer");
// int start = referer.indexOf("ipSeq=")+6;
// int end = referer.indexOf("&agencyCode=");
// String ipSeq = referer.substring(start,end);
// Long longIpSql = Long.parseLong(ipSeq);
// studioResourceService.generateSQL("Agency","agencyCode", longIpSql, variables, response);
// studioResourceService.generateSQLByDatabaseName("Agency","agencyCode",databaseName, longIpSql, variables, response);
//// return ResponseHelper.buildResponse("yes");
// }
/**
* 导出SQL脚本
*
* @return String
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/export/{agencyCode}/{ipSeq}/{dbSeqs}"
)
@GetMapping
(
value
=
"/export/{agencyCode}/{ipSeq}/{dbSeqs}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"导出"
,
notes
=
"导出"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"导出"
,
notes
=
"导出"
)
// public ResponseModel<String> generateSQL(
// @RequestParam(value = "databaseName",required = false) String databaseName,
public
void
generateSQL
(
public
void
generateSQL
(
@PathVariable
String
agencyCode
,
@PathVariable
String
agencyCode
,
@PathVariable
Long
ipSeq
,
@PathVariable
Long
ipSeq
,
...
@@ -93,28 +63,8 @@ public class RelationResource {
...
@@ -93,28 +63,8 @@ public class RelationResource {
HttpServletRequest
request
)
throws
Exception
{
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
Object
>
variables
=
new
HashMap
<>();
Map
<
String
,
Object
>
variables
=
new
HashMap
<>();
variables
.
put
(
"agencyCode"
,
agencyCode
);
variables
.
put
(
"agencyCode"
,
agencyCode
);
// String referer = request.getHeader("Referer");
// int start = referer.indexOf("ipSeq=")+6;
// int end = referer.indexOf("&agencyCode=");
// String ipSeq = referer.substring(start,end);
// studioResourceService.generateSQL("Agency","agencyCode", ipSeq, variables, response);
studioResourceService
.
generateSQLByDatabaseName
(
"Agency"
,
"agencyCode"
,
dbSeqs
,
ipSeq
,
variables
,
response
);
studioResourceService
.
generateSQLByDatabaseName
(
"Agency"
,
"agencyCode"
,
dbSeqs
,
ipSeq
,
variables
,
response
);
// return ResponseHelper.buildResponse("yes");
}
}
// @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
// @GetMapping(value = "/export/{agencyCode}/{ipSeq}/{dbName}")
// @ApiOperation(httpMethod = "GET", value = "导出", notes = "导出")
// public ResponseModel<String> generateSQL(
// @PathVariable String agencyCode,
// @PathVariable Long ipSeq,
// @PathVariable String dbName,
// HttpServletResponse response) throws Exception {
// relationService.outputAgency(agencyCode, ipSeq,dbName,response);
// return ResponseHelper.buildResponse("yes");
// }
}
}
\ No newline at end of file
src/main/java/com/yeejoin/amos/api/tool/face/service/StudioResourceService.java
View file @
25f5aedd
...
@@ -205,7 +205,7 @@ public class StudioResourceService extends BaseService<StudioResourceModel, Stud
...
@@ -205,7 +205,7 @@ public class StudioResourceService extends BaseService<StudioResourceModel, Stud
sqlDirectory
.
mkdir
();
sqlDirectory
.
mkdir
();
}
}
// 备份文件路径名称
// 备份文件路径名称
//
String fileName = (SourceEnum.IDX.getSource().equals(resourceCode.toLowerCase()) ? (resourceCode.toLowerCase() + "_") : "studio_") + DateFormatUtils.format(new Date(), "yyyyMMdd") + "." + SUFFIX;
//
String fileName = (SourceEnum.IDX.getSource().equals(resourceCode.toLowerCase()) ? (resourceCode.toLowerCase() + "_") : "studio_") + DateFormatUtils.format(new Date(), "yyyyMMdd") + "." + SUFFIX;
String
fileName
=
databaseName
+
DateFormatUtils
.
format
(
new
Date
(),
"yyyyMMdd"
)
+
"."
+
SUFFIX
;
String
fileName
=
databaseName
+
DateFormatUtils
.
format
(
new
Date
(),
"yyyyMMdd"
)
+
"."
+
SUFFIX
;
String
sqlFilePath
=
backPath
+
SLASH
+
fileName
;
String
sqlFilePath
=
backPath
+
SLASH
+
fileName
;
File
file
=
new
File
(
sqlFilePath
);
File
file
=
new
File
(
sqlFilePath
);
...
...
src/main/java/com/yeejoin/amos/api/tool/face/service/ToolLibraryService.java
View file @
25f5aedd
...
@@ -24,6 +24,7 @@ import java.util.*;
...
@@ -24,6 +24,7 @@ import java.util.*;
@Service
@Service
public
class
ToolLibraryService
extends
BaseService
<
ToolLibraryModel
,
ToolLibrary
,
ToolLibraryMapper
>
{
public
class
ToolLibraryService
extends
BaseService
<
ToolLibraryModel
,
ToolLibrary
,
ToolLibraryMapper
>
{
private
final
String
className
=
"com.mysql.cj.jdbc.Driver"
;
private
final
String
className
=
"com.mysql.cj.jdbc.Driver"
;
private
final
String
url
=
"jdbc:mysql://172.16.3.18:3306/amos_studio"
;
private
final
String
url
=
"jdbc:mysql://172.16.3.18:3306/amos_studio"
;
...
@@ -32,18 +33,6 @@ public class ToolLibraryService extends BaseService<ToolLibraryModel, ToolLibrar
...
@@ -32,18 +33,6 @@ public class ToolLibraryService extends BaseService<ToolLibraryModel, ToolLibrar
private
final
String
passWord
=
"Yeejoin@2020"
;
private
final
String
passWord
=
"Yeejoin@2020"
;
// @Value("${toolLibrary.className}")
// private String className;
//
// @Value("${toolLibrary.url}")
// private String url;
//
// @Value("${toolLibrary.userName}")
// private String userName;
//
// @Value("${toolLibrary.passWord}")
// private String passWord;
/**
/**
* 由一级到二级
* 由一级到二级
*/
*/
...
...
src/main/resources/application-dev.properties
View file @
25f5aedd
...
@@ -55,8 +55,3 @@ spring.boot.admin.client.password=a1234560
...
@@ -55,8 +55,3 @@ spring.boot.admin.client.password=a1234560
management.security.enabled
=
false
management.security.enabled
=
false
management.endpoint.health.show-details
=
always
management.endpoint.health.show-details
=
always
management.endpoints.web.exposure.include
=
*
management.endpoints.web.exposure.include
=
*
#toolLibrary.className=com.mysql.cj.jdbc.Driver
#toolLibrary.url=jdbc:mysql://172.16.3.18:3306/amos_studio
#toolLibrary.userName=root
#
toolLibrary.passWord
=
Yeejoin@2020
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment