This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
web-sketch-webskt-query-agent/src/main/java/com/mesasoft/cn/sketch/controller/SketchDomainController.java

55 lines
1.6 KiB
Java
Raw Normal View History

2022-08-09 16:54:16 +08:00
package com.mesasoft.cn.sketch.controller;
import com.alibaba.fastjson.JSONObject;
import com.mesasoft.cn.annotation.AuthInterceptor;
import com.mesasoft.cn.enums.InterceptorLevel;
import com.mesasoft.cn.service.IFileManagerService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
/**
* @description:
* @author: zhq
* @create: 2022-03-10
**/
@RestController
@RequestMapping("/sketch/domain")
@Api(value = "/sketch/domain", description = "文件相关操作")
@Slf4j
public class SketchDomainController {
private final IFileManagerService fileManagerService;
private final HttpServletRequest request;
private JSONObject jsonObject;
@Value("${sketch.path.admin}")
private String pathAdmin;
@Value("${sketch.path.user}")
private String pathUser;
@Autowired
public SketchDomainController(HttpServletRequest request, IFileManagerService fileManagerService, JSONObject jsonObject) {
this.fileManagerService = fileManagerService;
this.jsonObject = jsonObject;
this.request = request;
}
@AuthInterceptor(InterceptorLevel.USER)
@RequestMapping(value = "/list", method = RequestMethod.GET)
public String list(String searchPath) {
log.info("search path :", searchPath);
return jsonObject.toJSONString();
}
}