瀏覽代碼

首页算法数量

wangzhiqiang 3 年之前
父節點
當前提交
101a70eae6

+ 12 - 0
simulation-resource-server/src/main/java/com/css/simulation/resource/algorithm/ctrl/AlgorithmCtrl.java

@@ -110,4 +110,16 @@ public class AlgorithmCtrl {
     public ResponseBodyVO testConnection(@RequestBody AlgorithmParameter param){
         return service.testConnection(param);
     }
+
+    /**
+     * 首页文件数量
+     * @param
+     * @return
+     */
+    @RequestMapping("selectDetailsBySy")
+    @ResponseBody
+    public ResponseBodyVO selectDetailsBySy(){
+        return service.selectDetailsBySy();
+    }
+
 }

+ 2 - 0
simulation-resource-server/src/main/java/com/css/simulation/resource/algorithm/mapper/AlgorithmMapper.java

@@ -31,4 +31,6 @@ public interface AlgorithmMapper {
     List<RunningProjectVO> selectRunningProject(@Param("id") String id);
 
     List<AlgorithmVO> selectSharedAlgorithmList(AlgorithmParameter param);
+
+    int  selectDetailsBySy(AlgorithmParameter param);
 }

+ 2 - 0
simulation-resource-server/src/main/java/com/css/simulation/resource/algorithm/service/AlgorithmService.java

@@ -24,4 +24,6 @@ public interface AlgorithmService {
     ResponseBodyVO shareAlgorithm(AlgorithmParameter param);
 
     ResponseBodyVO testConnection(AlgorithmParameter param);
+
+    ResponseBodyVO selectDetailsBySy();
 }

+ 15 - 0
simulation-resource-server/src/main/java/com/css/simulation/resource/algorithm/serviceImpl/AlgorithmServiceImpl.java

@@ -19,6 +19,7 @@ import com.github.pagehelper.PageInfo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import java.io.IOException;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -225,4 +226,18 @@ public class AlgorithmServiceImpl implements AlgorithmService {
         return "";
     }
 
+    @Override
+    public ResponseBodyVO selectDetailsBySy() {
+        AlgorithmParameter param=new AlgorithmParameter();
+        param.setUploadMode("1");
+        param.setShare("0");
+        int fileNum= algorithmMapper.selectDetailsBySy(param);
+        param.setUploadMode("2");
+        int pathNum= algorithmMapper.selectDetailsBySy(param);
+        Map map=new HashMap();
+        map.put("fileNum",fileNum);
+        map.put("pathNum",pathNum);
+        return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS,map);
+    }
+
 }