|
@@ -5,6 +5,7 @@ import com.css.simulation.resource.common.infrastructure.mysql.param.AlgorithmEx
|
|
import org.apache.ibatis.annotations.Insert;
|
|
import org.apache.ibatis.annotations.Insert;
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
import org.apache.ibatis.annotations.Select;
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
|
+import org.apache.ibatis.annotations.Update;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
@@ -14,11 +15,17 @@ public interface AlgorithmExpandMapper {
|
|
@Select(" <script>" +
|
|
@Select(" <script>" +
|
|
" select id, algorithm_id, algorithm_name, description, algorithm_type, status\n" +
|
|
" select id, algorithm_id, algorithm_name, description, algorithm_type, status\n" +
|
|
" from algorithm_expand\n" +
|
|
" from algorithm_expand\n" +
|
|
- " where algorithm_id in\n" +
|
|
|
|
|
|
+ " where 1=1 " +
|
|
|
|
+ " <if test='algorithmIds != null and algorithmIds.size() > 0'>\n" +
|
|
|
|
+ " and algorithm_id in\n" +
|
|
" <foreach item='item' collection='algorithmIds' separator=',' open='(' close=')'>\n" +
|
|
" <foreach item='item' collection='algorithmIds' separator=',' open='(' close=')'>\n" +
|
|
" #{item}\n" +
|
|
" #{item}\n" +
|
|
" </foreach>" +
|
|
" </foreach>" +
|
|
- "</script>")
|
|
|
|
|
|
+ " </if>" +
|
|
|
|
+ " <if test='algorithmId != null and algorithmId != '''>\n" +
|
|
|
|
+ " and algorithm_id = #{algorithmId}" +
|
|
|
|
+ " </if>" +
|
|
|
|
+ " </script>")
|
|
List<AlgorithmExpandInfrastructureEntity> select(AlgorithmExpandInfrastructureParam algorithmExpandInfrastructureParam);
|
|
List<AlgorithmExpandInfrastructureEntity> select(AlgorithmExpandInfrastructureParam algorithmExpandInfrastructureParam);
|
|
|
|
|
|
@Select(" <script>" +
|
|
@Select(" <script>" +
|
|
@@ -34,4 +41,17 @@ public interface AlgorithmExpandMapper {
|
|
@Insert("insert into algorithm_expand(id, algorithm_id, algorithm_name, description, algorithm_type, algorithm_version, team, topic, status)\n\n" +
|
|
@Insert("insert into algorithm_expand(id, algorithm_id, algorithm_name, description, algorithm_type, algorithm_version, team, topic, status)\n\n" +
|
|
" value (#{id}, #{algorithmId}, #{algorithmName}, #{description}, #{algorithmType},#{algorithmVersion},#{team},{topic}, #{status})\n")
|
|
" value (#{id}, #{algorithmId}, #{algorithmName}, #{description}, #{algorithmType},#{algorithmVersion},#{team},{topic}, #{status})\n")
|
|
void insert(AlgorithmExpandInfrastructureEntity algorithmExpandInfrastructureEntity);
|
|
void insert(AlgorithmExpandInfrastructureEntity algorithmExpandInfrastructureEntity);
|
|
|
|
+
|
|
|
|
+ @Update("update algorithm_expand\n" +
|
|
|
|
+ "set id = #{id},\n" +
|
|
|
|
+ " algorithm_id = #{algorithmId},\n" +
|
|
|
|
+ " algorithm_name = #{algorithmName},\n" +
|
|
|
|
+ " description = #{description},\n" +
|
|
|
|
+ " algorithm_type = #{algorithmType},\n" +
|
|
|
|
+ " algorithm_version = #{algorithmVersion},\n" +
|
|
|
|
+ " team = #{team},\n" +
|
|
|
|
+ " topic = #{topic},\n" +
|
|
|
|
+ " status = #{status}\n" +
|
|
|
|
+ "where algorithm_id = #{algorithmId}\n")
|
|
|
|
+ void update(AlgorithmExpandInfrastructureEntity algorithmExpandInfrastructureEntity);
|
|
}
|
|
}
|