whycrzg
2021-05-25 f8c76658270e6c009b766c78091db089fc426d3c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package com.whyc.mapper;
 
 
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;
 
import java.util.List;
 
public interface ExperimentWindingStep1Mapper extends CustomMapper<ExperimentWindingStep1>{
    int deleteByPrimaryKey(Integer id);
 
    int insertSelective(ExperimentWindingStep1 record);
 
    ExperimentWindingStep1 selectByPrimaryKey(Integer id);
 
    int updateByPrimaryKeySelective(ExperimentWindingStep1 record);
 
    int updateByPrimaryKey(ExperimentWindingStep1 record);
 
    int delExperimentWindingbyId(String experimentId);
 
    //根据experiment_id编辑试验数据
    int updateById(ExperimentWindingStep1 windingStep1);
 
    int updateByIdandIndex(ExperimentWindingStep1 windingStep1);
 
    //根据试验ID查询到uid在tb_user表查询real_name
    String getRealName(String experimentId);
 
    List<ExperimentWindingStep1> selectlistByCondition(@Param(value = "rzLink") int rzLink,@Param(value = "step")  int step);
 
    //完成试验
    int updateRzFlag(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);
}