root 2 rokov pred
rodič
commit
611bbb5be1

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

@@ -20,7 +20,7 @@ public interface AlgorithmMapper {
 
     int update(AlgorithmPO po);
 
-    int deleteById(AlgorithmParameter param);
+    void deleteById(@Param("algorithmId") String algorithmId);
 
     AlgorithmPO selectDetailsById(@Param("algorithmId") String algorithmId);
 

+ 1 - 3
simulation-resource-server/src/main/java/com/css/simulation/resource/algorithm/serviceImpl/AlgorithmServiceImpl.java

@@ -273,7 +273,6 @@ public class AlgorithmServiceImpl implements AlgorithmService {
         if (isEmpty(param.getId())) {
             return new ResponseBodyVO<>(ResponseBodyVO.Response.CLIENT_FAILURE);
         }
-        
         String algorithmId = param.getId();
         // 查询算法相关的正在运行的项目
         List<RunningProjectVO> runningProjectVos = algorithmMapper.selectRunningProject(algorithmId);
@@ -300,9 +299,8 @@ public class AlgorithmServiceImpl implements AlgorithmService {
                 }
             }
             String substring = stringBuilder.substring(0, stringBuilder.lastIndexOf(","));
-            return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, "该算法已绑定ID为 " + substring + " 自动运行项目,删除后该项目将停止自动运行");
         }
-        algorithmMapper.deleteById(param);
+        algorithmMapper.deleteById(algorithmId);
         LogUtil.delete();
         return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS);
 

+ 1 - 1
simulation-resource-server/src/main/resources/mapper/algorithm/AlgorithmMapper.xml

@@ -170,7 +170,7 @@
     <update id="deleteById">
         update algorithm
         set is_deleted = '1'
-        where id = #{id,jdbcType=VARCHAR}
+        where id = #{algorithmId}
     </update>
 
     <update id="update" parameterType="api.common.pojo.po.algorithm.AlgorithmPO">