commit
f1a61cf123
@ -1,5 +1,6 @@
|
||||
package com.qiwenshare.common.cbb;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
@ -9,10 +10,15 @@ import java.util.Map;
|
||||
* @param <T>
|
||||
*/
|
||||
@Data
|
||||
@Schema(name = "统一结果返回",required = true)
|
||||
public class RestResult<T> {
|
||||
@Schema(description = "请求是否成功", example = "true")
|
||||
private Boolean success = true;
|
||||
@Schema(description = "返回码", example = "20000")
|
||||
private Integer code;
|
||||
@Schema(description = "返回信息", example = "成功")
|
||||
private String message;
|
||||
@Schema(description = "返回数据")
|
||||
private T data;
|
||||
|
||||
// 通用返回成功
|
||||
|
@ -6,6 +6,10 @@ import io.swagger.v3.oas.models.info.Info;
|
||||
import io.swagger.v3.oas.models.info.License;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import springfox.documentation.builders.PathSelectors;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
|
||||
|
||||
@Configuration
|
||||
@ -22,4 +26,13 @@ public class OpenAPIConfig {
|
||||
.description("奇文网盘gitee地址")
|
||||
.url("https://www.gitee.com/qiwen-cloud/qiwen-file"));
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Docket demoApi() {
|
||||
return new Docket(DocumentationType.OAS_30)
|
||||
.select()
|
||||
.apis(RequestHandlerSelectors.any())
|
||||
.paths(PathSelectors.regex("(?!/error.*).*"))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ public class RecoveryFileController {
|
||||
String fileName = filePath.substring(filePath.lastIndexOf("/") + 1);
|
||||
filePath = PathUtil.getParentPath(filePath);
|
||||
LambdaQueryWrapper<UserFile> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(UserFile::getFilePath, filePath)
|
||||
lambdaQueryWrapper.eq(UserFile::getFilePath, filePath + "/")
|
||||
.eq(UserFile::getDeleteFlag, 0)
|
||||
.eq(UserFile::getUserId, sessionUserBean.getUserId());
|
||||
List<UserFile> userFileList = userFileService.list(lambdaQueryWrapper);
|
||||
|
Loading…
Reference in New Issue
Block a user