Noodles初版提交

This commit is contained in:
Mzaxd
2023-03-02 21:33:00 +08:00
commit d26d79d7fd
169 changed files with 11768 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
server:
port: 6081
spring:
#MySQL配置
datasource:
url: jdbc:mysql://192.168.1.103:3307/noodles?characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: rootroot
driver-class-name: com.mysql.cj.jdbc.Driver
servlet:
multipart:
max-file-size: 2MB
max-request-size: 5MB
#Redis配置
redis:
host: 192.168.1.103
database: 3
#RabbitMq配置
rabbitmq:
host: 192.168.1.103
port: 5672
username: mzaxd
password: 200712
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
global-config:
db-config:
logic-delete-field: delFlag
logic-delete-value: 1
logic-not-delete-value: 0
id-type: auto
pagehelper:
auto-dialect: on
reasonable: true
support-methods-arguments: true
page-size-zero: true
+16
View File
@@ -0,0 +1,16 @@
#使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
startttlsEnable = true
# 使用SSL安全连接
sslEnable = true
# 指定实现javax.net.SocketFactory接口的类的名称,这个类将被用于创建SMTP的套接字
socketFactoryClass = javax.net.ssl.SSLSocketFactory
# 如果设置为true,未能创建一个套接字使用指定的套接字工厂类将导致使用java.net.Socket创建的套接字类, 默认值为true
socketFactoryFallback = true
# 指定的端口连接到在使用指定的套接字工厂。如果没有设置,将使用默认端口456
socketFactoryPort = 465
# SMTP超时时长,单位毫秒,缺省值不超时
timeout = 0
# Socket连接超时值,单位毫秒,缺省值不超时
connectionTimeout = 0
Binary file not shown.
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.mzaxd.noodles.mapper.HostMachineMapper">
<resultMap id="BaseResultMap" type="com.mzaxd.noodles.domain.entity.HostMachine">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="description" column="description" jdbcType="VARCHAR"/>
<result property="avatar" column="avatar" jdbcType="VARCHAR"/>
<result property="sshId" column="ssh_id" jdbcType="BIGINT"/>
<result property="osId" column="os_id" jdbcType="BIGINT"/>
<result property="manageIp" column="manage_ip" jdbcType="VARCHAR"/>
<result property="hostMachineId" column="host_machine_id" jdbcType="INTEGER"/>
<result property="threads" column="threads" jdbcType="BIGINT"/>
<result property="memory" column="memory" jdbcType="BIGINT"/>
<result property="hostMachineState" column="host_machine_state" jdbcType="INTEGER"/>
<result property="notify" column="notify" jdbcType="INTEGER"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="createBy" column="create_by" jdbcType="BIGINT"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="update_by" jdbcType="BIGINT"/>
<result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
hm
.
id
,hm.name,hm.description,
hm.avatar,hm.ssh_id,hm.os_id,
hm.manage_ip,hm.host_machine_id,hm.threads,
hm.memory,hm.host_machine_state,notify,
hm.create_time,hm.create_by,hm.update_time,
hm.update_by,hm.del_flag
</sql>
<select id="vmListWithCondition" resultType="com.mzaxd.noodles.domain.entity.HostMachine">
SELECT
<include refid="Base_Column_List"/>
FROM `host_machine` hm INNER JOIN os
ON hm.os_id = os.id
WHERE hm.del_flag = 0 AND hm.host_machine_id != 0
<if test="selectedKernel != null and selectedKernel.size() > 0">
AND os.kernel in
<foreach collection="selectedKernel" index="index" item="kernel" open="(" separator="," close=")">
#{kernel}
</foreach>
</if>
<if test="selectedHost != null and selectedHost.size() > 0">
AND hm.host_machine_id in
<foreach collection="selectedHost" index="index" item="host" open="(" separator="," close=")">
#{host}
</foreach>
</if>
<if test="selectedStatus != null and selectedStatus.size() > 0">
AND hm.host_machine_state in
<foreach collection="selectedStatus" index="index" item="state" open="(" separator="," close=")">
#{state}
</foreach>
</if>
<if test="nameLike != null and nameLike != ''">
AND hm.name LIKE CONCAT('%',#{nameLike},'%')
</if>
</select>
</mapper>