From 95b938586c9a6b0fe0d57157a999a999c33a0c48 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Fri, 08 Dec 2023 08:44:37 +0800
Subject: [PATCH] 适配多个校区
---
src/main/java/org/springblade/modules/architecture/controller/ArchitectureController.java | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/springblade/modules/architecture/controller/ArchitectureController.java b/src/main/java/org/springblade/modules/architecture/controller/ArchitectureController.java
index a092b03..5672c33 100644
--- a/src/main/java/org/springblade/modules/architecture/controller/ArchitectureController.java
+++ b/src/main/java/org/springblade/modules/architecture/controller/ArchitectureController.java
@@ -292,8 +292,8 @@
* @return
*/
@GetMapping("/selectArchALL")
- public R selectArchALL() {
- return R.data(architectureService.selectArchALL());
+ public R selectArchALL(ArchitectureVO architecture) {
+ return R.data(architectureService.selectArchALL(architecture));
}
/**
@@ -409,12 +409,13 @@
* 校园搜索
*
* @param mechanismName 名称模糊查询
+ * @param campus 所属校区
* @return
*/
@GetMapping("/selectLook")
- public R selectLook(String mechanismName) {
+ public R selectLook(String mechanismName,String campus) {
List list = new ArrayList();
- List<Map<Object, Object>> maps = architectureService.selectLook(mechanismName);
+ List<Map<Object, Object>> maps = architectureService.selectLook(mechanismName,campus);
//排除为null的数据
List<Map<Object, Object>> list2 = maps.parallelStream().filter(Objects::nonNull).collect(Collectors.toList());
// for (int i = 0; i < list2.size(); i++) {
@@ -432,7 +433,7 @@
*/
@GetMapping("/url")
public void url() throws IOException, ServerException, InsufficientDataException, NoSuchAlgorithmException, InternalException, InvalidResponseException, XmlParserException, InvalidKeyException, ErrorResponseException {
- List<Architecture> list = architectureService.selectArchALL();
+ List<Architecture> list = architectureService.selectArchALL(null);
for (Architecture architecture : list) {
int index = architecture.getCodeurl().lastIndexOf(",") +1;
String substring = architecture.getCodeurl().substring(index);
@@ -496,7 +497,7 @@
*/
@GetMapping("/refreshCode")
public void refreshCode() throws IOException, ServerException, InsufficientDataException, NoSuchAlgorithmException, InternalException, InvalidResponseException, XmlParserException, InvalidKeyException, ErrorResponseException {
- List<Architecture> list = architectureService.selectArchALL();
+ List<Architecture> list = architectureService.selectArchALL(null);
for (Architecture architecture : list) {
int index = architecture.getCodeurl().lastIndexOf(",") +1;
String substring = architecture.getCodeurl().substring(index);
--
Gitblit v1.9.3