mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-12-09 04:57:11 +08:00
revert: 回退全局响应结果处理器
1.影响 API 文档生成 2.其他已知及未知影响
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* 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.common.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* 响应拦截忽略注解
|
||||
*
|
||||
* @author BULL_BCLS
|
||||
* @since 2023/10/8 20:44
|
||||
*/
|
||||
@Target({ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface NoResponseAdvice {}
|
||||
@@ -37,7 +37,6 @@ import cn.hutool.core.lang.tree.Tree;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
import top.charles7c.cnadmin.common.annotation.CrudRequestMapping;
|
||||
import top.charles7c.cnadmin.common.annotation.NoResponseAdvice;
|
||||
import top.charles7c.cnadmin.common.constant.StringConsts;
|
||||
import top.charles7c.cnadmin.common.model.query.PageQuery;
|
||||
import top.charles7c.cnadmin.common.model.query.SortQuery;
|
||||
@@ -196,7 +195,6 @@ public abstract class BaseController<S extends BaseService<L, D, Q, C>, L, D, Q,
|
||||
* 响应对象
|
||||
*/
|
||||
@Operation(summary = "导出数据", description = "导出数据")
|
||||
@NoResponseAdvice
|
||||
@GetMapping("/export")
|
||||
public void export(Q query, SortQuery sortQuery, HttpServletResponse response) {
|
||||
this.checkPermission(Api.EXPORT);
|
||||
|
||||
@@ -127,7 +127,7 @@ public class CommonController {
|
||||
@Operation(summary = "查询参数", description = "查询参数")
|
||||
@GetMapping("/option")
|
||||
@Cacheable(cacheNames = CacheConsts.OPTION_KEY_PREFIX)
|
||||
public R listOption(@Validated OptionQuery query) {
|
||||
public R<List<LabelValueResp>> listOption(@Validated OptionQuery query) {
|
||||
return R.ok(optionService.list(query).stream().map(option -> new LabelValueResp(option.getCode(),
|
||||
StrUtil.nullToDefault(option.getValue(), option.getDefaultValue()))).collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user