Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setup-manager
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
setup-manager
Commits
342c9e13
Commit
342c9e13
authored
Nov 08, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加区域树
parent
92c6aa91
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
61 additions
and
7 deletions
+61
-7
setup-project-manager/src/main/java/com/mortals/xhx/common/code/ProductDisEnum.java
...main/java/com/mortals/xhx/common/code/ProductDisEnum.java
+1
-1
setup-project-manager/src/main/java/com/mortals/xhx/common/utils/CharsetKit.java
...rc/main/java/com/mortals/xhx/common/utils/CharsetKit.java
+12
-0
setup-project-manager/src/main/java/com/mortals/xhx/module/setup/mode/BaseReq.java
.../main/java/com/mortals/xhx/module/setup/mode/BaseReq.java
+0
-1
setup-project-manager/src/main/java/com/mortals/xhx/module/setup/model/SetupProjectEntity.java
...om/mortals/xhx/module/setup/model/SetupProjectEntity.java
+44
-2
setup-project-manager/src/main/java/com/mortals/xhx/module/setup/service/SetupDbService.java
.../com/mortals/xhx/module/setup/service/SetupDbService.java
+1
-1
setup-project-manager/src/main/java/com/mortals/xhx/module/setup/service/impl/SetupDbServiceImpl.java
...als/xhx/module/setup/service/impl/SetupDbServiceImpl.java
+1
-0
setup-project-manager/src/main/java/com/mortals/xhx/module/setup/service/impl/SetupProjectServiceImpl.java
...hx/module/setup/service/impl/SetupProjectServiceImpl.java
+2
-2
No files found.
setup-project-manager/src/main/java/com/mortals/xhx/common/code/ProductDisEnum.java
View file @
342c9e13
...
@@ -13,7 +13,7 @@ public enum ProductDisEnum {
...
@@ -13,7 +13,7 @@ public enum ProductDisEnum {
网关服务
(
"smart-gateway"
,
"smart-gateway"
),
网关服务
(
"smart-gateway"
,
"smart-gateway"
),
基础服务
(
"base-manager"
,
"base-manager"
),
基础服务
(
"base-manager"
,
"base-manager"
),
基础服务前端
(
"base-manager-ui"
,
"base-manager-ui"
),
基础服务前端
(
"base-manager-ui"
,
"base-manager-ui"
),
门户服务
(
"portal-manager"
,
"portal-
platform
"
),
门户服务
(
"portal-manager"
,
"portal-
manager
"
),
门户服务前端
(
"portal-manager-ui"
,
"portal-manager-ui"
),
门户服务前端
(
"portal-manager-ui"
,
"portal-manager-ui"
),
设备管理服务
(
"device-manager"
,
"device-platform"
),
设备管理服务
(
"device-manager"
,
"device-platform"
),
设备管理服务前端
(
"device-manager-ui"
,
"device-manager-ui"
),
设备管理服务前端
(
"device-manager-ui"
,
"device-manager-ui"
),
...
...
setup-project-manager/src/main/java/com/mortals/xhx/common/utils/CharsetKit.java
View file @
342c9e13
...
@@ -10,6 +10,7 @@ import java.nio.charset.StandardCharsets;
...
@@ -10,6 +10,7 @@ import java.nio.charset.StandardCharsets;
* @date: 2021/9/28 15:54
* @date: 2021/9/28 15:54
*/
*/
public
class
CharsetKit
{
public
class
CharsetKit
{
/**
/**
* ISO-8859-1
* ISO-8859-1
*/
*/
...
@@ -87,4 +88,15 @@ public class CharsetKit {
...
@@ -87,4 +88,15 @@ public class CharsetKit {
public
static
String
systemCharset
()
{
public
static
String
systemCharset
()
{
return
Charset
.
defaultCharset
().
name
();
return
Charset
.
defaultCharset
().
name
();
}
}
public
static
void
main
(
String
[]
args
)
{
double
xxx
=
2.3
;
float
bbb
=
2.4f
;
int
intx
=
1
;
long
long1
=
1L
;
Long
aLong
=
new
Long
(
long1
);
Double
aDouble
=
new
Double
(
xxx
);
}
}
}
setup-project-manager/src/main/java/com/mortals/xhx/module/setup/mode/BaseReq.java
View file @
342c9e13
...
@@ -26,7 +26,6 @@ public abstract class BaseReq implements Serializable {
...
@@ -26,7 +26,6 @@ public abstract class BaseReq implements Serializable {
*/
*/
private
String
dbPort
;
private
String
dbPort
;
/**
/**
* db名称
* db名称
*/
*/
...
...
setup-project-manager/src/main/java/com/mortals/xhx/module/setup/model/SetupProjectEntity.java
View file @
342c9e13
...
@@ -6,7 +6,9 @@ import cn.hutool.core.date.DateUtil;
...
@@ -6,7 +6,9 @@ import cn.hutool.core.date.DateUtil;
import
java.util.Date
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.mortals.framework.annotation.Excel
;
import
com.mortals.framework.annotation.Excel
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.framework.util.ThreadPool
;
import
com.mortals.xhx.module.setup.model.vo.SetupProjectVo
;
import
com.mortals.xhx.module.setup.model.vo.SetupProjectVo
;
import
lombok.Data
;
import
lombok.Data
;
/**
/**
...
@@ -74,11 +76,11 @@ public class SetupProjectEntity extends SetupProjectVo {
...
@@ -74,11 +76,11 @@ public class SetupProjectEntity extends SetupProjectVo {
/**
/**
* 备注
* 备注
*/
*/
private
String
remark
;
private
String
remark
=
"xxx"
;
/**
/**
* 排序字段
* 排序字段
*/
*/
private
Long
orderNum
;
private
Long
orderNum
=
1L
;
/**
/**
* 站点Id
* 站点Id
*/
*/
...
@@ -137,4 +139,44 @@ public class SetupProjectEntity extends SetupProjectVo {
...
@@ -137,4 +139,44 @@ public class SetupProjectEntity extends SetupProjectVo {
this
.
areaCode
=
""
;
this
.
areaCode
=
""
;
this
.
areaName
=
""
;
this
.
areaName
=
""
;
}
}
public
static
void
main
(
String
[]
args
)
{
/*
dddd
*/
//ddddd
String
str
=
"aaa,,,"
;
String
[]
ary
=
str
.
split
(
","
);
System
.
out
.
println
(
ary
.
length
);
Runnable
runnable
=
new
Runnable
()
{
@Override
public
void
run
()
{
//todo
}
};
ThreadPool
.
getInstance
().
execute
(
runnable
);
if
(
1
==
1
)
{
throw
new
AppException
(
"cuo"
);
}
int
i
=
1
;
if
(
isBusy
(
i
)){
//todo
return
;
}
if
(
i
==
1
){
//todo
return
;
}
//i<1 todo
}
public
static
boolean
isBusy
(
int
i
){
return
i
>
1
&&
i
<
2
||
1
>
2
;
}
}
}
\ No newline at end of file
setup-project-manager/src/main/java/com/mortals/xhx/module/setup/service/SetupDbService.java
View file @
342c9e13
...
@@ -16,7 +16,7 @@ public interface SetupDbService {
...
@@ -16,7 +16,7 @@ public interface SetupDbService {
* 初始化db
* 初始化db
*
*
* @param dbSetupEntity
* @param dbSetupEntity
* @return
* @return
rest对象,包含数据库实际链接等
*/
*/
Rest
<
String
>
initDb
(
DbSetupEntity
dbSetupEntity
);
Rest
<
String
>
initDb
(
DbSetupEntity
dbSetupEntity
);
...
...
setup-project-manager/src/main/java/com/mortals/xhx/module/setup/service/impl/SetupDbServiceImpl.java
View file @
342c9e13
...
@@ -86,6 +86,7 @@ public class SetupDbServiceImpl implements SetupDbService {
...
@@ -86,6 +86,7 @@ public class SetupDbServiceImpl implements SetupDbService {
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"链接数据库异常"
,
e
);
log
.
error
(
"链接数据库异常"
,
e
);
//return null;
return
Rest
.
fail
(
e
.
getMessage
());
return
Rest
.
fail
(
e
.
getMessage
());
}
}
}
}
...
...
setup-project-manager/src/main/java/com/mortals/xhx/module/setup/service/impl/SetupProjectServiceImpl.java
View file @
342c9e13
...
@@ -101,7 +101,7 @@ public class SetupProjectServiceImpl extends AbstractCRUDServiceImpl<SetupProjec
...
@@ -101,7 +101,7 @@ public class SetupProjectServiceImpl extends AbstractCRUDServiceImpl<SetupProjec
String
sourcePath
=
this
.
publishPath
+
"/temp/project/"
+
ProductDisEnum
.
getByValue
(
setupProjectEntity
.
getProjectCode
()).
getDesc
()
+
"/"
+
ProductDisEnum
.
getByValue
(
setupProjectEntity
.
getProjectCode
()).
getValue
()
+
".tar.gz"
;
String
sourcePath
=
this
.
publishPath
+
"/temp/project/"
+
ProductDisEnum
.
getByValue
(
setupProjectEntity
.
getProjectCode
()).
getDesc
()
+
"/"
+
ProductDisEnum
.
getByValue
(
setupProjectEntity
.
getProjectCode
()).
getValue
()
+
".tar.gz"
;
File
file
=
new
File
(
sourcePath
);
File
file
=
new
File
(
sourcePath
);
log
.
info
(
"文件
存在:{}"
,
file
.
exists
());
log
.
info
(
"文件
路径:{},存在:{}"
,
sourcePath
,
file
.
exists
());
File
destDir
=
new
File
(
setupProjectEntity
.
getProjectPath
());
File
destDir
=
new
File
(
setupProjectEntity
.
getProjectPath
());
...
@@ -181,7 +181,7 @@ public class SetupProjectServiceImpl extends AbstractCRUDServiceImpl<SetupProjec
...
@@ -181,7 +181,7 @@ public class SetupProjectServiceImpl extends AbstractCRUDServiceImpl<SetupProjec
String
sourceUiZipPath
=
path
+
".zip"
;
String
sourceUiZipPath
=
path
+
".zip"
;
File
uiZipFile
=
new
File
(
sourceUiZipPath
);
File
uiZipFile
=
new
File
(
sourceUiZipPath
);
File
destDir
=
new
File
(
setupProjectEntity
.
getProjectPath
());
File
destDir
=
new
File
(
setupProjectEntity
.
getProjectPath
());
log
.
info
(
"tar文件存在:{},
zip文件存在:{}"
,
uiFile
.
exists
(),
uiZipFile
.
exists
()
);
log
.
info
(
"tar文件存在:{},
文件路径:{},zip文件存在:{},文件路径:{}"
,
uiFile
.
exists
(),
sourceUiPath
,
uiZipFile
.
exists
(),
sourceUiZipPath
);
if
(
uiFile
.
exists
())
{
if
(
uiFile
.
exists
())
{
//解压tar.gz
//解压tar.gz
final
TarGZipUnArchiver
ua
=
new
TarGZipUnArchiver
();
final
TarGZipUnArchiver
ua
=
new
TarGZipUnArchiver
();
...
...
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