This commit is contained in:
TimSpan 2024-11-01 11:32:19 +08:00
commit 23041368c2
12 changed files with 162 additions and 15 deletions

56
policeSecurityServer/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,56 @@
pipeline {
agent any
tools {
jdk "jdk-17.0.11"
maven "apache-maven-3.8.8"
}
stages {
stage('拉取代码') {
steps {
echo '开始拉取代码'
checkout scmGit(branches: [[name: '*/main']], extensions: [], userRemoteConfigs: [[credentialsId: '3', url: 'http://175.6.124.250:3100/luozhun/policeSecurity.git']])
echo '代码拉取成功'
}
}
stage('构建后台服务') {
steps{
echo '开始构建后台服务'
sh 'cd /var/jenkins_home/workspace/警保联动后端服务/policeSecurityServer && mvn clean -DskipTests=true package -P prod'
echo '后台服务构建完成'
}
}
stage('ssh远程推送代码'){
steps{
echo '开始推送构建产物'
script{
def remote = [:]
remote.name = 'server-118.253.177.137'
remote.host = '118.253.177.137'
remote.port = 55555
remote.allowAnyHosts = true
withCredentials([usernamePassword(credentialsId: '4', passwordVariable: 'password', usernameVariable: 'username')]) {
remote.user = "${username}"
remote.password = "${password}"
}
sshCommand remote: remote, command: 'pwd=$(pwd) echo "ssh连接成功当前工作目录$(pwd)"'
sshCommand remote: remote, command: 'echo "停止后台服务..."'
sshCommand remote: remote, command: '''docker stop policeSecurityServer'''
sshCommand remote: remote, command: 'echo "后台服务已停止..."'
sshCommand remote: remote, command: 'echo "删除原来的server.jar..."'
sshRemove remote: remote, path: '/home/javaProject/policeSecurity/policeSecurityServer.jar'
sshCommand remote: remote, command: 'echo "server.jar删除成功!"'
sshCommand remote: remote, command: 'echo "将构建的server.jar发送到服务器..."'
sshPut remote: remote, from: '/var/jenkins_home/workspace/警保联动后端服务/policeSecurityServer/target/policeSecurityServer.jar', into: '/home/javaProject/policeSecurity'
sshCommand remote: remote, command: 'echo "server.jar发送成功!"'
sshCommand remote: remote, command: 'echo "启动后台服务..."'
sshCommand remote: remote, command: '''docker start policeSecurityServer'''
sshCommand remote: remote, command: 'echo "后台服务启动成功!"'
}
}
}
}
}

View File

