From a61e37950d3fb3ff1d174d43c966e212122ebe5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E9=87=91=E6=88=90?= <2693239786@qq.com> Date: Fri, 13 Oct 2023 18:32:58 +0800 Subject: [PATCH] update --- src/medicine/.idea/dbnavigator.xml | 3 ++ .../.idea/sonarlint/issuestore/index.pb | 26 +++++++++++--- .../sonarlint/securityhotspotstore/index.pb | 30 ++++++++++++---- .../Control/InformationQueryController.java | 3 +- .../Entity/CancerInformationProcessed.java | 19 +++++++++++ .../Service/InformationQueryService.java | 34 +++++++++++++++++-- .../src/main/resources/templates/index.html | 27 --------------- 7 files changed, 100 insertions(+), 42 deletions(-) create mode 100644 src/medicine/springboot/src/main/java/com/xht/springboot/Entity/CancerInformationProcessed.java delete mode 100644 src/medicine/springboot/src/main/resources/templates/index.html diff --git a/src/medicine/.idea/dbnavigator.xml b/src/medicine/.idea/dbnavigator.xml index f0bf29ec..0f70c694 100644 --- a/src/medicine/.idea/dbnavigator.xml +++ b/src/medicine/.idea/dbnavigator.xml @@ -17,6 +17,9 @@ + + + diff --git a/src/medicine/.idea/sonarlint/issuestore/index.pb b/src/medicine/.idea/sonarlint/issuestore/index.pb index 80679a76..ba5c33bf 100644 --- a/src/medicine/.idea/sonarlint/issuestore/index.pb +++ b/src/medicine/.idea/sonarlint/issuestore/index.pb @@ -61,15 +61,31 @@ p @springboot/src/main/java/com/xht/springboot/Entity/UserHome.java,0\b\0bf6f777ae20a7657065bc4a2b2a9f1f3b4876b1 q Aspringboot/src/main/java/com/xht/springboot/Entity/UserLogin.java,1\3\139a0da36daad8c438a5607ee212d1f38a505779 +{ +Kspringboot/src/main/java/com/xht/springboot/Dao/InformationQueryMapper.java,0\f\0fcaad315f4a551d84b6b331d3458cf4bcdc6276 +{ +Kspringboot/src/main/java/com/xht/springboot/Dao/LoginAndRegisterMapper.java,6\4\6455addaf8475c1ee66ddf019aba9934cde58b33 +ƒ +Sspringboot/src/main/java/com/xht/springboot/Control/LoginAndRegisterController.java,4\2\42d62ad23989879b1e669e84287f32b9ec3b7df5 +€ +Pspringboot/src/main/java/com/xht/springboot/Service/LoginAndRegisterService.java,1\2\12a535cbad8593fe8b50774140fecabf852efa9a +r +Bspringboot/src/main/java/com/xht/springboot/Tip/RequestResult.java,8\a\8ac776bbbb6e77f29694ccc4476b533f9f4573da +y +Ispringboot/src/main/java/com/xht/springboot/Config/InterceptorConfig.java,1\2\129776adc8407ad9ef1e9ad82d91867dfe647d40 +} +Mspringboot/src/main/java/com/xht/springboot/Interceptor/LoginInterceptor.java,0\d\0dbe3bf0a12d53f67d34580170641b79ed8ca216 + +Ospringboot/src/main/java/com/xht/springboot/Control/CancerDetectController.java,b\7\b7cd5493e06e5fd9d49343a72ed251284cff7045 y Ispringboot/src/main/java/com/xht/springboot/Entity/CancerInformation.java,b\5\b5e9edd6a873e8f600b989138d8c3c025f1b2893 y Ispringboot/src/main/java/com/xht/springboot/Utils/RedisAndDbOpsUtils.java,2\e\2e88797485b4a9bb730c7a3ee47a6bf0fd5d7447 +‚ +Rspringboot/src/main/java/com/xht/springboot/Entity/CancerInformationProcessed.java,2\e\2e789a45bab29b515d553bcbc6fb93843b27bd70 +v +Fspringboot/src/main/java/com/xht/springboot/SpringbootApplication.java,4\0\40324953a2003c0d6c6b3ceece38a620d48a0df7 ƒ Sspringboot/src/main/java/com/xht/springboot/Control/InformationQueryController.java,2\b\2b64f726d758544a03ab9287b407bfd77c4179b3 € -Pspringboot/src/main/java/com/xht/springboot/Service/InformationQueryService.java,3\e\3e8390fc18f553cd8e40f74084a3622827076137 -{ -Kspringboot/src/main/java/com/xht/springboot/Dao/InformationQueryMapper.java,0\f\0fcaad315f4a551d84b6b331d3458cf4bcdc6276 -{ -Kspringboot/src/main/java/com/xht/springboot/Dao/LoginAndRegisterMapper.java,6\4\6455addaf8475c1ee66ddf019aba9934cde58b33 \ No newline at end of file +Pspringboot/src/main/java/com/xht/springboot/Service/InformationQueryService.java,3\e\3e8390fc18f553cd8e40f74084a3622827076137 \ No newline at end of file diff --git a/src/medicine/.idea/sonarlint/securityhotspotstore/index.pb b/src/medicine/.idea/sonarlint/securityhotspotstore/index.pb index 70184678..174a0349 100644 --- a/src/medicine/.idea/sonarlint/securityhotspotstore/index.pb +++ b/src/medicine/.idea/sonarlint/securityhotspotstore/index.pb @@ -61,15 +61,31 @@ p @springboot/src/main/java/com/xht/springboot/Entity/UserHome.java,0\b\0bf6f777ae20a7657065bc4a2b2a9f1f3b4876b1 q Aspringboot/src/main/java/com/xht/springboot/Entity/UserLogin.java,1\3\139a0da36daad8c438a5607ee212d1f38a505779 +{ +Kspringboot/src/main/java/com/xht/springboot/Dao/InformationQueryMapper.java,0\f\0fcaad315f4a551d84b6b331d3458cf4bcdc6276 +{ +Kspringboot/src/main/java/com/xht/springboot/Dao/LoginAndRegisterMapper.java,6\4\6455addaf8475c1ee66ddf019aba9934cde58b33 +€ +Pspringboot/src/main/java/com/xht/springboot/Service/LoginAndRegisterService.java,1\2\12a535cbad8593fe8b50774140fecabf852efa9a +ƒ +Sspringboot/src/main/java/com/xht/springboot/Control/LoginAndRegisterController.java,4\2\42d62ad23989879b1e669e84287f32b9ec3b7df5 +r +Bspringboot/src/main/java/com/xht/springboot/Tip/RequestResult.java,8\a\8ac776bbbb6e77f29694ccc4476b533f9f4573da y -Ispringboot/src/main/java/com/xht/springboot/Utils/RedisAndDbOpsUtils.java,2\e\2e88797485b4a9bb730c7a3ee47a6bf0fd5d7447 +Ispringboot/src/main/java/com/xht/springboot/Config/InterceptorConfig.java,1\2\129776adc8407ad9ef1e9ad82d91867dfe647d40 +} +Mspringboot/src/main/java/com/xht/springboot/Interceptor/LoginInterceptor.java,0\d\0dbe3bf0a12d53f67d34580170641b79ed8ca216 + +Ospringboot/src/main/java/com/xht/springboot/Control/CancerDetectController.java,b\7\b7cd5493e06e5fd9d49343a72ed251284cff7045 y Ispringboot/src/main/java/com/xht/springboot/Entity/CancerInformation.java,b\5\b5e9edd6a873e8f600b989138d8c3c025f1b2893 -€ -Pspringboot/src/main/java/com/xht/springboot/Service/InformationQueryService.java,3\e\3e8390fc18f553cd8e40f74084a3622827076137 -{ -Kspringboot/src/main/java/com/xht/springboot/Dao/InformationQueryMapper.java,0\f\0fcaad315f4a551d84b6b331d3458cf4bcdc6276 +‚ +Rspringboot/src/main/java/com/xht/springboot/Entity/CancerInformationProcessed.java,2\e\2e789a45bab29b515d553bcbc6fb93843b27bd70 +y +Ispringboot/src/main/java/com/xht/springboot/Utils/RedisAndDbOpsUtils.java,2\e\2e88797485b4a9bb730c7a3ee47a6bf0fd5d7447 +v +Fspringboot/src/main/java/com/xht/springboot/SpringbootApplication.java,4\0\40324953a2003c0d6c6b3ceece38a620d48a0df7 ƒ Sspringboot/src/main/java/com/xht/springboot/Control/InformationQueryController.java,2\b\2b64f726d758544a03ab9287b407bfd77c4179b3 -{ -Kspringboot/src/main/java/com/xht/springboot/Dao/LoginAndRegisterMapper.java,6\4\6455addaf8475c1ee66ddf019aba9934cde58b33 \ No newline at end of file +€ +Pspringboot/src/main/java/com/xht/springboot/Service/InformationQueryService.java,3\e\3e8390fc18f553cd8e40f74084a3622827076137 \ No newline at end of file diff --git a/src/medicine/springboot/src/main/java/com/xht/springboot/Control/InformationQueryController.java b/src/medicine/springboot/src/main/java/com/xht/springboot/Control/InformationQueryController.java index 0bbda915..bec465b8 100644 --- a/src/medicine/springboot/src/main/java/com/xht/springboot/Control/InformationQueryController.java +++ b/src/medicine/springboot/src/main/java/com/xht/springboot/Control/InformationQueryController.java @@ -2,6 +2,7 @@ package com.xht.springboot.Control; import com.xht.springboot.Entity.CancerInformation; +import com.xht.springboot.Entity.CancerInformationProcessed; import com.xht.springboot.Service.InformationQueryService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -18,7 +19,7 @@ public class InformationQueryController { @RequestMapping("/cancer") @ResponseBody - public List getCancerInformation(String token){ + public List getCancerInformation(String token){ return informationQueryService.queryCancerInformation(token); } diff --git a/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/CancerInformationProcessed.java b/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/CancerInformationProcessed.java new file mode 100644 index 00000000..1db29aaa --- /dev/null +++ b/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/CancerInformationProcessed.java @@ -0,0 +1,19 @@ +package com.xht.springboot.Entity; + +import lombok.Data; +import lombok.ToString; +import org.springframework.stereotype.Component; + +@Component +@Data +@ToString +public class CancerInformationProcessed { + private int id; + private String name; + private String[] impact; + private String[] summary; + private String[] symptom; + private String[] factor; + private String[] judge; + private String[] heal; +} diff --git a/src/medicine/springboot/src/main/java/com/xht/springboot/Service/InformationQueryService.java b/src/medicine/springboot/src/main/java/com/xht/springboot/Service/InformationQueryService.java index 70969fad..81bbf526 100644 --- a/src/medicine/springboot/src/main/java/com/xht/springboot/Service/InformationQueryService.java +++ b/src/medicine/springboot/src/main/java/com/xht/springboot/Service/InformationQueryService.java @@ -3,11 +3,13 @@ package com.xht.springboot.Service; import com.xht.springboot.Dao.InformationQueryMapper; import com.xht.springboot.Entity.CancerInformation; +import com.xht.springboot.Entity.CancerInformationProcessed; import com.xht.springboot.Utils.FuncInterFaces.QueryFunctionForDB; import com.xht.springboot.Utils.RedisAndDbOpsUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.List; @Service @@ -20,7 +22,7 @@ public class InformationQueryService { String cancerInformationLockName = "cancerInformationByTokenLock"; - public List queryCancerInformation(String token){ + public List queryCancerInformation(String token){ QueryFunctionForDB> queryFunctionForDB = new QueryFunctionForDB>() { @Override public List queryForDB(String token) { @@ -32,6 +34,34 @@ public class InformationQueryService { } }; - return redisAndDbOpsUtils.queryNoFilter(cancerInformationCacheName,token,cancerInformationLockName,queryFunctionForDB,token); + List results = redisAndDbOpsUtils.queryNoFilter(cancerInformationCacheName, token, cancerInformationLockName, queryFunctionForDB, token); + List res = new ArrayList<>(); + + for(int i=0;i - - - - - - Document - - -

- web -

- - - - - - \ No newline at end of file