| | |
| | | <resultMap type="ProjectCamera" id="ProjectCameraResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="projectId" column="project_id" /> |
| | | <result property="projectName" column="project_name" /> |
| | | <result property="projectCode" column="project_code" /> |
| | | <result property="name" column="name" /> |
| | | <result property="code" column="code" /> |
| | | <result property="lng" column="lng" /> |
| | |
| | | <include refid="selectProjectCameraVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | |
| | | <select id ="count" resultType="Integer"> |
| | | select count(*) from js_project_camera |
| | | </select> |
| | | |
| | | <select id="selectCameraDataOnLine" resultMap="ProjectCameraResult"> |
| | | SELECT |
| | | a.id, |
| | | a.project_id, |
| | | b.full_name AS project_name, |
| | | b.`code` AS project_code, |
| | | a.NAME, |
| | | a.CODE, |
| | | a.lng, |
| | | a.lat, |
| | | a.ip, |
| | | a.create_by, |
| | | a.create_time |
| | | FROM |
| | | js_project_camera a |
| | | LEFT JOIN js_project b ON a.project_id = b.ids GROUP BY a.project_id; |
| | | </select> |
| | | |
| | | <insert id="insertProjectCamera" parameterType="ProjectCamera"> |
| | | insert into js_project_camera |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | |
| | | delete from js_project_camera where id = #{id} |
| | | </delete> |
| | | |
| | | |
| | | <delete id="deleteProjectCameraByIds" parameterType="String"> |
| | | delete from js_project_camera where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |