Преглед изворни кода

查询项目信息 - 查询算法信息

martin пре 2 година
родитељ
комит
f15deac488

+ 1 - 1
simulation-resource-server/src/main/java/com/css/simulation/resource/project/impl/SimulationProjectServiceImpl.java

@@ -905,7 +905,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
         } else {
             AlgorithmPO algorithmPO = new AlgorithmPO();
             algorithmPO.setId(algorithmId);
-            algorithmBaseInfoVo = simulationProjectMapper.selectAlgorithmBaseInfoById(algorithmPO).get(0);
+            algorithmBaseInfoVo = simulationProjectMapper.selectAlgorithmById(algorithmPO);
         }
         return algorithmBaseInfoVo;
     }

+ 3 - 0
simulation-resource-server/src/main/java/com/css/simulation/resource/project/mapper/SimulationProjectMapper.java

@@ -43,6 +43,9 @@ public interface SimulationProjectMapper {
 
     List<AlgorithmPO> selectAlgorithmBaseInfoById(AlgorithmPO algorithmPO);
 
+
+    AlgorithmPO selectAlgorithmById(AlgorithmPO algorithmPO);
+
     List<VehiclePO> selectVehicleBaseInfoById(String id);
 
     List<ScenePackagePO> selectScenePackageBaseById(ScenePackagePO scenePackagePO);

+ 7 - 0
simulation-resource-server/src/main/resources/mapper/project/SimulationProjectMapper.xml

@@ -283,6 +283,13 @@
         </if>
     </select>
 
+    <select id="selectAlgorithmById" resultType="api.common.pojo.po.algorithm.AlgorithmPO">
+        select id, algorithm_name, description
+        from algorithm
+        where id = #{id,jdbcType=VARCHAR}
+    </select>
+
+
     <!--获取车辆基本信息-->
     <select id="selectVehicleBaseInfoById" parameterType="string" resultType="api.common.pojo.po.model.VehiclePO">
         select a.id, a.vehicle_name, a.description, a.vehicle_top_view