42 lines
1.6 KiB
Java
42 lines
1.6 KiB
Java
package com.gunshi.project.xyt.mapper;
|
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.gunshi.project.xyt.entity.so.ImgWarnPageSo;
|
|
import com.gunshi.project.xyt.model.StImgWarnR;
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
|
/**
|
|
* 描述: AI告警表
|
|
* author: xusan
|
|
* date: 2024-07-08 15:44:08
|
|
*/
|
|
@Mapper
|
|
public interface StImgWarnRMapper extends BaseMapper<StImgWarnR> {
|
|
|
|
@Select("""
|
|
<script>
|
|
select t.*,s.name
|
|
from public.st_img_warn_r t
|
|
left join public.att_cctv_base s on t.index_code = s.index_code
|
|
<where>
|
|
<if test="obj.indexCode != null and obj.indexCode !=''">
|
|
t.index_code =#{obj.indexCode}
|
|
</if>
|
|
<if test="obj.type != null">
|
|
t.type =#{obj.type}
|
|
</if>
|
|
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
|
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
|
</if>
|
|
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
|
|
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
|
|
</if>
|
|
</where>
|
|
order by t.tm desc
|
|
</script>
|
|
""")
|
|
Page<StImgWarnR> pageQuery(Page<StImgWarnR> page,@Param("obj") ImgWarnPageSo imgWarnPageSo);
|
|
} |