|
@@ -253,6 +253,46 @@
|
|
where jhs.del_flag = 0 and jhs.type = 2 and jhs.id = #{id}
|
|
where jhs.del_flag = 0 and jhs.type = 2 and jhs.id = #{id}
|
|
GROUP BY jhs.id
|
|
GROUP BY jhs.id
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
|
|
+ <select id="getInquiry" resultType="com.sooka.jnb.highServer.vo.JnbHighServerVO">
|
|
|
|
+ SELECT jhs.id,
|
|
|
|
+ title_name,
|
|
|
|
+ text_details,
|
|
|
|
+ jhs.type as type,
|
|
|
|
+ jhs.create_by,
|
|
|
|
+ jhs.create_time,
|
|
|
|
+ jhs.update_by,
|
|
|
|
+ jhs.update_time,
|
|
|
|
+ GROUP_CONCAT(jhsi.id) AS imgId,
|
|
|
|
+ GROUP_CONCAT(jhsi.img_url) AS imgUrlList,
|
|
|
|
+ jhs.like_num,
|
|
|
|
+ jhs.watch_num
|
|
|
|
+ FROM jnb_high_server jhs
|
|
|
|
+ left JOIN jnb_high_server_img jhsi ON jhs.id = jhsi.server_id and jhs.type = jhsi.type and jhsi.del_flag = 0
|
|
|
|
+ where jhs.del_flag = 0 and jhs.type = 3
|
|
|
|
+ GROUP BY jhs.id
|
|
|
|
+ order by create_time,watch_num,like_num desc
|
|
|
|
+ </select>
|
|
|
|
+ <select id="inquiryDetails" resultType="com.sooka.jnb.highServer.vo.JnbHighServerVO">
|
|
|
|
+ SELECT jhs.id,
|
|
|
|
+ title_name,
|
|
|
|
+ text_details,
|
|
|
|
+ jhs.type as type,
|
|
|
|
+ jhs.create_by,
|
|
|
|
+ jhs.create_time,
|
|
|
|
+ jhs.update_by,
|
|
|
|
+ jhs.update_time,
|
|
|
|
+ GROUP_CONCAT(jhsi.id) AS imgId,
|
|
|
|
+ GROUP_CONCAT(jhsi.img_url) AS imgUrlList,
|
|
|
|
+ jhs.like_num,
|
|
|
|
+ jhs.watch_num
|
|
|
|
+ FROM jnb_high_server jhs
|
|
|
|
+ left JOIN jnb_high_server_img jhsi ON jhs.id = jhsi.server_id and jhs.type = jhsi.type and jhsi.del_flag = 0
|
|
|
|
+ where jhs.del_flag = 0 and jhs.type = 3 and jhs.id = #{id}
|
|
|
|
+ GROUP BY jhs.id
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+
|
|
<update id="updateLikeNumber">
|
|
<update id="updateLikeNumber">
|
|
update jnb_high_server set like_num = like_num + 1 where id = #{id} and type = #{type}
|
|
update jnb_high_server set like_num = like_num + 1 where id = #{id} and type = #{type}
|
|
</update>
|
|
</update>
|