allen 11 months ago
parent
commit
d055c84a99

+ 6 - 0
pdaaphm-admin/src/main/java/com/pdaaphm/system/controller/AlgConfigController.java

@@ -101,4 +101,10 @@ public class AlgConfigController extends BaseController
     {
         return toAjax(algConfigService.deleteAlgConfigByIds(ids));
     }
+
+    @GetMapping("/getAlgConfigByType/{type}")
+    public AjaxResult getAlgConfigByType(@PathVariable String type)
+    {
+        return success(algConfigService.getAlgConfigByType(type));
+    }
 }

+ 6 - 0
pdaaphm-admin/src/main/java/com/pdaaphm/system/controller/DataController.java

@@ -101,4 +101,10 @@ public class DataController extends BaseController
     {
         return toAjax(dataService.deleteDataByIds(ids));
     }
+
+    @GetMapping("/getDataByType/{type}")
+    public AjaxResult getDataByType(@PathVariable String type)
+    {
+        return success(dataService.getDataByType(type));
+    }
 }

+ 6 - 0
pdaaphm-admin/src/main/java/com/pdaaphm/system/controller/TDataProcessController.java

@@ -101,4 +101,10 @@ public class TDataProcessController extends BaseController
     {
         return toAjax(tDataProcessService.deleteTDataProcessByIds(ids));
     }
+
+    @GetMapping("/getDataProcessByType/{type}")
+    public AjaxResult getDataProcessByType(@PathVariable String type)
+    {
+        return success(tDataProcessService.getDataProcessByType(type));
+    }
 }

+ 2 - 0
pdaaphm-admin/src/main/java/com/pdaaphm/system/service/IAlgConfigService.java

@@ -58,4 +58,6 @@ public interface IAlgConfigService
      * @return 结果
      */
     public int deleteAlgConfigById(Long id);
+
+    List<AlgConfig> getAlgConfigByType(String type);
 }

+ 2 - 0
pdaaphm-admin/src/main/java/com/pdaaphm/system/service/IDataService.java

@@ -58,4 +58,6 @@ public interface IDataService
      * @return 结果
      */
     public int deleteDataById(Long id);
+
+    List<Data> getDataByType(String type);
 }

+ 2 - 0
pdaaphm-admin/src/main/java/com/pdaaphm/system/service/ITDataProcessService.java

@@ -58,4 +58,6 @@ public interface ITDataProcessService
      * @return 结果
      */
     public int deleteTDataProcessById(Long id);
+
+    List<TDataProcess> getDataProcessByType(String type);
 }

+ 8 - 0
pdaaphm-admin/src/main/java/com/pdaaphm/system/service/impl/AlgConfigServiceImpl.java

@@ -93,4 +93,12 @@ public class AlgConfigServiceImpl implements IAlgConfigService
     {
         return algConfigMapper.deleteAlgConfigById(id);
     }
+
+    @Override
+    public List<AlgConfig> getAlgConfigByType(String type) {
+        AlgConfig algConfig = new AlgConfig();
+        algConfig.setAlgType(type);
+        this.selectAlgConfigList(algConfig);
+        return null;
+    }
 }

+ 7 - 0
pdaaphm-admin/src/main/java/com/pdaaphm/system/service/impl/DataServiceImpl.java

@@ -93,4 +93,11 @@ public class DataServiceImpl implements IDataService
     {
         return dataMapper.deleteDataById(id);
     }
+
+    @Override
+    public List<Data> getDataByType(String type) {
+        Data data = new Data();
+        data.setDataType(type);
+        return this.selectDataList(data);
+    }
 }

+ 7 - 0
pdaaphm-admin/src/main/java/com/pdaaphm/system/service/impl/TDataProcessServiceImpl.java

@@ -93,4 +93,11 @@ public class TDataProcessServiceImpl implements ITDataProcessService
     {
         return tDataProcessMapper.deleteTDataProcessById(id);
     }
+
+    @Override
+    public List<TDataProcess> getDataProcessByType(String type) {
+        TDataProcess dataProcess = new TDataProcess();
+        dataProcess.setProcessType(type);
+        this.selectTDataProcessList(dataProcess);
+    }
 }

+ 1 - 1
pdaaphm-admin/src/main/resources/application.yml

@@ -78,7 +78,7 @@ spring:
     # 数据库索引
     database: 0
     # 密码
-    password:
+    password: CWwYsGjafmv8Sr7g
     # 连接超时时间
     timeout: 10s
     lettuce:

+ 1 - 0
pdaaphm-admin/src/main/resources/mapper/system/AlgConfigMapper.xml

@@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="algName != null  and algName != ''"> and alg_name like concat('%', #{algName}, '%')</if>
             <if test="algType != null  and algType != ''"> and alg_type = #{algType}</if>
         </where>
+        order by create_time desc
     </select>
     
     <select id="selectAlgConfigById" parameterType="Long" resultMap="AlgConfigResult">

+ 1 - 0
pdaaphm-admin/src/main/resources/mapper/system/DataMapper.xml

@@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>  
             <if test="dataType != null  and dataType != ''"> and data_type = #{dataType}</if>
         </where>
+        order by create_time desc
     </select>
     
     <select id="selectDataById" parameterType="Long" resultMap="DataResult">

+ 1 - 0
pdaaphm-admin/src/main/resources/mapper/system/TDataProcessMapper.xml

@@ -37,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="endTime != null "> and end_time = #{endTime}</if>
             <if test="log != null  and log != ''"> and log = #{log}</if>
         </where>
+        order by create_time desc
     </select>
     
     <select id="selectTDataProcessById" parameterType="Long" resultMap="TDataProcessResult">