EmergencyWarningInfoMapper.java 994 字节
package com.skua.modules.emergency.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.emergency.entity.EmergencyWarningInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 应急移动险情
 */
public interface EmergencyWarningInfoMapper extends BaseMapper<EmergencyWarningInfo> {
@Select("SELECT *,(CASE WHEN warning_level = '红色' THEN 4 WHEN warning_level = '橙色' THEN 3 WHEN warning_level = '黄色' THEN 2 WHEN warning_level = '蓝色' THEN 1 ELSE '' END ) dj FROM emergency_warning_info ${ew.customSqlSegment}")
    IPage<EmergencyWarningInfo> getPage(Page<EmergencyWarningInfo> page, @Param("ew") QueryWrapper<EmergencyWarningInfo> queryWrapper);
}