Skip to content

Commit

Permalink
Merge pull request #3411 from KouShenhai/dev
Browse files Browse the repository at this point in the history
feat: 升级版本至3.4.2
  • Loading branch information
KouShenhai authored Jan 23, 2025
2 parents 3e9c2dc + 364aac3 commit b4a90db
Show file tree
Hide file tree
Showing 5 changed files with 153 additions and 17 deletions.
94 changes: 94 additions & 0 deletions doc/deploy/docker-compose/docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# /*
# * Copyright (c) 2022-2025 KCloud-Platform-IoT Author or Authors. All Rights Reserved.
# * <p>
# * Licensed under the Apache License, Version 2.0 (the "License");
# * you may not use this file except in compliance with the License.
# * You may obtain a copy of the License at
# * <p>
# * http://www.apache.org/licenses/LICENSE-2.0
# * <p>
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# */
services:
postgresql:
image: timescale/timescaledb:latest-pg17
container_name: postgresql
# 保持容器在没有守护程序的情况下运行
tty: true
restart: always
privileged: true
ports:
- "5432:5432"
volumes:
- ./postgresql17/data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=laokou123
- TZ=Asia/Shanghai
networks:
- laokou_network
redis:
image: redis:7.4.2
container_name: redis
# 保持容器在没有守护程序的情况下运行
tty: true
restart: always
privileged: true
ports:
- "6379:6379"
volumes:
- ./redis7/conf/redis.conf:/etc/redis/redis.conf
- ./redis7/data:/data
command: redis-server --appendonly yes --requirepass 'laokou123'
environment:
- TZ=Asia/Shanghai
networks:
- laokou_network
rocketmq-namesrv:
image: apache/rocketmq:5.3.1
container_name: rocketmq-namesrv
# 保持容器在没有守护程序的情况下运行
tty: true
restart: always
privileged: true
ports:
- "9876:9876"
command: sh mqnamesrv
environment:
- JAVA_OPT_EXT=-server -Xmx512m -Xms512m -Xmn256m
- TZ=Asia/Shanghai
networks:
- laokou_network
rocketmq-broker:
image: apache/rocketmq:5.3.1
container_name: rocketmq-broker
# 保持容器在没有守护程序的情况下运行
tty: true
restart: always
privileged: true
ports:
- "10909:10909"
- "10911:10911"
- "10912:10912"
# 自动创建主题
command: sh mqbroker -n rocketmq-namesrv:9876 -c /home/rocketmq/conf/broker.conf autoCreateTopicEnable=true
environment:
- JAVA_OPT_EXT=-server -Xmx512m -Xms512m -Xmn256m
- TZ=Asia/Shanghai
volumes:
- ./rocketmq5/broker/conf/broker.conf:/home/rocketmq/conf/broker.conf
# 挂载数据
- ./rocketmq5/broker/store:/home/rocketmq/store
# 挂载日志
- ./rocketmq5/broker/logs:/home/rocketmq/logs
networks:
- laokou_network
depends_on:
- rocketmq-namesrv
networks:
laokou_network:
driver: bridge
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,13 @@
package org.laokou.common.core.config;

import lombok.extern.slf4j.Slf4j;
import org.laokou.common.core.utils.ThreadUtil;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.http.client.JdkClientHttpRequestFactory;
import org.springframework.web.client.RestClient;
import java.net.http.HttpClient;
import java.util.concurrent.ExecutorService;

import static org.laokou.common.core.utils.HttpUtil.getHttpClient;
import static org.laokou.common.i18n.utils.SslUtil.sslContext;

/**
* @author laokou
Expand All @@ -39,16 +34,6 @@
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
public class RestClientConfig {

@Bean(bootstrap = Bean.Bootstrap.BACKGROUND)
public RestClient jdkRestClient() {
log.info("{} => Initializing JDK RestClient", Thread.currentThread().getName());
// 虚拟线程
ExecutorService executor = ThreadUtil.newVirtualTaskExecutor();
HttpClient httpClient = HttpClient.newBuilder().sslContext(sslContext()).build();
JdkClientHttpRequestFactory factory = new JdkClientHttpRequestFactory(httpClient, executor);
return RestClient.builder().requestFactory(factory).build();
}

@Bean
public RestClient restClient() {
log.info("{} => Initializing Default RestClient", Thread.currentThread().getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ public FuryFactory() {
FURY.register(net.sf.jsqlparser.statement.select.MySqlSqlCacheFlags.class);
FURY.register(net.sf.jsqlparser.statement.select.PlainSelect.BigQuerySelectQualifier.class);
FURY.register(net.sf.jsqlparser.statement.update.UpdateModifierPriority.class);
FURY.register(net.sf.jsqlparser.expression.operators.relational.LikeExpression.KeyWord.class);
}

public static FuryFactory getFuryFactory() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
icon,
"sort",
"status",
permission,
create_time
</sql>

Expand All @@ -40,6 +41,12 @@
<if test="pageQuery.status != null">
and status = #{pageQuery.status}
</if>
<if test="pageQuery.params.startTime != null and pageQuery.params.startTime != ''">
and create_time <![CDATA[ >= ]]> to_timestamp(#{pageQuery.params.startTime}, 'YYYY-MM-DD HH24:MI:SS')
</if>
<if test="pageQuery.params.endTime != null and pageQuery.params.endTime != ''">
and create_time <![CDATA[ <= ]]> to_timestamp(#{pageQuery.params.endTime}, 'YYYY-MM-DD HH24:MI:SS')
</if>
</sql>

<sql id="selectObjectList">
Expand Down
53 changes: 51 additions & 2 deletions ui/src/pages/Sys/Permission/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ export default () => {

type TableColumns = {
id: number;
createTime: string | undefined;
name: string | undefined;
path: string | undefined;
status: number | undefined;
type: number | undefined;
permission: string | undefined;
createTime: string | undefined;
sort: number | undefined;
};

const actionRef = useRef();
Expand All @@ -23,7 +28,8 @@ export default () => {
pageNum: params?.current,
pageIndex: params?.pageSize * (params?.current - 1),
code: 1,
name: trim(params?.name),
type: trim(params?.type),
status: params?.status,
params: {
startTime: params?.startDate ? `${params.startDate} 00:00:00` : undefined,
endTime: params?.endDate ? `${params.endDate} 23:59:59` : undefined
Expand Down Expand Up @@ -54,6 +60,49 @@ export default () => {
{
title: '名称',
dataIndex: 'name',
ellipsis: true,
hideInSearch: true,
},
{
title: '图标',
dataIndex: 'icon',
ellipsis: true,
hideInSearch: true
},
{
title: '路径',
dataIndex: 'path',
ellipsis: true,
hideInSearch: true
},
{
title: '权限标识',
dataIndex: 'permission',
ellipsis: true,
hideInSearch: true,
},
{
title: '类型',
dataIndex: 'type',
valueEnum: {
0: {text: '菜单', status: 'Processing'},
1: {text: '按钮', status: 'Default'},
},
ellipsis: true
},
{
title: '状态',
dataIndex: 'status',
valueEnum: {
0: {text: '启用', status: 'Success'},
1: {text: '禁用', status: 'Error'},
},
ellipsis: true
},
{
title: '排序',
dataIndex: 'sort',
hideInSearch: true,
ellipsis: true
},
{
Expand Down

0 comments on commit b4a90db

Please sign in to comment.