|
@@ -28,16 +28,13 @@
|
|
|
ORDER BY create_time desc
|
|
|
|
|
|
</select>
|
|
|
- <select id="getCountByUserId" resultType="java.lang.Long">
|
|
|
- select count(*) from t_scene_plus s left join t_camera_detail d on s.camera_id = d.camera_id
|
|
|
- where s.rec_status = 'A'
|
|
|
- and s.user_id = #{userId} and d.goods_id = #{cameraType}
|
|
|
- </select>
|
|
|
-
|
|
|
|
|
|
<sql id="sceneJoinCamera">
|
|
|
LEFT JOIN t_camera c on p.camera_id = c.id
|
|
|
LEFT JOIN t_user u on p.user_id = u.id
|
|
|
+ <if test= 'param.cameraType != null' >
|
|
|
+ join `t_camera_detail` tcd on p.camera_id = tcd.camera_id and tcd.goods_id = #{param.cameraType}
|
|
|
+ </if>
|
|
|
</sql>
|
|
|
|
|
|
<sql id="commonWhere">
|
|
@@ -58,4 +55,11 @@
|
|
|
</if>
|
|
|
</sql>
|
|
|
|
|
|
+
|
|
|
+ <select id="getCountByUserId" resultType="java.lang.Long">
|
|
|
+ select count(*) from t_scene_plus s left join t_camera_detail d on s.camera_id = d.camera_id
|
|
|
+ where s.rec_status = 'A'
|
|
|
+ and s.user_id = #{userId} and d.goods_id = #{cameraType}
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|