xiangjincheng_branch
向金成 2 years ago
parent 0b609c9787
commit a61e37950d

@ -17,6 +17,9 @@
<component name="DBNavigator.Project.DatabaseFileManager"> <component name="DBNavigator.Project.DatabaseFileManager">
<open-files /> <open-files />
</component> </component>
<component name="DBNavigator.Project.ExecutionManager">
<retain-sticky-names value="false" />
</component>
<component name="DBNavigator.Project.Settings"> <component name="DBNavigator.Project.Settings">
<connections /> <connections />
<browser-settings> <browser-settings>

@ -61,15 +61,31 @@ p
@springboot/src/main/java/com/xht/springboot/Entity/UserHome.java,0\b\0bf6f777ae20a7657065bc4a2b2a9f1f3b4876b1 @springboot/src/main/java/com/xht/springboot/Entity/UserHome.java,0\b\0bf6f777ae20a7657065bc4a2b2a9f1f3b4876b1
q q
Aspringboot/src/main/java/com/xht/springboot/Entity/UserLogin.java,1\3\139a0da36daad8c438a5607ee212d1f38a505779 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 y
Ispringboot/src/main/java/com/xht/springboot/Entity/CancerInformation.java,b\5\b5e9edd6a873e8f600b989138d8c3c025f1b2893 Ispringboot/src/main/java/com/xht/springboot/Entity/CancerInformation.java,b\5\b5e9edd6a873e8f600b989138d8c3c025f1b2893
y y
Ispringboot/src/main/java/com/xht/springboot/Utils/RedisAndDbOpsUtils.java,2\e\2e88797485b4a9bb730c7a3ee47a6bf0fd5d7447 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 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 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

@ -61,15 +61,31 @@ p
@springboot/src/main/java/com/xht/springboot/Entity/UserHome.java,0\b\0bf6f777ae20a7657065bc4a2b2a9f1f3b4876b1 @springboot/src/main/java/com/xht/springboot/Entity/UserHome.java,0\b\0bf6f777ae20a7657065bc4a2b2a9f1f3b4876b1
q q
Aspringboot/src/main/java/com/xht/springboot/Entity/UserLogin.java,1\3\139a0da36daad8c438a5607ee212d1f38a505779 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 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 y
Ispringboot/src/main/java/com/xht/springboot/Entity/CancerInformation.java,b\5\b5e9edd6a873e8f600b989138d8c3c025f1b2893 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 Rspringboot/src/main/java/com/xht/springboot/Entity/CancerInformationProcessed.java,2\e\2e789a45bab29b515d553bcbc6fb93843b27bd70
{ y
Kspringboot/src/main/java/com/xht/springboot/Dao/InformationQueryMapper.java,0\f\0fcaad315f4a551d84b6b331d3458cf4bcdc6276 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 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 Pspringboot/src/main/java/com/xht/springboot/Service/InformationQueryService.java,3\e\3e8390fc18f553cd8e40f74084a3622827076137

@ -2,6 +2,7 @@ package com.xht.springboot.Control;
import com.xht.springboot.Entity.CancerInformation; import com.xht.springboot.Entity.CancerInformation;
import com.xht.springboot.Entity.CancerInformationProcessed;
import com.xht.springboot.Service.InformationQueryService; import com.xht.springboot.Service.InformationQueryService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -18,7 +19,7 @@ public class InformationQueryController {
@RequestMapping("/cancer") @RequestMapping("/cancer")
@ResponseBody @ResponseBody
public List<CancerInformation> getCancerInformation(String token){ public List<CancerInformationProcessed> getCancerInformation(String token){
return informationQueryService.queryCancerInformation(token); return informationQueryService.queryCancerInformation(token);
} }

@ -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;
}

@ -3,11 +3,13 @@ package com.xht.springboot.Service;
import com.xht.springboot.Dao.InformationQueryMapper; import com.xht.springboot.Dao.InformationQueryMapper;
import com.xht.springboot.Entity.CancerInformation; import com.xht.springboot.Entity.CancerInformation;
import com.xht.springboot.Entity.CancerInformationProcessed;
import com.xht.springboot.Utils.FuncInterFaces.QueryFunctionForDB; import com.xht.springboot.Utils.FuncInterFaces.QueryFunctionForDB;
import com.xht.springboot.Utils.RedisAndDbOpsUtils; import com.xht.springboot.Utils.RedisAndDbOpsUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@Service @Service
@ -20,7 +22,7 @@ public class InformationQueryService {
String cancerInformationLockName = "cancerInformationByTokenLock"; String cancerInformationLockName = "cancerInformationByTokenLock";
public List<CancerInformation> queryCancerInformation(String token){ public List<CancerInformationProcessed> queryCancerInformation(String token){
QueryFunctionForDB<List<CancerInformation>> queryFunctionForDB = new QueryFunctionForDB<List<CancerInformation>>() { QueryFunctionForDB<List<CancerInformation>> queryFunctionForDB = new QueryFunctionForDB<List<CancerInformation>>() {
@Override @Override
public List<CancerInformation> queryForDB(String token) { public List<CancerInformation> queryForDB(String token) {
@ -32,6 +34,34 @@ public class InformationQueryService {
} }
}; };
return redisAndDbOpsUtils.queryNoFilter(cancerInformationCacheName,token,cancerInformationLockName,queryFunctionForDB,token); List<CancerInformation> results = redisAndDbOpsUtils.queryNoFilter(cancerInformationCacheName, token, cancerInformationLockName, queryFunctionForDB, token);
List<CancerInformationProcessed> res = new ArrayList<>();
for(int i=0;i<results.size();i++){
CancerInformation cancerInformation = results.get(i);
CancerInformationProcessed cancerInformationProcessed = new CancerInformationProcessed();
String[] strs = cancerInformation.getImpact().split("\\$");
cancerInformationProcessed.setImpact(strs);
strs = cancerInformation.getSummary().split("\\$");
cancerInformationProcessed.setSummary(strs);
strs = cancerInformation.getSymptom().split("\\$");
cancerInformationProcessed.setSymptom(strs);
strs = cancerInformation.getFactor().split("\\$");
cancerInformationProcessed.setFactor(strs);
strs = cancerInformation.getJudge().split("\\$");
cancerInformationProcessed.setJudge(strs);
strs = cancerInformation.getHeal().split("\\$");
cancerInformationProcessed.setHeal(strs);
res.add(cancerInformationProcessed);
}
return res;
} }
} }

@ -1,27 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width , initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<h1>
web
</h1>
<input type="file" id = "files">
<img src="" alt="" id = "img">
<script>
let files = document.getElementById("files");
let img = document.getElementById("img");
files.onchange = function ()
{
console.log(URL.createObjectURL(this.files[0]));
}
</script>
</body>
</html>
Loading…
Cancel
Save