2024-07-08 17:47:02 +08:00
|
|
|
package com.gunshi.project.xyt.mapper;
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
2024-07-19 15:59:32 +08:00
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
|
import com.gunshi.project.xyt.entity.so.GateValveCctvRelPage;
|
|
|
|
|
import com.gunshi.project.xyt.entity.vo.GateValveCctvRelVo;
|
2024-07-08 17:47:02 +08:00
|
|
|
import com.gunshi.project.xyt.model.GateValveCctvRel;
|
|
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
2024-07-19 15:59:32 +08:00
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
|
import org.apache.ibatis.annotations.Select;
|
2024-07-08 17:47:02 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 描述: 闸阀关联视频点
|
|
|
|
|
* author: xusan
|
|
|
|
|
* date: 2024-07-08 15:44:07
|
|
|
|
|
*/
|
|
|
|
|
@Mapper
|
|
|
|
|
public interface GateValveCctvRelMapper extends BaseMapper<GateValveCctvRel> {
|
|
|
|
|
|
2024-07-19 15:59:32 +08:00
|
|
|
@Select("""
|
|
|
|
|
<script>
|
|
|
|
|
select t.*,agv.valve_name,acb.id index_id,acb.name
|
|
|
|
|
from public.gate_valve_cctv_rel t
|
|
|
|
|
LEFT JOIN public.att_gate_valve agv ON t.valve_code = agv.valve_code
|
|
|
|
|
LEFT JOIN public.att_cctv_base acb ON t.index_code = acb.index_code
|
|
|
|
|
<where>
|
|
|
|
|
<if test="obj.valveName != null and obj.valveName !=''">
|
|
|
|
|
agv.valve_name LIKE concat('%',#{obj.valveName},'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="obj.indexName != null and obj.indexName !=''">
|
|
|
|
|
acb.name LIKE concat('%',#{obj.indexName},'%')
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
<if test="obj.sortField != null and obj.sortField !=''">
|
|
|
|
|
order by t.${obj.sortField} asc
|
|
|
|
|
</if>
|
|
|
|
|
</script>
|
|
|
|
|
""")
|
|
|
|
|
Page<GateValveCctvRelVo> pages(@Param("page") Page<GateValveCctvRel> page,@Param("obj") GateValveCctvRelPage obj);
|
2024-07-08 17:47:02 +08:00
|
|
|
}
|