whycrzg
2021-02-23 351b9a53cb9ecebdf8f79db0117f540d9c42c2a4
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
package com.fgkj.mapper.impl;
 
import com.fgkj.dto.Alarm_param;
import com.fgkj.mapper.AlarmDaoFactory;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
 
import java.util.List;
 
public interface Alarm_paramMapper{
 
    @Insert("insert into db_param.tb_alarm_param"+
            "(alm_id,alm_name,alm_high_coe,alm_low_coe,alm_high_level,alm_low_level,alm_high_en,alm_low_en) "+
            "values(#{alm_id},#{alm_name},#{alm_high_coe},#{alm_low_coe},#{alm_high_level},#{alm_low_level},#{alm_high_en},#{alm_low_en})")
    public int add(Alarm_param param);
 
   //编辑参数
    @Update("update db_param.tb_alarm_param "+
            "set alm_high_coe=#{alm_high_coe},alm_low_coe=#{alm_low_coe},alm_high_level=#{alm_high_level},alm_low_level=#{alm_low_level},"+
            "alm_high_en=#{alm_high_en},alm_low_en=#{alm_low_en} where alm_id=#{alm_id} ")
    public int update(Alarm_param param);
 
    @Delete("delete from db_param.tb_alarm_param where num=#{num}")
    public int del(Alarm_param param);
 
    @Select("select num,alm_id,alm_name,alm_high_coe,alm_low_coe,alm_high_level,alm_low_level,alm_high_en,alm_low_en  from db_param.tb_alarm_param " )
    public List<Alarm_param> searchAll();
 
    //7.1根据告警类型查告警参数
    public List<Alarm_param> serchByCondition(Alarm_param param, AlarmDaoFactory df);
 
}