Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
ea0363569b
|
|
@ -50,7 +50,7 @@ public class RepairController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "获取维修任务列表--分页")
|
@ApiOperation(value = "获取维修任务列表--分页")
|
||||||
@GetMapping("/getRepairTaskList")
|
@GetMapping("/getRepairTaskList")
|
||||||
@RequiresPermissions(value = "repair:manage:list")
|
//@RequiresPermissions(value = "repair:manage:list")
|
||||||
public TableDataInfo getRepairTaskList(RepairTask bean) {
|
public TableDataInfo getRepairTaskList(RepairTask bean) {
|
||||||
startPage();
|
startPage();
|
||||||
List<RepairTask> list = service.getRepairTaskList(bean);
|
List<RepairTask> list = service.getRepairTaskList(bean);
|
||||||
|
|
@ -62,7 +62,7 @@ public class RepairController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "获取维修任务列表---不分页")
|
@ApiOperation(value = "获取维修任务列表---不分页")
|
||||||
@GetMapping("/getAppRepairTaskList")
|
@GetMapping("/getAppRepairTaskList")
|
||||||
@RequiresPermissions("repair:manage:list")
|
//@RequiresPermissions("repair:manage:list")
|
||||||
public AjaxResult getAppRepairTaskList(RepairTask bean) {
|
public AjaxResult getAppRepairTaskList(RepairTask bean) {
|
||||||
List<RepairTask> list = service.getRepairTaskList(bean);
|
List<RepairTask> list = service.getRepairTaskList(bean);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
|
|
@ -175,7 +175,7 @@ public class RepairController extends BaseController {
|
||||||
* 导出维修任务列表--外层--壹级列表
|
* 导出维修任务列表--外层--壹级列表
|
||||||
*/
|
*/
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
@RequiresPermissions("repair:manage:export")
|
//@RequiresPermissions("repair:manage:export")
|
||||||
@ApiOperation(value = "导出维修任务列表")
|
@ApiOperation(value = "导出维修任务列表")
|
||||||
public void export(HttpServletResponse response, RepairTask bean) {
|
public void export(HttpServletResponse response, RepairTask bean) {
|
||||||
List<RepairTask> list = service.exportRepairTaskList(bean);
|
List<RepairTask> list = service.exportRepairTaskList(bean);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,86 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export deploy_path=/opt/webapps/bonus-material
|
||||||
|
|
||||||
|
export app_workspace=/opt/builds/releases/Bonus-Cloud/24.9.0
|
||||||
|
export biz_workspace=/opt/install/jenkins_home/workspace/Bonus-Cloud-Material
|
||||||
|
|
||||||
|
suffix="-material"
|
||||||
|
|
||||||
|
|
||||||
|
app_source_jars=(
|
||||||
|
"bonus-auth-24.9.0.jar"
|
||||||
|
"bonus-gateway-24.9.0.jar"
|
||||||
|
#"bonus-file-24.9.0.jar"
|
||||||
|
#"bonus-gen-24.9.0.jar"
|
||||||
|
#"bonus-job-24.9.0.jar"
|
||||||
|
"bonus-system-24.9.0.jar"
|
||||||
|
"bonus-visual-monitor-24.9.0.jar"
|
||||||
|
)
|
||||||
|
|
||||||
|
#for source_jar in "${app_source_jars[@]}"; do
|
||||||
|
# cp -f ${app_workspace}/${source_jar} $deploy_path
|
||||||
|
# echo "copied ${app_workspace}/${source_jar} to $deploy_path"
|
||||||
|
#done
|
||||||
|
for source_jar in "${app_source_jars[@]}"; do
|
||||||
|
# 获取文件名(不带目录路径)
|
||||||
|
filename=$(basename "$source_jar")
|
||||||
|
echo "filename:$filename"
|
||||||
|
# 获取文件名(不带扩展名)
|
||||||
|
base_name="${filename%.jar}"
|
||||||
|
echo "filename:$base_name"
|
||||||
|
# 构造新的文件名
|
||||||
|
new_filename="${base_name}${suffix}.jar"
|
||||||
|
echo "filename:$new_filename"
|
||||||
|
|
||||||
|
cp -f ${app_workspace}/${source_jar} "$deploy_path/$new_filename"
|
||||||
|
echo "copied ${app_workspace}/${source_jar} to '$deploy_path/$new_filename'"
|
||||||
|
done
|
||||||
|
|
||||||
|
cp -f ${biz_workspace}/"bonus-modules/bonus-material/target/bonus-material.jar" $deploy_path
|
||||||
|
echo "copied ${app_workspace}/${source_jar} to $deploy_path"
|
||||||
|
|
||||||
|
# Define an array of JAR files to run
|
||||||
|
jars=("bonus-auth-24.9.0-material.jar --spring.config.location=file:auth_bootstrap.yml"
|
||||||
|
"bonus-gateway-24.9.0-material.jar --spring.config.location=file:gateway_bootstrap.yml"
|
||||||
|
"bonus-system-24.9.0-material.jar --spring.config.location=file:system_bootstrap.yml"
|
||||||
|
#"bonus-gen-24.9.0-material.jar --spring.config.location=file:gen_bootstrap.yml"
|
||||||
|
#"bonus-job-24.9.0-material.jar --spring.config.location=file:job_bootstrap.yml"
|
||||||
|
#"bonus-file-24.9.0-material.jar --spring.config.location=file:file_bootstrap.yml"
|
||||||
|
#"bonus-visual-24.9.0-monitor-material.jar --spring.config.location=file:visual_bootstrap.yml"
|
||||||
|
"bonus-material.jar --spring.config.location=file:material_bootstrap.yml")
|
||||||
|
|
||||||
|
# 遍历数组并检查每个JAR文件的进程
|
||||||
|
for jar_with_args in "${jars[@]}"; do
|
||||||
|
# 提取JAR文件名(不包括参数)
|
||||||
|
jar=$(echo $jar_with_args | awk '{print $1}')
|
||||||
|
|
||||||
|
# 检查进程是否启动
|
||||||
|
echo "原应用程序1 $jar "
|
||||||
|
pids=$(pgrep -f $jar || true)
|
||||||
|
echo "原应用程序2 $jar "
|
||||||
|
if [ -n "$pids" ]; then
|
||||||
|
echo "$jar is running with PID(s): $pids"
|
||||||
|
# 杀死进程
|
||||||
|
for pid in $pids; do
|
||||||
|
kill -9 $pid
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "Process $pid for $jar killed successfully"
|
||||||
|
else
|
||||||
|
echo "Failed to kill process $pid for $jar"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo "$jar is not running"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
cd $deploy_path || { echo "Failed to change directory to $deploy_path"; exit 1; }
|
||||||
|
# Iterate over the JAR files array
|
||||||
|
for jar in "${jars[@]}"; do
|
||||||
|
echo "Starting $jar"
|
||||||
|
nohup /usr/local/jdk1.8.0/bin/java -jar $jar >/dev/null 2>&1 &
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "All JARs have been run successfully."
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
suffix="-material"
|
suffix="-material"
|
||||||
jar_version="24.11.0-SNAPSHOT"
|
jar_version="24.10.0-SNAPSHOT"
|
||||||
|
|
||||||
export deploy_path=/opt/webapps/bonus-material
|
export deploy_path=/opt/webapps/bonus-material
|
||||||
export app_workspace=/opt/builds/releases/Bonus-Cloud/${jar_version}
|
export app_workspace=/opt/builds/releases/Bonus-Cloud/${jar_version}
|
||||||
|
|
|
||||||
|
|
@ -38,3 +38,4 @@ for jar in "${jars[@]}"; do
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "All JARs have been run successfully."
|
echo "All JARs have been run successfully."
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,114 @@
|
||||||
|
AUTH_RESOURCE_NAME=bonus-auth-24.9.0-material.jar
|
||||||
|
GATEWAY_RESOURCE_NAME=bonus-gateway-24.9.0-material.jar
|
||||||
|
SYS_RESOURCE_NAME=bonus-system-24.9.0-material.jar
|
||||||
|
JOB_RESOURCE_NAME=bonus-job-24.9.0-material.jar
|
||||||
|
FILE_RESOURCE_NAME=bonus-file-24.9.0-material.jar
|
||||||
|
MONITOR_RESOURCE_NAME=bonus-visual-monitor-24.9.0-material.jar
|
||||||
|
MATERIAL_RESOURCE_NAME=bonus-material.jar
|
||||||
|
|
||||||
|
|
||||||
|
tpid=`ps -ef|grep $AUTH_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||||
|
if [ ${tpid} ]; then
|
||||||
|
echo 'Stop Process...'
|
||||||
|
kill -15 $tpid
|
||||||
|
fi
|
||||||
|
sleep 5
|
||||||
|
tpid=`ps -ef|grep $AUTH_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||||
|
if [ ${tpid} ]; then
|
||||||
|
echo 'Kill Process!'
|
||||||
|
kill -9 $tpid
|
||||||
|
else
|
||||||
|
echo 'Stop Success!'
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
tpid=`ps -ef|grep $GATEWAY_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||||
|
if [ ${tpid} ]; then
|
||||||
|
echo 'Stop Process...'
|
||||||
|
kill -15 $tpid
|
||||||
|
fi
|
||||||
|
sleep 5
|
||||||
|
tpid=`ps -ef|grep $GATEWAY_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||||
|
if [ ${tpid} ]; then
|
||||||
|
echo 'Kill Process!'
|
||||||
|
kill -9 $tpid
|
||||||
|
else
|
||||||
|
echo 'Stop Success!'
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
tpid=`ps -ef|grep $SYS_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||||
|
if [ ${tpid} ]; then
|
||||||
|
echo 'Stop Process...'
|
||||||
|
kill -15 $tpid
|
||||||
|
fi
|
||||||
|
sleep 5
|
||||||
|
tpid=`ps -ef|grep $SYS_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||||
|
if [ ${tpid} ]; then
|
||||||
|
echo 'Kill Process!'
|
||||||
|
kill -9 $tpid
|
||||||
|
else
|
||||||
|
echo 'Stop Success!'
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
tpid=`ps -ef|grep $JOB_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||||
|
if [ ${tpid} ]; then
|
||||||
|
echo 'Stop Process...'
|
||||||
|
kill -15 $tpid
|
||||||
|
fi
|
||||||
|
sleep 5
|
||||||
|
tpid=`ps -ef|grep $JOB_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||||
|
if [ ${tpid} ]; then
|
||||||
|
echo 'Kill Process!'
|
||||||
|
kill -9 $tpid
|
||||||
|
else
|
||||||
|
echo 'Stop Success!'
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
tpid=`ps -ef|grep $FILE_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||||
|
if [ ${tpid} ]; then
|
||||||
|
echo 'Stop Process...'
|
||||||
|
kill -15 $tpid
|
||||||
|
fi
|
||||||
|
sleep 5
|
||||||
|
tpid=`ps -ef|grep $FILE_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||||
|
if [ ${tpid} ]; then
|
||||||
|
echo 'Kill Process!'
|
||||||
|
kill -9 $tpid
|
||||||
|
else
|
||||||
|
echo 'Stop Success!'
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
tpid=`ps -ef|grep $MONITOR_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||||
|
if [ ${tpid} ]; then
|
||||||
|
echo 'Stop Process...'
|
||||||
|
kill -15 $tpid
|
||||||
|
fi
|
||||||
|
sleep 5
|
||||||
|
tpid=`ps -ef|grep $MONITOR_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||||
|
if [ ${tpid} ]; then
|
||||||
|
echo 'Kill Process!'
|
||||||
|
kill -9 $tpid
|
||||||
|
else
|
||||||
|
echo 'Stop Success!'
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
tpid=`ps -ef|grep $MATERIAL_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||||
|
if [ ${tpid} ]; then
|
||||||
|
echo 'Stop Process...'
|
||||||
|
kill -15 $tpid
|
||||||
|
fi
|
||||||
|
sleep 5
|
||||||
|
tpid=`ps -ef|grep $MATERIAL_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||||
|
if [ ${tpid} ]; then
|
||||||
|
echo 'Kill Process!'
|
||||||
|
kill -9 $tpid
|
||||||
|
else
|
||||||
|
echo 'Stop Success!'
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
AUTH_RESOURCE_NAME=bonus-auth-24.11.0-SNAPSHOT-material.jar
|
AUTH_RESOURCE_NAME=bonus-auth-24.10.0-SNAPSHOT-material.jar
|
||||||
GATEWAY_RESOURCE_NAME=bonus-gateway-24.11.0-SNAPSHOT-material.jar
|
GATEWAY_RESOURCE_NAME=bonus-gateway-24.10.0-SNAPSHOT-material.jar
|
||||||
SYS_RESOURCE_NAME=bonus-system-24.11.0-SNAPSHOT-material.jar
|
SYS_RESOURCE_NAME=bonus-system-24.10.0-SNAPSHOT-material.jar
|
||||||
JOB_RESOURCE_NAME=bonus-job-24.11.0-SNAPSHOT-material.jar
|
JOB_RESOURCE_NAME=bonus-job-24.10.0-SNAPSHOT-material.jar
|
||||||
FILE_RESOURCE_NAME=bonus-file-24.11.0-SNAPSHOT-material.jar
|
FILE_RESOURCE_NAME=bonus-file-24.10.0-SNAPSHOT-material.jar
|
||||||
MONITOR_RESOURCE_NAME=bonus-visual-monitor-24.11.0-SNAPSHOT-material.jar
|
MONITOR_RESOURCE_NAME=bonus-visual-monitor-24.10.0-SNAPSHOT-material.jar
|
||||||
MATERIAL_RESOURCE_NAME=bonus-material.jar
|
MATERIAL_RESOURCE_NAME=bonus-material.jar
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue