Compare commits
No commits in common. 'main' and 'dongdingding' have entirely different histories.
main
...
dongdingdi
@ -1,69 +0,0 @@
|
||||
package com.ruoyi.tcZz.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.tcZz.utils.SecretUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
|
||||
/**
|
||||
* 对接大屏登录接口
|
||||
*
|
||||
* @author wu
|
||||
* @since 2024/8/6 下午4:53
|
||||
*/
|
||||
@Api(tags = "对接大屏登录接口")
|
||||
@RestController
|
||||
@RequestMapping("/tcZz/networkEcology/singleLogin")
|
||||
public class SingleLoginController extends BaseController {
|
||||
|
||||
|
||||
/**
|
||||
* 获取token
|
||||
*
|
||||
* @param userName 用户名
|
||||
* @param password 系统加密的密文
|
||||
* @return token
|
||||
* @throws Exception 异常
|
||||
*/
|
||||
public static String getToken(String userName, String password) throws Exception {
|
||||
|
||||
return SecretUtil.jasyptSymmetry(userName + "#" + password + "#" + System.currentTimeMillis() / 1000, SecretUtil.HMAC_SHA1);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 处置与应急
|
||||
*
|
||||
* @return 响应类
|
||||
*/
|
||||
@ApiOperation(value = "处置与应急")
|
||||
@GetMapping("/login1")
|
||||
public AjaxResult login1() throws Exception {
|
||||
// String token = getToken("admin", "59a984baa2991e4adcc4d307aa967b2516494386");
|
||||
String token = getToken("admin", "1ad2cd5508596152989cf70dbc9db5ad37298c3d");
|
||||
String encodeToken = URLEncoder.encode(token, "UTF-8");
|
||||
String s = "https://2.35.38.240/api/v2/singleLogin?" + "token=" + encodeToken + "&url=/dasv/preview/26";
|
||||
return AjaxResult.success((Object) s);
|
||||
}
|
||||
|
||||
/**
|
||||
* 供应链安全
|
||||
*
|
||||
* @return 响应类
|
||||
*/
|
||||
@ApiOperation(value = "供应链安全")
|
||||
@GetMapping("/login2")
|
||||
public AjaxResult login2() throws Exception {
|
||||
// String token = getToken("admin", "59a984baa2991e4adcc4d307aa967b2516494386");
|
||||
String token = getToken("admin", "1ad2cd5508596152989cf70dbc9db5ad37298c3d");
|
||||
String encodeToken = URLEncoder.encode(token, "UTF-8");
|
||||
String s = "https://2.35.38.240/api/v2/singleLogin?" + "token=" + encodeToken + "&url=/dasv/preview/10";
|
||||
return AjaxResult.success((Object) s);
|
||||
}
|
||||
}
|
@ -1,109 +0,0 @@
|
||||
package com.ruoyi.tcZz.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.tcZz.domain.TcZcdwpm;
|
||||
import com.ruoyi.tcZz.service.ITcZcdwpmService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 众测单位排名(tc_zcdwpm)表控制层
|
||||
* @author du
|
||||
* @since 2024/8/5 13:16
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "众测单位排名")
|
||||
@RequestMapping("/tcZz/networkSecurity/zcdwpm")
|
||||
public class TcZcdwpmController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ITcZcdwpmService tcZcdwpmService;
|
||||
|
||||
/**
|
||||
* 查询众测单位排名列表
|
||||
*/
|
||||
@ApiOperation(value = "查询众测单位排名列表", response = TcZcdwpm.class)
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TcZcdwpm tc) {
|
||||
startPage();
|
||||
List<TcZcdwpm> list = tcZcdwpmService.page(tc);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出众测单位排名列表
|
||||
*/
|
||||
@ApiOperation(value = " 导出众测单位排名列表")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TcZcdwpm tc) {
|
||||
List<TcZcdwpm> list = tcZcdwpmService.page(tc);
|
||||
ExcelUtil<TcZcdwpm> util = new ExcelUtil<>(TcZcdwpm.class);
|
||||
util.exportExcel(response, list, "众测单位排名详情数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取众测单位排名信息
|
||||
*/
|
||||
@ApiOperation(value = " 获取众测单位排名信息")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(tcZcdwpmService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增众测单位排名
|
||||
*/
|
||||
@ApiOperation(value = "新增众测单位排名")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TcZcdwpm tc) {
|
||||
return toAjax(tcZcdwpmService.insert(tc));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改众测单位排名
|
||||
*/
|
||||
@ApiOperation(value = "修改众测单位排名")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody TcZcdwpm tc) {
|
||||
return toAjax(tcZcdwpmService.update(tc));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除众测单位排名
|
||||
*/
|
||||
@ApiOperation(value = "删除众测单位排名")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(tcZcdwpmService.deleteByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导入
|
||||
*/
|
||||
@ApiOperation("通用导入excel信息")
|
||||
@PostMapping("/common/importExcel")
|
||||
public AjaxResult importExcel(MultipartFile file) throws Exception {
|
||||
ExcelUtil<TcZcdwpm> util = new ExcelUtil<>(TcZcdwpm.class);
|
||||
List<TcZcdwpm> tcZbxqList = util.importExcel(file.getInputStream());
|
||||
tcZcdwpmService.importUser(tcZbxqList);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("通用下载excel模板")
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
ExcelUtil<TcZcdwpm> util = new ExcelUtil<>(TcZcdwpm.class);
|
||||
util.importTemplateExcel(response, "众测单位排名详情");
|
||||
}
|
||||
}
|
@ -1,109 +0,0 @@
|
||||
package com.ruoyi.tcZz.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.tcZz.domain.TcZclb;
|
||||
import com.ruoyi.tcZz.service.ITcZclbService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 资产列表(tc_zclb)表控制层
|
||||
* @author du
|
||||
* @since 2024/8/5 13:16
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "资产列表")
|
||||
@RequestMapping("/tcZz/networkSecurity/zclb")
|
||||
public class TcZclbController extends BaseController {
|
||||
@Autowired
|
||||
private ITcZclbService tcZclbService;
|
||||
|
||||
/**
|
||||
* 查询资产列表列表
|
||||
*/
|
||||
@ApiOperation(value = "查询资产列表列表", response = TcZclb.class)
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TcZclb tc) {
|
||||
startPage();
|
||||
List<TcZclb> list = tcZclbService.page(tc);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出资产列表列表
|
||||
*/
|
||||
@ApiOperation(value = " 导出资产列表列表")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TcZclb tc) {
|
||||
List<TcZclb> list = tcZclbService.page(tc);
|
||||
ExcelUtil<TcZclb> util = new ExcelUtil<>(TcZclb.class);
|
||||
util.exportExcel(response, list, "资产列表详情数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取资产列表信息
|
||||
*/
|
||||
@ApiOperation(value = " 获取资产列表信息")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(tcZclbService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增资产列表
|
||||
*/
|
||||
@ApiOperation(value = "新增资产列表")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TcZclb tc) {
|
||||
return toAjax(tcZclbService.insert(tc));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改资产列表
|
||||
*/
|
||||
@ApiOperation(value = "修改资产列表")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody TcZclb tc) {
|
||||
return toAjax(tcZclbService.update(tc));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除资产列表
|
||||
*/
|
||||
@ApiOperation(value = "删除资产列表")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(tcZclbService.deleteByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导入
|
||||
*/
|
||||
@ApiOperation("通用导入excel信息")
|
||||
@PostMapping("/common/importExcel")
|
||||
public AjaxResult importExcel(MultipartFile file) throws Exception {
|
||||
ExcelUtil<TcZclb> util = new ExcelUtil<>(TcZclb.class);
|
||||
List<TcZclb> tcZbxqList = util.importExcel(file.getInputStream());
|
||||
tcZclbService.importUser(tcZbxqList);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("通用下载excel模板")
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
ExcelUtil<TcZclb> util = new ExcelUtil<>(TcZclb.class);
|
||||
util.importTemplateExcel(response, "资产列表详情");
|
||||
}
|
||||
|
||||
}
|
@ -1,113 +0,0 @@
|
||||
package com.ruoyi.tcZz.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.tcZz.domain.TcZclds;
|
||||
import com.ruoyi.tcZz.service.ITcZcldsService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 众测漏洞数(tc_zclds)表控制层
|
||||
* @author du
|
||||
* @since 2024/8/5 13:16
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "众测漏洞数")
|
||||
@RequestMapping("/tcZz/networkSecurity/zclds")
|
||||
public class TcZcldsController extends BaseController {
|
||||
@Autowired
|
||||
private ITcZcldsService tcZcldsService;
|
||||
|
||||
/**
|
||||
* 查询众测漏洞数列表
|
||||
*/
|
||||
@ApiOperation(value = "查询众测漏洞数列表", response = TcZclds.class)
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TcZclds tc) {
|
||||
startPage();
|
||||
List<TcZclds> list = tcZcldsService.page(tc);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出众测漏洞数列表
|
||||
*/
|
||||
@ApiOperation(value = " 导出众测漏洞数列表")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TcZclds tc) {
|
||||
List<TcZclds> list = tcZcldsService.page(tc);
|
||||
ExcelUtil<TcZclds> util = new ExcelUtil<>(TcZclds.class);
|
||||
util.exportExcel(response, list, "众测漏洞数详情数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取众测漏洞数信息
|
||||
*/
|
||||
@ApiOperation(value = " 获取众测漏洞数信息")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(tcZcldsService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增众测漏洞数
|
||||
*/
|
||||
@ApiOperation(value = "新增众测漏洞数")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TcZclds tc) {
|
||||
TcZclds t = new TcZclds();
|
||||
if(tcZcldsService.page(t).size()>=4){
|
||||
throw new ServiceException("无法新增!");
|
||||
}
|
||||
return toAjax(tcZcldsService.insert(tc));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改众测漏洞数
|
||||
*/
|
||||
@ApiOperation(value = "修改众测漏洞数")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody TcZclds tc) {
|
||||
return toAjax(tcZcldsService.update(tc));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除众测漏洞数
|
||||
*/
|
||||
@ApiOperation(value = "删除众测漏洞数")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(tcZcldsService.deleteByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导入
|
||||
*/
|
||||
@ApiOperation("通用导入excel信息")
|
||||
@PostMapping("/common/importExcel")
|
||||
public AjaxResult importExcel(MultipartFile file) throws Exception {
|
||||
ExcelUtil<TcZclds> util = new ExcelUtil<>(TcZclds.class);
|
||||
List<TcZclds> tcZbxqList = util.importExcel(file.getInputStream());
|
||||
tcZcldsService.importUser(tcZbxqList);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("通用下载excel模板")
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
ExcelUtil<TcZclds> util = new ExcelUtil<>(TcZclds.class);
|
||||
util.importTemplateExcel(response, "众测漏洞数详情");
|
||||
}
|
||||
}
|
@ -1,118 +0,0 @@
|
||||
package com.ruoyi.tcZz.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.tcZz.domain.TcZczccg;
|
||||
import com.ruoyi.tcZz.service.ITcZczccgService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 众测资产成果(tc_zczccg)表控制层
|
||||
* @author du
|
||||
* @since 2024/8/5 13:16
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "众测资产成果")
|
||||
@RequestMapping("/tcZz/networkSecurity/zczccg")
|
||||
public class TcZczccgController extends BaseController {
|
||||
@Autowired
|
||||
private ITcZczccgService tcZczccgService;
|
||||
|
||||
/**
|
||||
* 查询众测资产成果列表
|
||||
*/
|
||||
@ApiOperation(value = "查询众测资产成果列表", response = TcZczccg.class)
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TcZczccg tc) {
|
||||
startPage();
|
||||
List<TcZczccg> list = tcZczccgService.page(tc);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 大屏查询众测资产成果最新一条
|
||||
*/
|
||||
@ApiOperation(value = "大屏查询众测资产成果最新一条", response = TcZczccg.class)
|
||||
@GetMapping("/getOne")
|
||||
public AjaxResult getOne() {
|
||||
return success(tcZczccgService.getOne());
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出众测资产成果列表
|
||||
*/
|
||||
@ApiOperation(value = " 导出众测资产成果列表")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TcZczccg tc) {
|
||||
List<TcZczccg> list = tcZczccgService.page(tc);
|
||||
ExcelUtil<TcZczccg> util = new ExcelUtil<>(TcZczccg.class);
|
||||
util.exportExcel(response, list, "众测资产成果详情数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取众测资产成果信息
|
||||
*/
|
||||
@ApiOperation(value = " 获取众测资产成果信息")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(tcZczccgService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增众测资产成果
|
||||
*/
|
||||
@ApiOperation(value = "新增众测资产成果")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TcZczccg tc) {
|
||||
return toAjax(tcZczccgService.insert(tc));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改众测资产成果
|
||||
*/
|
||||
@ApiOperation(value = "修改众测资产成果")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody TcZczccg tc) {
|
||||
return toAjax(tcZczccgService.update(tc));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除众测资产成果
|
||||
*/
|
||||
@ApiOperation(value = "删除众测资产成果")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(tcZczccgService.deleteByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导入
|
||||
*/
|
||||
@ApiOperation("通用导入excel信息")
|
||||
@PostMapping("/common/importExcel")
|
||||
public AjaxResult importExcel(MultipartFile file) throws Exception {
|
||||
ExcelUtil<TcZczccg> util = new ExcelUtil<>(TcZczccg.class);
|
||||
List<TcZczccg> tcZbxqList = util.importExcel(file.getInputStream());
|
||||
tcZczccgService.importUser(tcZbxqList);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("通用下载excel模板")
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
ExcelUtil<TcZczccg> util = new ExcelUtil<>(TcZczccg.class);
|
||||
util.importTemplateExcel(response, "众测资产成果详情");
|
||||
}
|
||||
|
||||
}
|
@ -1,70 +0,0 @@
|
||||
package com.ruoyi.tcZz.controller;
|
||||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.file.FileUtils;
|
||||
import com.ruoyi.framework.config.ServerConfig;
|
||||
import com.ruoyi.tcZz.domain.httpsRequest;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
|
||||
/**
|
||||
* @author du
|
||||
* @since 2024/1/17 16:04
|
||||
*/
|
||||
@Api(tags = "文件通用包装")
|
||||
@RestController
|
||||
@RequestMapping("/tcZz/networkEcology/getHttp")
|
||||
public class httpController {
|
||||
|
||||
@Value("${ruoyi.profile}")
|
||||
private String profile;
|
||||
|
||||
@Autowired
|
||||
private ServerConfig serverConfig;
|
||||
|
||||
/**
|
||||
* 根据文件地址去请求该地址的数据
|
||||
*/
|
||||
@ApiOperation(value = "根据文件地址去请求该地址的数据")
|
||||
@PostMapping
|
||||
public AjaxResult screenSupervision(@RequestBody httpsRequest httpsRequest) throws IOException {
|
||||
URL url1 = new URL(httpsRequest.getUrls());
|
||||
// if (FilenameUtils.getExtension(url.getPath()).equals("docx") || FilenameUtils.getExtension(url.getPath()).equals("doc")) {
|
||||
// long l = HttpUtil.downloadFile(httpsRequest.getUrls(), FileUtil.file(this.profile));
|
||||
// // 设置响应头,用于告诉浏览器该响应是一个文件下载
|
||||
// response.setContentType("application/octet-stream");
|
||||
// response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode(FilenameUtils.getName(url.getPath()), "UTF-8"));
|
||||
// // 获取文件流
|
||||
// InputStream inputStream = FileUtil.getInputStream(this.profile + "/" + FilenameUtils.getName(url.getPath()));
|
||||
// // 将文件流写入响应体中
|
||||
// ServletOutputStream outputStream = response.getOutputStream();
|
||||
// byte[] buffer = new byte[1024];
|
||||
// int bytesRead;
|
||||
// while ((bytesRead = inputStream.read(buffer)) != -1) {
|
||||
// outputStream.write(buffer, 0, bytesRead);
|
||||
// }
|
||||
// inputStream.close();
|
||||
// outputStream.flush();
|
||||
// outputStream.close();
|
||||
// boolean success = FileUtil.del(this.profile + "/" + FilenameUtils.getName(url.getPath()));
|
||||
// } else if (FilenameUtils.getExtension(url.getPath()).equals("pdf")) {
|
||||
// }
|
||||
long l = HttpUtil.downloadFile(httpsRequest.getUrls(), FileUtil.file(this.profile));
|
||||
String https = "/profile/"+FilenameUtils.getName(url1.getPath());
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax.put("url", https);
|
||||
return ajax;
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
package com.ruoyi.tcZz.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 众测单位排名(tc_zcdwpm)表实体类
|
||||
* @author du
|
||||
* @since 2024/8/5 13:19
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("众测单位排名")
|
||||
public class TcZcdwpm extends BaseEntity {
|
||||
|
||||
/** $column.columnComment */
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
/** 单位名称 */
|
||||
@Excel(name = "单位名称")
|
||||
@ApiModelProperty(value = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
/** 积分 */
|
||||
@Excel(name = "积分")
|
||||
@ApiModelProperty(value = "积分")
|
||||
private Integer integral;
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
package com.ruoyi.tcZz.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 资产列表(tc_zclb)表实体类
|
||||
* @author du
|
||||
* @since 2024/8/5 13:20
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("资产列表")
|
||||
public class TcZclb extends BaseEntity {
|
||||
|
||||
/** $column.columnComment */
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
|
||||
|
||||
/** 所属单位 */
|
||||
@Excel(name = "所属单位")
|
||||
@ApiModelProperty(value = "所属单位")
|
||||
private String unit;
|
||||
|
||||
/** 资产名称 */
|
||||
@Excel(name = "资产名称")
|
||||
@ApiModelProperty(value = "资产名称")
|
||||
private String zcName;
|
||||
|
||||
/** 资产地址 */
|
||||
@Excel(name = "资产地址")
|
||||
@ApiModelProperty(value = "资产地址")
|
||||
private String zcAddress;
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
package com.ruoyi.tcZz.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 众测漏洞数(tc_zclds)表实体类
|
||||
* @author du
|
||||
* @since 2024/8/5 13:20
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("众测漏洞数")
|
||||
public class TcZclds extends BaseEntity {
|
||||
|
||||
/** $column.columnComment */
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
|
||||
|
||||
/** 漏洞等级 */
|
||||
@Excel(name = "漏洞等级",readConverterExp = "1=低危,2=中危,3=高危,4=紧急",combo = "低危,中危,高危,紧急")
|
||||
@ApiModelProperty(value = "漏洞数量")
|
||||
private String ldLevel;
|
||||
|
||||
/** 漏洞数量 */
|
||||
@Excel(name = "漏洞数量")
|
||||
@ApiModelProperty(value = "漏洞数量")
|
||||
private Integer ldNumber;
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
package com.ruoyi.tcZz.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 众测资产成果统计(tc_zczccg)表实体类
|
||||
* @author du
|
||||
* @since 2024/8/5 13:20
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("众测资产成果统计")
|
||||
public class TcZczccg extends BaseEntity {
|
||||
|
||||
/** $column.columnComment */
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
/** 涉及单位数 */
|
||||
@Excel(name = "涉及单位数")
|
||||
@ApiModelProperty(value = "涉及单位数")
|
||||
private Integer unitNumber;
|
||||
|
||||
/** 新增资产数 */
|
||||
@Excel(name = "新增资产数")
|
||||
@ApiModelProperty(value = "新增资产数")
|
||||
private Integer addNumber;
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
package com.ruoyi.tcZz.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author du
|
||||
* @since 2024/1/17 18:22
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("http实体类")
|
||||
public class httpsRequest {
|
||||
|
||||
/**
|
||||
* url地址
|
||||
*/
|
||||
@ApiModelProperty(value = "url地址")
|
||||
private String urls;
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
package com.ruoyi.tcZz.mapper;
|
||||
|
||||
import com.ruoyi.tcZz.domain.TcZcdwpm;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 众测单位排名(tc_zcdwpm)表数据处理层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-10-12
|
||||
*/
|
||||
public interface TcZcdwpmMapper
|
||||
{
|
||||
/**
|
||||
* 查询众测单位排名
|
||||
*
|
||||
* @param id 众测单位排名主键
|
||||
* @return 众测单位排名
|
||||
*/
|
||||
public TcZcdwpm getById(Long id);
|
||||
|
||||
/**
|
||||
* 查询众测单位排名列表
|
||||
*
|
||||
* @param tcBmtb 众测单位排名
|
||||
* @return 众测单位排名集合
|
||||
*/
|
||||
public List<TcZcdwpm> page(TcZcdwpm tcBmtb);
|
||||
|
||||
/**
|
||||
* 新增众测单位排名
|
||||
*
|
||||
* @param tcBmtb 众测单位排名
|
||||
* @return 结果
|
||||
*/
|
||||
public int insert(TcZcdwpm tcBmtb);
|
||||
|
||||
/**
|
||||
* 修改众测单位排名
|
||||
*
|
||||
* @param tcBmtb 众测单位排名
|
||||
* @return 结果
|
||||
*/
|
||||
public int update(TcZcdwpm tcBmtb);
|
||||
|
||||
/**
|
||||
* 删除众测单位排名
|
||||
*
|
||||
* @param id 众测单位排名主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除众测单位排名
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByIds(Long[] ids);
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
package com.ruoyi.tcZz.mapper;
|
||||
|
||||
import com.ruoyi.tcZz.domain.TcZclb;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 资产列表(tc_zclds)表数据处理层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-10-12
|
||||
*/
|
||||
public interface TcZclbMapper
|
||||
{
|
||||
/**
|
||||
* 查询资产列表排名
|
||||
*
|
||||
* @param id 资产列表排名主键
|
||||
* @return 资产列表排名
|
||||
*/
|
||||
public TcZclb getById(Long id);
|
||||
|
||||
/**
|
||||
* 查询资产列表排名列表
|
||||
*
|
||||
* @param tcBmtb 资产列表排名
|
||||
* @return 资产列表排名集合
|
||||
*/
|
||||
public List<TcZclb> page(TcZclb tcBmtb);
|
||||
|
||||
/**
|
||||
* 新增资产列表排名
|
||||
*
|
||||
* @param tcBmtb 资产列表排名
|
||||
* @return 结果
|
||||
*/
|
||||
public int insert(TcZclb tcBmtb);
|
||||
|
||||
/**
|
||||
* 修改资产列表排名
|
||||
*
|
||||
* @param tcBmtb 资产列表排名
|
||||
* @return 结果
|
||||
*/
|
||||
public int update(TcZclb tcBmtb);
|
||||
|
||||
/**
|
||||
* 删除资产列表排名
|
||||
*
|
||||
* @param id 资产列表排名主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除资产列表排名
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByIds(Long[] ids);
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
package com.ruoyi.tcZz.mapper;
|
||||
|
||||
import com.ruoyi.tcZz.domain.TcZclds;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 众测漏洞数(tc_zclds)表数据处理层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-10-12
|
||||
*/
|
||||
public interface TcZcldsMapper
|
||||
{
|
||||
/**
|
||||
* 查询众测漏洞数排名
|
||||
*
|
||||
* @param id 众测漏洞数排名主键
|
||||
* @return 众测漏洞数排名
|
||||
*/
|
||||
public TcZclds getById(Long id);
|
||||
|
||||
/**
|
||||
* 查询众测漏洞数排名列表
|
||||
*
|
||||
* @param tcBmtb 众测漏洞数排名
|
||||
* @return 众测漏洞数排名集合
|
||||
*/
|
||||
public List<TcZclds> page(TcZclds tcBmtb);
|
||||
|
||||
/**
|
||||
* 新增众测漏洞数排名
|
||||
*
|
||||
* @param tcBmtb 众测漏洞数排名
|
||||
* @return 结果
|
||||
*/
|
||||
public int insert(TcZclds tcBmtb);
|
||||
|
||||
/**
|
||||
* 修改众测漏洞数排名
|
||||
*
|
||||
* @param tcBmtb 众测漏洞数排名
|
||||
* @return 结果
|
||||
*/
|
||||
public int update(TcZclds tcBmtb);
|
||||
|
||||
/**
|
||||
* 删除众测漏洞数排名
|
||||
*
|
||||
* @param id 众测漏洞数排名主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除众测漏洞数排名
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByIds(Long[] ids);
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
package com.ruoyi.tcZz.mapper;
|
||||
|
||||
import com.ruoyi.tcZz.domain.TcZclds;
|
||||
import com.ruoyi.tcZz.domain.TcZczccg;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 众测资产成果(tc_zczccg)表数据处理层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-10-12
|
||||
*/
|
||||
public interface TcZczccgMapper
|
||||
{
|
||||
/**
|
||||
* 查询众测资产成果排名
|
||||
*
|
||||
* @param id 众测资产成果排名主键
|
||||
* @return 众测资产成果排名
|
||||
*/
|
||||
public TcZczccg getById(Long id);
|
||||
|
||||
/**
|
||||
* 查询众测资产成果排名列表
|
||||
*
|
||||
* @param tcBmtb 众测资产成果排名
|
||||
* @return 众测资产成果排名集合
|
||||
*/
|
||||
public List<TcZczccg> page(TcZczccg tcBmtb);
|
||||
|
||||
/**
|
||||
* 新增众测资产成果排名
|
||||
*
|
||||
* @param tcBmtb 众测资产成果排名
|
||||
* @return 结果
|
||||
*/
|
||||
public int insert(TcZczccg tcBmtb);
|
||||
|
||||
/**
|
||||
* 修改众测资产成果排名
|
||||
*
|
||||
* @param tcBmtb 众测资产成果排名
|
||||
* @return 结果
|
||||
*/
|
||||
public int update(TcZczccg tcBmtb);
|
||||
|
||||
/**
|
||||
* 删除众测资产成果排名
|
||||
*
|
||||
* @param id 众测资产成果排名主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除众测资产成果排名
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 大屏查询众测资产成果最新一条
|
||||
*/
|
||||
TcZczccg getOne();
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
package com.ruoyi.tcZz.service;
|
||||
|
||||
import com.ruoyi.tcZz.domain.TcZcdwpm;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 众测单位排名(tc_zcdwpm)表业务层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-10-13
|
||||
*/
|
||||
public interface ITcZcdwpmService
|
||||
{
|
||||
/**
|
||||
* 查询众测单位排名
|
||||
*
|
||||
* @param id 众测单位排名主键
|
||||
* @return 众测单位排名
|
||||
*/
|
||||
TcZcdwpm getById(Long id);
|
||||
|
||||
/**
|
||||
* 查询众测单位排名列表
|
||||
*
|
||||
* @param tc 众测单位排名
|
||||
* @return 众测单位排名集合
|
||||
*/
|
||||
List<TcZcdwpm> page(TcZcdwpm tc);
|
||||
|
||||
/**
|
||||
* 新增众测单位排名
|
||||
*
|
||||
* @param tc 众测单位排名
|
||||
* @return 结果
|
||||
*/
|
||||
int insert(TcZcdwpm tc);
|
||||
|
||||
/**
|
||||
* 修改众测单位排名
|
||||
*
|
||||
* @param tc 众测单位排名
|
||||
* @return 结果
|
||||
*/
|
||||
int update(TcZcdwpm tc);
|
||||
|
||||
/**
|
||||
* 批量删除众测单位排名
|
||||
*
|
||||
* @param ids 需要删除的众测单位排名主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除众测单位排名信息
|
||||
*
|
||||
* @param id 众测单位排名主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteById(Long id);
|
||||
|
||||
String importUser(List<TcZcdwpm> tcZbxqList);
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
package com.ruoyi.tcZz.service;
|
||||
|
||||
import com.ruoyi.tcZz.domain.TcZclb;
|
||||
import com.ruoyi.tcZz.domain.TcZczccg;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 资产列表(tc_zclb)表业务层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-10-13
|
||||
*/
|
||||
public interface ITcZclbService {
|
||||
/**
|
||||
* 查询资产列表
|
||||
*
|
||||
* @param id 众测资产成果主键
|
||||
* @return 众测资产成果
|
||||
*/
|
||||
TcZclb getById(Long id);
|
||||
|
||||
/**
|
||||
* 查询资产列表
|
||||
*
|
||||
* @param tc 众测资产成果
|
||||
* @return 众测资产成果集合
|
||||
*/
|
||||
List<TcZclb> page(TcZclb tc);
|
||||
|
||||
/**
|
||||
* 新增资产列表
|
||||
*
|
||||
* @param tc 众测资产成果
|
||||
* @return 结果
|
||||
*/
|
||||
int insert(TcZclb tc);
|
||||
|
||||
/**
|
||||
* 修改资产列表
|
||||
*
|
||||
* @param tc 众测资产成果
|
||||
* @return 结果
|
||||
*/
|
||||
int update(TcZclb tc);
|
||||
|
||||
/**
|
||||
* 批量删除资产列表
|
||||
*
|
||||
* @param ids 需要删除的众测资产成果主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除资产列表
|
||||
*
|
||||
* @param id 众测资产成果主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteById(Long id);
|
||||
|
||||
String importUser(List<TcZclb> tcZbxqList);
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
package com.ruoyi.tcZz.service;
|
||||
|
||||
import com.ruoyi.tcZz.domain.TcZclds;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 众测漏洞数(tc_zclds)表业务层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-10-13
|
||||
*/
|
||||
public interface ITcZcldsService
|
||||
{
|
||||
/**
|
||||
* 查询众测漏洞数
|
||||
*
|
||||
* @param id 众测漏洞数主键
|
||||
* @return 众测漏洞数
|
||||
*/
|
||||
TcZclds getById(Long id);
|
||||
|
||||
/**
|
||||
* 查询众测漏洞数列表
|
||||
*
|
||||
* @param tc 众测漏洞数
|
||||
* @return 众测漏洞数集合
|
||||
*/
|
||||
List<TcZclds> page(TcZclds tc);
|
||||
|
||||
/**
|
||||
* 新增众测漏洞数
|
||||
*
|
||||
* @param tc 众测漏洞数
|
||||
* @return 结果
|
||||
*/
|
||||
int insert(TcZclds tc);
|
||||
|
||||
/**
|
||||
* 修改众测漏洞数
|
||||
*
|
||||
* @param tc 众测漏洞数
|
||||
* @return 结果
|
||||
*/
|
||||
int update(TcZclds tc);
|
||||
|
||||
/**
|
||||
* 批量删除众测漏洞数
|
||||
*
|
||||
* @param ids 需要删除的众测漏洞数主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除众测漏洞数信息
|
||||
*
|
||||
* @param id 众测漏洞数主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteById(Long id);
|
||||
|
||||
String importUser(List<TcZclds> tcZbxqList);
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
package com.ruoyi.tcZz.service;
|
||||
|
||||
import com.ruoyi.tcZz.domain.TcZczccg;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 众测资产成果(tc_zczccg)表业务层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-10-13
|
||||
*/
|
||||
public interface ITcZczccgService {
|
||||
/**
|
||||
* 查询众测资产成果
|
||||
*
|
||||
* @param id 众测资产成果主键
|
||||
* @return 众测资产成果
|
||||
*/
|
||||
TcZczccg getById(Long id);
|
||||
|
||||
/**
|
||||
* 查询众测资产成果列表
|
||||
*
|
||||
* @param tc 众测资产成果
|
||||
* @return 众测资产成果集合
|
||||
*/
|
||||
List<TcZczccg> page(TcZczccg tc);
|
||||
|
||||
/**
|
||||
* 新增众测资产成果
|
||||
*
|
||||
* @param tc 众测资产成果
|
||||
* @return 结果
|
||||
*/
|
||||
int insert(TcZczccg tc);
|
||||
|
||||
/**
|
||||
* 修改众测资产成果
|
||||
*
|
||||
* @param tc 众测资产成果
|
||||
* @return 结果
|
||||
*/
|
||||
int update(TcZczccg tc);
|
||||
|
||||
/**
|
||||
* 批量删除众测资产成果
|
||||
*
|
||||
* @param ids 需要删除的众测资产成果主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除众测资产成果信息
|
||||
*
|
||||
* @param id 众测资产成果主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteById(Long id);
|
||||
|
||||
String importUser(List<TcZczccg> tcZbxqList);
|
||||
|
||||
/**
|
||||
* 大屏查询众测资产成果最新一条
|
||||
*/
|
||||
TcZczccg getOne();
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue