|
|
@@ -576,7 +576,7 @@
|
|
|
from jt_business_project jtbp left join `user` u on jtbp.owner_id=u.id
|
|
|
left join jt_business_category jtbc on jtbc.id = jtbp.category_id
|
|
|
left join (select project_id,count(*) as count from project_interest group by project_id) p on jtbp.id=p.project_id
|
|
|
- left join (select project_id from project_interest where uid= #{uid,jdbcType=VARCHAR} ) x on jtbp.id=x.project_id
|
|
|
+ left join (select project_id from project_interest <if test="uid != null"> where uid= #{uid,jdbcType=VARCHAR} </if>) x on jtbp.id=x.project_id
|
|
|
where jtbp.id = #{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
|
|
|
@@ -839,4 +839,39 @@
|
|
|
and b.module = 5
|
|
|
</if>
|
|
|
</select>
|
|
|
+
|
|
|
+ <!-- 查看科技服务项目 -->
|
|
|
+ <select id="getKJListByIds" resultType="com.goafanti.common.model.JtBusinessProject">
|
|
|
+ select
|
|
|
+ p.id,
|
|
|
+ p.name,
|
|
|
+ p.introduce,
|
|
|
+ p.min_img_url as minImgUrl
|
|
|
+ from jt_business_project p
|
|
|
+ left join jt_business_category c on p.category_id = c.id
|
|
|
+ where c.module = #{module}
|
|
|
+ and p.audit_status = 2
|
|
|
+ <if test="isHot">
|
|
|
+ and is_hot = #{isHot}
|
|
|
+ </if>
|
|
|
+ order by release_date desc
|
|
|
+ limit #{size}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 根据二级分类名称查 -->
|
|
|
+ <select id="getModuleByName" resultType="com.goafanti.common.model.JtBusinessProject">
|
|
|
+ select b.id,
|
|
|
+ b.name,
|
|
|
+ b.introduce,
|
|
|
+ b.min_img_url as minImgUrl
|
|
|
+ from (select x.id from jt_business_category x inner join jt_business_category y on x.super_id = y.id where y.name=#{name})a
|
|
|
+ left join jt_business_project b on a.id = b.category_id
|
|
|
+ where
|
|
|
+ b.audit_status = 2
|
|
|
+ <if test="isHot">
|
|
|
+ and is_hot = #{isHot}
|
|
|
+ </if>
|
|
|
+ order by b.release_date desc
|
|
|
+ limit #{size}
|
|
|
+ </select>
|
|
|
</mapper>
|