12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?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.fdkankan.manage.mapper.IScenePlusMapper">
- <select id="getCountGroupByUserId" resultType="com.fdkankan.manage.vo.response.GroupByCount" >
- SELECT user_id as id, count(p.id) as count FROM t_scene_plus p
- <if test="isObj != null and isObj == 1">
- left join t_scene_plus_ext e on p.id = e.plus_id
- </if>
- WHERE p.rec_status = 'A'
- and p.user_id in
- <foreach item="userId" collection="userIdList" open="(" separator="," close=")">
- #{userId}
- </foreach>
- <if test="isObj != null and isObj == 0">
- and p.scene_source in (1,2,3,12,13,14)
- </if>
- <if test="isObj != null and isObj == 1">
- and e.is_obj = 1
- and p.scene_source = 4
- </if>
- GROUP BY p.user_id
- </select>
- <select id="getCountGroupByCameraId" resultType="com.fdkankan.manage.vo.response.GroupByCount">
- SELECT camera_id as id,count(id) as count FROM t_scene_plus WHERE rec_status = 'A' AND camera_id is not null
- and scene_source in (1,2,3,12,13,14)
- and camera_id in
- <foreach item="cameraId" collection="cameraIds" open="(" separator="," close=")">
- #{cameraId}
- </foreach>
- GROUP BY camera_id
- </select>
- <select id="shareScenePageList" resultType="com.fdkankan.manage.vo.response.UserShareSceneVo">
- select s.id,s.title,s.num,s.create_time,s.scene_status as status,s.scene_source,e.web_site,e.algorithm_time,ju.ry_no,ju.ry_nick_name
- from t_scene_plus s
- left join t_scene_plus_ext e on s.id = e.plus_id
- left join jy_user ju on s.user_id = ju.user_id
- where s.rec_status = 'A'
- <if test="param.jyUserId != null">
- and s.user_id = #{param.jyUserId}
- </if>
- <if test="param.numList != null and param.numList.size >0">
- and s.num in
- <foreach collection="param.numList" item="num" open="(" separator="," close=")">
- #{num}
- </foreach>
- </if>
- order by s.create_time desc ,s.id desc
- </select>
- </mapper>
|