AlarmCustomRuleConfigMapper.java
1.4 KB
package com.skua.modules.alarmtmp.mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.skua.modules.alarmtmp.entity.AlarmCustomRuleConfig;
import com.skua.modules.alarmtmp.vo.AlarmCustomRuleConfigVO;
/**
* 报警方案库
*/
public interface AlarmCustomRuleConfigMapper extends BaseMapper<AlarmCustomRuleConfig> {
@Select("SELECT " +
" a.*, b.alarm_rule_level_name,c.alarm_template_name,d.alarm_index_show_tag " +
"FROM " +
" alarm_custom_rule_config a\r\n" +
"LEFT JOIN alarm_rule_level_config b ON a.id = b.alarm_rule_id " +
"LEFT JOIN alarm_rule_level_config_template c ON (b.alarm_rule_level_name = c.alarm_template_level_name " +
" and b.sort=c.sort and b.template_type = c.alarm_template_type and b.depart_id = c.depart_id) " +
"LEFT JOIN alarm_custom_rule_repository d ON a.alarm_rule_repository_id = d.id " +
"${ew.customSqlSegment}")
IPage<AlarmCustomRuleConfigVO> getPage(Page<AlarmCustomRuleConfigVO> page,@Param(Constants.WRAPPER)QueryWrapper<AlarmCustomRuleConfigVO> queryWrapper);
}