Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
base-platform
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
赵啸非
base-platform
Commits
dcf7c3b9
Commit
dcf7c3b9
authored
Jan 25, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改工作人员
parent
e10f22cb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
54 deletions
+46
-54
base-manager/src/main/bin/shutdown.sh
base-manager/src/main/bin/shutdown.sh
+26
-0
base-manager/src/main/bin/stop.sh
base-manager/src/main/bin/stop.sh
+0
-52
base-manager/src/main/java/com/mortals/xhx/base/system/param/service/ParamService.java
...m/mortals/xhx/base/system/param/service/ParamService.java
+10
-0
base-manager/src/main/java/com/mortals/xhx/base/system/param/service/impl/ParamServiceImpl.java
.../xhx/base/system/param/service/impl/ParamServiceImpl.java
+8
-0
pom.xml
pom.xml
+2
-2
No files found.
base-manager/src/main/bin/shutdown.sh
0 → 100644
View file @
dcf7c3b9
#! /bin/sh
PORT
=
"17211"
BASEDIR
=
`
dirname
$0
`
BASEDIR
=
`
(
cd
"
$BASEDIR
"
;
pwd
)
`
PROJECT_NAME
=
"@project.artifactId@"
MAIN_CLASS
=
"
$PROJECT_NAME
"
;
if
[
!
-n
"
$PORT
"
]
;
then
echo
$"Usage:
$0
{port}"
exit
$FAIL
fi
pid
=
`
ps ax |
grep
-i
"
$MAIN_CLASS
"
|
grep
java |
grep
-v
grep
|
awk
'{print $1}'
`
if
[
-z
"
$pid
"
]
;
then
echo
"No Server running."
exit
-1
;
fi
echo
"stoping application
$PROJECT_NAME
......"
kill
${
pid
}
echo
"Send shutdown request to Server
$PROJECT_NAME
OK"
base-manager/src/main/bin/stop.sh
deleted
100644 → 0
View file @
e10f22cb
#! /bin/sh
PORT
=
"@profiles.server.port@"
BASEDIR
=
`
dirname
$0
`
BASEDIR
=
`
(
cd
"
$BASEDIR
"
;
pwd
)
`
PROJECT_NAME
=
"@project.artifactId@"
MAIN_CLASS
=
"
$PROJECT_NAME
"
;
if
[
!
-n
"
$PORT
"
]
;
then
echo
$"Usage:
$0
{port}"
exit
$FAIL
fi
echo
"stoping application
$PROJECT_NAME
......"
jcpid
=
`
ps
-ef
|
grep
-v
"grep"
|
grep
"
$MAIN_CLASS
"
|
grep
"app.port=
$PORT
"
|
sed
-n
'1P'
|
awk
'{print $2}'
`
if
[
-z
$jcpid
]
;
then
echo
"
$PROJECT_NAME
is not started or has been stopped!"
else
curl
-X
POST
-i
-u
$SECURITY_USERNAME
:
$SECURITY_PASSWORD
http://127.0.0.1:
$PORT
/xxx_manager/shutdown
for
i
in
{
1..60
}
do
jcpid
=
`
ps
-ef
|
grep
-v
"grep"
|
grep
"
$MAIN_CLASS
"
|
grep
"app.port=
$PORT
"
|
sed
-n
'1P'
|
awk
'{print $2}'
`
if
[
-z
$jcpid
]
;
then
echo
"
$PROJECT_NAME
has been stopped!"
break
else
echo
"stoping the application ..
$i
"
sleep
1
fi
done
jcpid
=
`
ps
-ef
|
grep
-v
"grep"
|
grep
"
$MAIN_CLASS
"
|
grep
"app.port=
$PORT
"
|
sed
-n
'1P'
|
awk
'{print $2}'
`
if
[
$jcpid
]
;
then
[
-z
$jcpid
]
||
kill
-15
$jcpid
for
i
in
{
1..30
}
do
jcpid
=
`
ps
-ef
|
grep
-v
"grep"
|
grep
"
$MAIN_CLASS
"
|
grep
"app.port=
$PORT
"
|
sed
-n
'1P'
|
awk
'{print $2}'
`
if
[
-z
$jcpid
]
;
then
echo
"
$PROJECT_NAME
has been stopped!"
break
else
echo
"stoping the application ..
$i
"
sleep
1
fi
done
fi
jcpid
=
`
ps
-ef
|
grep
-v
"grep"
|
grep
"
$MAIN_CLASS
"
|
grep
"app.port=
$PORT
"
|
sed
-n
'1P'
|
awk
'{print $2}'
`
if
[
$jcpid
]
;
then
[
-z
$jcpid
]
||
kill
-9
$jcpid
[
$?
-eq
0
]
&&
echo
"Stop
$PROJECT_NAME
OK!"
||
echo
"Stop
$PROJECT_NAME
Fail!"
fi
fi
base-manager/src/main/java/com/mortals/xhx/base/system/param/service/ParamService.java
View file @
dcf7c3b9
package
com.mortals.xhx.base.system.param.service
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.ICRUDCacheService
;
import
com.mortals.framework.service.IParamService
;
import
com.mortals.xhx.base.system.param.model.ParamEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -44,4 +46,12 @@ public interface ParamService extends ICRUDCacheService<ParamEntity, Long>, IPar
*/
Map
<
String
,
String
>
getParamBySecondOrganize
(
String
firstOrganize
,
String
secondOrganize
,
String
...
excludeParamKeys
);
/**
* 获取所有字典原始
* @param context
* @return
*/
Map
<
String
,
Map
<
String
,
String
>>
getAllDict
(
Context
context
);
}
\ No newline at end of file
base-manager/src/main/java/com/mortals/xhx/base/system/param/service/impl/ParamServiceImpl.java
View file @
dcf7c3b9
...
...
@@ -88,6 +88,14 @@ public class ParamServiceImpl extends AbstractCRUDCacheServiceImpl<ParamDao, Par
.
collect
(
Collectors
.
toMap
(
ParamEntity:
:
getParamKey
,
ParamEntity:
:
getParamValue
));
}
@Override
public
Map
<
String
,
Map
<
String
,
String
>>
getAllDict
(
Context
context
)
{
Map
<
String
,
Map
<
String
,
String
>>
collect
=
this
.
find
(
new
ParamQuery
()).
stream
().
filter
(
f
->
f
.
getFirstOrganize
()
!=
null
).
collect
(
Collectors
.
groupingBy
(
item
->
item
.
getRemark
(),
Collectors
.
toMap
(
x
->
x
.
getParamKey
(),
y
->
y
.
getParamValue
(),
(
o
,
n
)
->
n
)));
return
collect
;
}
@Override
public
boolean
needRefresh
()
{
...
...
pom.xml
View file @
dcf7c3b9
...
...
@@ -53,14 +53,14 @@
<profiles.active>
test
</profiles.active>
<profiles.server.port>
17211
</profiles.server.port>
<profiles.datasource.uri>
<![CDATA[jdbc:mysql://192.168.0.
252
:3306/base-platform?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Hongkong]]>
</profiles.datasource.uri>
<![CDATA[jdbc:mysql://192.168.0.
98
:3306/base-platform?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Hongkong]]>
</profiles.datasource.uri>
<profiles.datasource.username>
root
</profiles.datasource.username>
<profiles.datasource.password>
nacos@2020
</profiles.datasource.password>
<profiles.redis.uri>
192.168.0.252
</profiles.redis.uri>
<profiles.redis.port>
6379
</profiles.redis.port>
<profiles.redis.username></profiles.redis.username>
<profiles.redis.password>
hotel@2020
</profiles.redis.password>
<profiles.redis.database>
2
</profiles.redis.database>
<profiles.redis.database>
4
</profiles.redis.database>
<profiles.filepath>
/mortals/data
</profiles.filepath>
<profiles.log.level>
INFO
</profiles.log.level>
<profiles.log.path>
/logs
</profiles.log.path>
...
...
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