|
@@ -0,0 +1,62 @@
|
|
|
+package com.css.simulation.resource.scheduler.mapper;
|
|
|
+
|
|
|
+
|
|
|
+import com.css.simulation.resource.scheduler.pojo.po.ProjectPO;
|
|
|
+import org.apache.ibatis.annotations.*;
|
|
|
+import org.apache.ibatis.type.JdbcType;
|
|
|
+
|
|
|
+import java.sql.Timestamp;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+@Mapper
|
|
|
+public interface UserMapper {
|
|
|
+
|
|
|
+
|
|
|
+ @Results(id = "project", value = {
|
|
|
+ @Result(column = "id", property = "id", jdbcType = JdbcType.VARCHAR),
|
|
|
+ @Result(column = "scene", property = "scenePackageId", jdbcType = JdbcType.VARCHAR)
|
|
|
+ })
|
|
|
+
|
|
|
+ @Select("select id, scene\n" +
|
|
|
+ "from simulation_manual_project\n" +
|
|
|
+ "where id = #{projectId}")
|
|
|
+ ProjectPO selectById(@Param("projectId")String projectId);
|
|
|
+
|
|
|
+
|
|
|
+ @Update("update simulation_manual_project\n" +
|
|
|
+ "set now_run_state = #{state},\n" +
|
|
|
+ " task_completed = '0'\n" +
|
|
|
+ "where id = #{id}")
|
|
|
+ void resetProjectState(@Param("id") String id, @Param("state") String state);
|
|
|
+
|
|
|
+ @Update("update simulation_manual_project\n" +
|
|
|
+ "set now_run_state = #{state},\n" +
|
|
|
+ " finish_time = #{finishTime}\n" +
|
|
|
+ "where id = #{id}")
|
|
|
+ void updateProjectState(@Param("id") String id, @Param("state") String state,@Param("finishTime") Timestamp finishTime);
|
|
|
+
|
|
|
+
|
|
|
+ @Update("update simulation_manual_project\n" +
|
|
|
+ "set task_number = #{taskNumber}, task_completed = 0\n" +
|
|
|
+ "where id = #{id}")
|
|
|
+ void updateTaskNumber(@Param("id") String id, @Param("taskNumber") int taskNumber);
|
|
|
+
|
|
|
+ @Update("update simulation_manual_project\n" +
|
|
|
+ "set task_completed = #{taskCompleted}\n" +
|
|
|
+ "where id = #{id}")
|
|
|
+ void updateTaskCompleted(@Param("id") String id, @Param("taskCompleted") int taskCompleted);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @Select("select id\n" +
|
|
|
+ "from simulation_manual_project\n" +
|
|
|
+ "where is_deleted = '0'\n" +
|
|
|
+ " and now_run_state = #{state}")
|
|
|
+ List<String> selectIdByState(@Param("state") String state);
|
|
|
+
|
|
|
+ @Select("select create_user_id\n" +
|
|
|
+ "from simulation_manual_project\n" +
|
|
|
+ "where id = #{id}")
|
|
|
+ void selectCreateUserById(@Param("id") String id);
|
|
|
+}
|