whycrzg
2021-05-24 d37b9406aa079d1497bcbfe519cec7d34574f892
src/main/java/com/whyc/mapper/ExperimentWindingStep1Mapper.java
@@ -3,6 +3,7 @@
import com.whyc.pojo.Experiment;
import com.whyc.pojo.ExperimentWindingStep1;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.junit.runners.Parameterized;
@@ -35,4 +36,21 @@
    //完成试验
    @Update("update `db_3.5mw_web`.`tb_experiment_winding_step1` set status =2 where experiment_id=#{id} ")
    int updateFlag(String id);
    //根据 uuid 删除试验数据
    @Delete(" delete from tb_experiment_winding_step1 where experiment_id=#{experimentId} and uuid = #{uuid}")
    int delExperimentWindingbyUuid(String experimentId, String uuid);
    //根据 uuid 编辑试验数据
    @Update("    update `db_3.5mw_web`.tb_experiment_winding_step1\n" +
            "    set\n" +
            "    electric_current = #{electricCurrent},\n" +
            "    vol = #{vol},\n" +
            "    resistance = #{resistance},\n" +
            "    save_time = #{saveTime},\n" +
            "    temperature = #{temperature}\n" +
            "    WHERE\n" +
            "    index_id = #{indexId} AND\n" +
            "    uuid = #{uuid}")
    int updateByUuidAndIndex(ExperimentWindingStep1 windingStep1);
}