Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
查尔斯-BUG万象集
Continew Admin
提交
3c07e571
Continew Admin
项目概览
查尔斯-BUG万象集
/
Continew Admin
8 个月 前同步成功
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
分析
仓库
DevOps
项目成员
Pages
Continew Admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
3c07e571
编写于
9月 21, 2023
作者:
查尔斯-BUG万象集
提交者:
GitHub
9月 21, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #17 from Bull-BCLS/dev
feat: 新增查询参数列表接口
上级
212732d8
42996a73
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
371 addition
and
1 deletion
+371
-1
continew-admin-system/src/main/java/top/charles7c/cnadmin/system/mapper/OptionMapper.java
...ava/top/charles7c/cnadmin/system/mapper/OptionMapper.java
+28
-0
continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/entity/OptionDO.java
...a/top/charles7c/cnadmin/system/model/entity/OptionDO.java
+74
-0
continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/query/OptionQuery.java
...top/charles7c/cnadmin/system/model/query/OptionQuery.java
+50
-0
continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/vo/OptionVO.java
.../java/top/charles7c/cnadmin/system/model/vo/OptionVO.java
+74
-0
continew-admin-system/src/main/java/top/charles7c/cnadmin/system/service/OptionService.java
...a/top/charles7c/cnadmin/system/service/OptionService.java
+40
-0
continew-admin-system/src/main/java/top/charles7c/cnadmin/system/service/impl/OptionServiceImpl.java
...rles7c/cnadmin/system/service/impl/OptionServiceImpl.java
+49
-0
continew-admin-ui/src/api/system/config.ts
continew-admin-ui/src/api/system/config.ts
+1
-1
continew-admin-webapi/src/main/java/top/charles7c/cnadmin/webapi/controller/system/OptionController.java
...7c/cnadmin/webapi/controller/system/OptionController.java
+55
-0
未找到文件。
continew-admin-system/src/main/java/top/charles7c/cnadmin/system/mapper/OptionMapper.java
0 → 100644
浏览文件 @
3c07e571
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*/
package
top.charles7c.cnadmin.system.mapper
;
import
top.charles7c.cnadmin.common.base.BaseMapper
;
import
top.charles7c.cnadmin.system.model.entity.OptionDO
;
/**
* 系统参数 Mapper
*
* @author Bull-BCLS
* @since 2023/8/26 19:38
*/
public
interface
OptionMapper
extends
BaseMapper
<
OptionDO
>
{}
\ No newline at end of file
continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/entity/OptionDO.java
0 → 100644
浏览文件 @
3c07e571
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*/
package
top.charles7c.cnadmin.system.model.entity
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
import
lombok.Data
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
/**
* 系统参数表
*
* @author Bull-BCLS
* @since 2023/8/26 19:20
*/
@Data
@TableName
(
"sys_option"
)
public
class
OptionDO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 参数名称
*/
private
String
name
;
/**
* 参数键
*/
@TableId
private
String
code
;
/**
* 参数值
*/
private
String
value
;
/**
* 参数默认值
*/
private
String
defaultValue
;
/**
* 描述
*/
private
String
description
;
/**
* 修改人
*/
private
Long
updateUser
;
/**
* 修改时间
*/
private
LocalDateTime
updateTime
;
}
continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/query/OptionQuery.java
0 → 100644
浏览文件 @
3c07e571
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*/
package
top.charles7c.cnadmin.system.model.query
;
import
java.io.Serializable
;
import
java.util.List
;
import
javax.validation.constraints.NotEmpty
;
import
lombok.Data
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
top.charles7c.cnadmin.common.annotation.Query
;
import
top.charles7c.cnadmin.common.enums.QueryTypeEnum
;
/**
* 系统参数查询条件
*
* @author Bull-BCLS
* @since 2023/8/26 19:38
*/
@Data
@Schema
(
description
=
"系统参数查询条件"
)
public
class
OptionQuery
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 参数键列表
*/
@Schema
(
description
=
"参数键列表"
,
example
=
"site_title,site_copyright"
)
@NotEmpty
(
message
=
"参数键不能为空"
)
@Query
(
type
=
QueryTypeEnum
.
IN
)
private
List
<
String
>
code
;
}
\ No newline at end of file
continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/vo/OptionVO.java
0 → 100644
浏览文件 @
3c07e571
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*/
package
top.charles7c.cnadmin.system.model.vo
;
import
java.io.Serializable
;
import
lombok.Data
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
cn.hutool.core.util.StrUtil
;
/**
* 系统参数信息
*
* @author Bull-BCLS
* @since 2023/8/26 19:38
*/
@Data
@Schema
(
description
=
"系统参数信息"
)
public
class
OptionVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 参数名称
*/
@Schema
(
description
=
"参数名称"
,
example
=
"系统标题"
)
private
String
name
;
/**
* 参数键
*/
@Schema
(
description
=
"参数键"
,
example
=
"site_title"
)
private
String
code
;
/**
* 参数值
*/
@Schema
(
description
=
"参数值"
,
example
=
"ContiNew Admin"
)
private
String
value
;
/**
* 参数默认值
*/
@JsonIgnore
private
String
defaultValue
;
/**
* 描述
*/
@Schema
(
description
=
"描述"
,
example
=
"用于显示登录页面的系统标题。"
)
private
String
description
;
public
String
getValue
()
{
return
StrUtil
.
nullToDefault
(
value
,
defaultValue
);
}
}
\ No newline at end of file
continew-admin-system/src/main/java/top/charles7c/cnadmin/system/service/OptionService.java
0 → 100644
浏览文件 @
3c07e571
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*/
package
top.charles7c.cnadmin.system.service
;
import
java.util.List
;
import
top.charles7c.cnadmin.system.model.query.OptionQuery
;
import
top.charles7c.cnadmin.system.model.vo.OptionVO
;
/**
* 系统参数业务接口
*
* @author Bull-BCLS
* @since 2023/8/26 19:38
*/
public
interface
OptionService
{
/**
* 查询列表
*
* @param query
* 查询条件
* @return 列表信息
*/
List
<
OptionVO
>
list
(
OptionQuery
query
);
}
\ No newline at end of file
continew-admin-system/src/main/java/top/charles7c/cnadmin/system/service/impl/OptionServiceImpl.java
0 → 100644
浏览文件 @
3c07e571
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*/
package
top.charles7c.cnadmin.system.service.impl
;
import
java.util.List
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Service
;
import
cn.hutool.core.bean.BeanUtil
;
import
top.charles7c.cnadmin.common.util.helper.QueryHelper
;
import
top.charles7c.cnadmin.system.mapper.OptionMapper
;
import
top.charles7c.cnadmin.system.model.query.OptionQuery
;
import
top.charles7c.cnadmin.system.model.vo.OptionVO
;
import
top.charles7c.cnadmin.system.service.OptionService
;
/**
* 系统参数业务实现
*
* @author Bull-BCLS
* @since 2023/8/26 19:38
*/
@Service
@RequiredArgsConstructor
public
class
OptionServiceImpl
implements
OptionService
{
private
final
OptionMapper
baseMapper
;
@Override
public
List
<
OptionVO
>
list
(
OptionQuery
query
)
{
return
BeanUtil
.
copyToList
(
baseMapper
.
selectList
(
QueryHelper
.
build
(
query
)),
OptionVO
.
class
);
}
}
\ No newline at end of file
continew-admin-ui/src/api/system/config.ts
浏览文件 @
3c07e571
import
axios
from
'
axios
'
;
import
qs
from
'
query-string
'
;
const
BASE_URL
=
'
/
api/
system/option
'
;
const
BASE_URL
=
'
/system/option
'
;
export
interface
BasicConfigRecord
{
site_title
?:
string
;
...
...
continew-admin-webapi/src/main/java/top/charles7c/cnadmin/webapi/controller/system/OptionController.java
0 → 100644
浏览文件 @
3c07e571
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*/
package
top.charles7c.cnadmin.webapi.controller.system
;
import
java.util.List
;
import
lombok.RequiredArgsConstructor
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
top.charles7c.cnadmin.common.model.vo.R
;
import
top.charles7c.cnadmin.system.model.query.OptionQuery
;
import
top.charles7c.cnadmin.system.model.vo.OptionVO
;
import
top.charles7c.cnadmin.system.service.OptionService
;
/**
* 系统参数管理 API
*
* @author Bull-BCLS
* @since 2023/8/26 19:38
*/
@Tag
(
name
=
"系统参数管理 API"
)
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/system/option"
)
public
class
OptionController
{
private
final
OptionService
optionService
;
@Operation
(
summary
=
"查询系统参数列表"
,
description
=
"查询系统参数列表"
)
@GetMapping
public
R
<
List
<
OptionVO
>>
list
(
@Validated
OptionQuery
query
)
{
return
R
.
ok
(
optionService
.
list
(
query
));
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录