Commit dcf7c3b9 authored by 赵啸非's avatar 赵啸非

修改工作人员

parent e10f22cb
#! /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"
#! /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
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
......@@ -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() {
......
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment