Commit 992dc3be authored by yuwenwen's avatar yuwenwen
parents 2a38011e e3003645
# 项目相关配置
ruoyi:
profile: /home/application/safe-campus-bbs/server/resources
# 数据源配置
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver
druid:
# 主库数据源
master:
url: jdbc:mysql://10.10.21.83:3306/safe_campus_bbs?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
username: root
password: MySQL20250928@.
# 初始连接数
initialSize: 5
# 最小连接池数量
minIdle: 10
# 最大连接池数量
maxActive: 20
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置连接超时时间
connectTimeout: 30000
# 配置网络超时时间
socketTimeout: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 10000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
# 配置一个连接在池中最大生存的时间,单位是毫秒
maxEvictableIdleTimeMillis: 900000
# 配置检测连接是否有效
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
webStatFilter:
enabled: true
statViewServlet:
enabled: false
# 设置白名单,不填则允许所有访问
allow:
url-pattern: /druid/*
# 控制台管理用户名和密码
login-username: ruoyi
login-password: 123456
filter:
stat:
enabled: true
# 慢SQL记录
log-slow-sql: true
slow-sql-millis: 1000
merge-sql: true
wall:
config:
multi-statement-allow: true
# Redis配置
redis:
# 地址
host: 127.0.0.1
# 端口,默认为6379
port: 6379
# 数据库索引
database: 0
# 密码
password: Redis20250928@.
# 连接超时时间
timeout: 10s
lettuce:
pool:
# 连接池中的最小空闲连接
min-idle: 0
# 连接池中的最大空闲连接
max-idle: 8
# 连接池的最大数据库连接数
max-active: 8
# #连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
# ActiveMQ配置
activemq:
broker-url: tcp://127.0.0.1:61616
packages:
trust-all: true
user: admin
password: ActiveMQ20250928@.
jms:
listener:
max-concurrency: 3
# 企业微信配置
wx:
cp:
corp-id: wxd2a84aa7529d3801
app-config:
agent-id: 1000218
secret: UubIP6xbLBzw3DwcIyOARYf1e4cm5GNJKNFZTlVfgyo
......@@ -97,6 +97,7 @@ public class BbsMomentComment extends BaseEntity {
private String momentContent;
/** 是否本人评论:0 否、1 是 */
@TableField(exist = false)
private Integer isSelf;
/**
......
......@@ -16,6 +16,11 @@ public class QueryMomentBO {
*/
private Long topicId;
/**
* 话题名称
*/
private String topicName;
/**
* 动态内容
*/
......
......@@ -14,7 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bbs_moment m ON m.id = c.moment_id
<where>
<if test="1==1">
c.parent_id IS NULL
status = 1
</if>
<if test="comment.momentContent != null and comment.momentContent != ''">
AND c.content LIKE CONCAT('%', #{comment.momentContent}, '%')
......@@ -39,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN
bbs_moment_comment c ON c.id = r.parent_id
WHERE
FIND_IN_SET(#{commentId}, r.ancestor_path) AND r.id != #{commentId}
status = 1 AND FIND_IN_SET(#{commentId}, r.ancestor_path) AND r.id != #{commentId}
ORDER BY
r.create_time
</select>
......@@ -51,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM
bbs_moment_comment
WHERE
moment_id = #{momentId}
status = 1 AND moment_id = #{momentId}
ORDER BY
create_time
</select>
......
......@@ -110,6 +110,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="bo.content != null and bo.content != ''">
m.content LIKE CONCAT('%', #{bo.content}, '%')
</if>
<if test="bo.topicName != null and bo.topicName != ''">
AND m.topic_names LIKE CONCAT('%', #{bo.topicName}, '%')
</if>
<if test="bo.topicId != null">
AND FIND_IN_SET(#{bo.topicId}, m.topic_ids)
</if>
......
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