@ -88,8 +88,6 @@ public class FastJson2Config {
JSONWriter.Feature.WriteNullListAsEmpty, JSONWriter.Feature.WriteNullListAsEmpty,
//将String类型字段的空值序列化输出为空字符串 //将String类型字段的空值序列化输出为空字符串
JSONWriter.Feature.WriteNullStringAsEmpty, JSONWriter.Feature.WriteNullStringAsEmpty,
//将Boolean类型字段的空值序列化输出为false
JSONWriter.Feature.WriteNullBooleanAsFalse,
//在大范围超过JavaScript支持的整数输出为字符串格式 //在大范围超过JavaScript支持的整数输出为字符串格式
JSONWriter.Feature.BrowserCompatible, JSONWriter.Feature.BrowserCompatible,
//保留map空的字段 //保留map空的字段

View File

@ -116,7 +116,7 @@ logging:
config: classpath:conf/log4j2.xml config: classpath:conf/log4j2.xml
minio: minio:
url: https://www.hnjinglian.cn:9000 url: http://118.253.177.137:9000
accessKey: admin accessKey: admin
secretKey: lonsung301 secretKey: lonsung301
bucketName: police-security-dev bucketName: police-security-dev

View File

@ -116,7 +116,7 @@ logging:
config: classpath:conf/log4j2.xml config: classpath:conf/log4j2.xml
minio: minio:
url: https://www.hnjinglian.cn:9000 url: https://www.hnjinglian.cn:9002
accessKey: admin accessKey: admin
secretKey: lonsung301 secretKey: lonsung301
bucketName: police-security bucketName: police-security

View File

@ -12,13 +12,7 @@
<if test="level!=null">and level &lt;= #{level}</if> <if test="level!=null">and level &lt;= #{level}</if>
order by code order by code
</select> </select>
<resultMap id="administrativeDivisionByParentCodeVoResultMap" type="com.changhu.common.pojo.vo.TreeNodeVo"> <select id="administrativeDivisionByParentCode" resultType="com.changhu.common.pojo.vo.TreeNodeVo">
<result
column="extData"
typeHandler="com.baomidou.mybatisplus.extension.handlers.Fastjson2TypeHandler"
property="extData"/>
</resultMap>
<select id="administrativeDivisionByParentCode" resultMap="administrativeDivisionByParentCodeVoResultMap">
select ad1.code as 'value', select ad1.code as 'value',
ad1.name as 'label', ad1.name as 'label',
ad1.parent_code as 'parentValue', ad1.parent_code as 'parentValue',

View File

@ -10,5 +10,5 @@ VITE_APP_PROXY_URL=http://172.10.10.93:8765
# rsa 公钥 # rsa 公钥
VITE_APP_RSA_PUBLIC_KEY=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCpu1C3JHZ+Ng/eVVCZtwKsOZv9RktpAL13pKy4FoRHyNv2t8TPV2AMzLzfEzlWx001nBxyVxEMR2N9jAcqFLHv7r16ciOzbtzB9dky2G+bc9jIs4/EdVK5bAZcPRh5Jrb78sC9PHyR4AeceDyCIKHLUbWBJB4NTZE0s1Wh5kMynQIDAQAB VITE_APP_RSA_PUBLIC_KEY=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCpu1C3JHZ+Ng/eVVCZtwKsOZv9RktpAL13pKy4FoRHyNv2t8TPV2AMzLzfEzlWx001nBxyVxEMR2N9jAcqFLHv7r16ciOzbtzB9dky2G+bc9jIs4/EdVK5bAZcPRh5Jrb78sC9PHyR4AeceDyCIKHLUbWBJB4NTZE0s1Wh5kMynQIDAQAB
# minio # minio
VITE_APP_MINIO_URL=https://www.hnjinglian.cn:9000 VITE_APP_MINIO_URL=http://118.253.177.137:9000
VITE_APP_MINIO_BUCKET=police-security-dev VITE_APP_MINIO_BUCKET=police-security-dev

View File

@ -11,5 +11,5 @@ VITE_APP_PROXY_URL=https://172.10.10.238:8765
# rsa 公钥 # rsa 公钥
VITE_APP_RSA_PUBLIC_KEY=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCpu1C3JHZ+Ng/eVVCZtwKsOZv9RktpAL13pKy4FoRHyNv2t8TPV2AMzLzfEzlWx001nBxyVxEMR2N9jAcqFLHv7r16ciOzbtzB9dky2G+bc9jIs4/EdVK5bAZcPRh5Jrb78sC9PHyR4AeceDyCIKHLUbWBJB4NTZE0s1Wh5kMynQIDAQAB VITE_APP_RSA_PUBLIC_KEY=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCpu1C3JHZ+Ng/eVVCZtwKsOZv9RktpAL13pKy4FoRHyNv2t8TPV2AMzLzfEzlWx001nBxyVxEMR2N9jAcqFLHv7r16ciOzbtzB9dky2G+bc9jIs4/EdVK5bAZcPRh5Jrb78sC9PHyR4AeceDyCIKHLUbWBJB4NTZE0s1Wh5kMynQIDAQAB
# minio # minio
VITE_APP_MINIO_URL=https://www.hnjinglian.cn:9000 VITE_APP_MINIO_URL=https://www.hnjinglian.cn:9002
VITE_APP_MINIO_BUCKET=police-security VITE_APP_MINIO_BUCKET=police-security

46
securityManagement/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,46 @@
pipeline {
agent any
tools {
nodejs "node-v20.10.0"
}
stages {
stage('拉取代码') {
steps {
echo '开始拉取代码'
checkout scmGit(branches: [[name: '*/main']], extensions: [], userRemoteConfigs: [[credentialsId: '3', url: 'http://175.6.124.250:3100/luozhun/policeSecurity.git']])
echo '代码拉取成功'
}
}
stage('构建前端项目') {
steps{
echo '开始构建前端项目'
sh 'cd /var/jenkins_home/workspace/警保联动-保安后台/securityManagement && npm install --registry=https://registry.npmmirror.com && npm run build'
echo '前端项目构建完成'
}
}
stage('ssh远程推送代码'){
steps{
echo '开始推送构建产物'
script{
def remote = [:]
remote.name = 'server-118.253.177.137'
remote.host = '118.253.177.137'
remote.port = 55555
remote.allowAnyHosts = true
withCredentials([usernamePassword(credentialsId: '4', passwordVariable: 'password', usernameVariable: 'username')]) {
remote.user = "${username}"
remote.password = "${password}"
}
sshCommand remote: remote, command: 'pwd=$(pwd) echo "ssh连接成功当前工作目录$(pwd)"'
sshCommand remote: remote, command: 'echo "删除securityManagement..."'
sshRemove remote: remote, path: '/home/app/apps/1panel/apps/openresty/openresty/www/sites/policeSecurityServer/index/securityManagement'
sshCommand remote: remote, command: 'echo "删除superManagement成功!"'
sshCommand remote: remote, command: 'echo "将构建的securityManagement发送到服务器..."'
sshPut remote: remote, from: '/var/jenkins_home/workspace/警保联动-保安后台/securityManagement/securityManagement', into: '/home/app/apps/1panel/apps/openresty/openresty/www/sites/policeSecurityServer/index'
sshCommand remote: remote, command: 'echo "securityManagement发送成功!"'
}
}
}
}
}

View File

@ -12,5 +12,5 @@ VITE_APP_PROXY_URL=http://118.253.177.137:8765
VITE_APP_RSA_PUBLIC_KEY=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCpu1C3JHZ+Ng/eVVCZtwKsOZv9RktpAL13pKy4FoRHyNv2t8TPV2AMzLzfEzlWx001nBxyVxEMR2N9jAcqFLHv7r16ciOzbtzB9dky2G+bc9jIs4/EdVK5bAZcPRh5Jrb78sC9PHyR4AeceDyCIKHLUbWBJB4NTZE0s1Wh5kMynQIDAQAB VITE_APP_RSA_PUBLIC_KEY=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCpu1C3JHZ+Ng/eVVCZtwKsOZv9RktpAL13pKy4FoRHyNv2t8TPV2AMzLzfEzlWx001nBxyVxEMR2N9jAcqFLHv7r16ciOzbtzB9dky2G+bc9jIs4/EdVK5bAZcPRh5Jrb78sC9PHyR4AeceDyCIKHLUbWBJB4NTZE0s1Wh5kMynQIDAQAB
# minio # minio
VITE_APP_MINIO_URL=https://www.hnjinglian.cn:9000 VITE_APP_MINIO_URL=https://www.hnjinglian.cn:9002
VITE_APP_MINIO_BUCKET=police-security VITE_APP_MINIO_BUCKET=police-security

46
superManagement/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,46 @@
pipeline {
agent any
tools {
nodejs "node-v20.10.0"
}
stages {
stage('拉取代码') {
steps {
echo '开始拉取代码'
checkout scmGit(branches: [[name: '*/main']], extensions: [], userRemoteConfigs: [[credentialsId: '3', url: 'http://175.6.124.250:3100/luozhun/policeSecurity.git']])
echo '代码拉取成功'
}
}
stage('构建前端项目') {
steps{
echo '开始构建前端项目'
sh 'cd /var/jenkins_home/workspace/警保联动-超级后台/superManagement && npm install --registry=https://registry.npmmirror.com && npm run build'
echo '前端项目构建完成'
}
}
stage('ssh远程推送代码'){
steps{
echo '开始推送构建产物'
script{
def remote = [:]
remote.name = 'server-118.253.177.137'
remote.host = '118.253.177.137'
remote.port = 55555
remote.allowAnyHosts = true
withCredentials([usernamePassword(credentialsId: '4', passwordVariable: 'password', usernameVariable: 'username')]) {
remote.user = "${username}"
remote.password = "${password}"
}
sshCommand remote: remote, command: 'pwd=$(pwd) echo "ssh连接成功当前工作目录$(pwd)"'
sshCommand remote: remote, command: 'echo "删除superManagement..."'
sshRemove remote: remote, path: '/home/app/apps/1panel/apps/openresty/openresty/www/sites/policeSecurityServer/index/superManagement'
sshCommand remote: remote, command: 'echo "删除superManagement成功!"'
sshCommand remote: remote, command: 'echo "将构建的superManagement发送到服务器..."'
sshPut remote: remote, from: '/var/jenkins_home/workspace/警保联动-超级后台/superManagement/superManagement', into: '/home/app/apps/1panel/apps/openresty/openresty/www/sites/policeSecurityServer/index'
sshCommand remote: remote, command: 'echo "superManagement发送成功!"'
}
}
}
}
}

View File

@ -5,7 +5,6 @@
:change-on-select="changeOnSelect" :change-on-select="changeOnSelect"
:options="administrativeDivisionTree" :options="administrativeDivisionTree"
:load-data="loadData" :load-data="loadData"
style="width: 500px"
:allow-clear="allowClear" :allow-clear="allowClear"
/> />
</template> </template>

View File

@ -1,10 +1,18 @@
<template> <template>
<administrative-division-tree/> <administrative-division-tree/>
123123 123123
<a-image width="100" height="100"
:src="'https://www.hnjinglian.cn:9002'+objUrl"/>
<a-image width="100" height="100"
:src="'https://www.hnjinglian.cn:2563/minio_9000'+objUrl"/>
<a-image width="100" height="100"
:src="'http://118.253.177.137:9000'+objUrl"/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import AdministrativeDivisionTree from "@/components/tree/AdministrativeDivisionTree.vue"; import AdministrativeDivisionTree from "@/components/tree/AdministrativeDivisionTree.vue";
const objUrl = "/police-security/2024/10/30/55f99091b88c4c80ab90036d2b4914c6.jpg";
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">