| | |
| | | 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{ |
| | | |
| | | public boolean add(Object obj); |
| | | @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); |
| | | |
| | | //编辑参数 |
| | | public boolean update(Object obj); |
| | | @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); |
| | | |
| | | public boolean del(Object obj); |
| | | @Delete("delete from db_param.tb_alarm_param where num=#{num}") |
| | | public int del(Alarm_param param); |
| | | |
| | | public List searchAll(); |
| | | @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 serchByCondition(Object obj); |
| | | public List<Alarm_param> serchByCondition(Alarm_param param, AlarmDaoFactory df); |
| | | |
| | | /*public static void main(String[] args) { |
| | | Alarm_paramImpl aimpl=new Alarm_paramImpl(); |
| | | Alarm_param ap=new Alarm_param(); |
| | | ap.setAlm_id(2); |
| | | List<Alarm_param> list=aimpl.serchByCondition(ap); |
| | | for (Alarm_param a : list) { |
| | | System.out.println(a); |
| | | } |
| | | }*/ |
| | | } |