<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ozs.service.mapper.BaseDeviceDynamicManagementMapper">

    <select id="list" resultType="com.ozs.service.entity.vo.BaseCameraManagementDto">
		SELECT
			l.line_code AS lineCode, 
			l.line_name AS lineName, 
			a.camera_code AS cameraCode, 
			a.line_type AS lineType, 
			a.install_mile AS installMile, 
			a.account_management_id AS id, 
			a.line
		FROM
			base_account_management AS a left join  
			base_line_management AS l  on  a.line=l.line_code
		<where>

			<if test="name != null and name !=''">
				concat(l.line_name,a.camera_code)
				like concat("%",#{name},"%")
			</if>
			
		</where>
			
    </select>
</mapper>
