瀏覽代碼

科技需求首页只展示已发布的需求

liliang4869 7 年之前
父節點
當前提交
520ed35628
共有 1 個文件被更改,包括 8 次插入8 次删除
  1. 8 8
      src/main/java/com/goafanti/common/mapper/DemandMapper.xml

+ 8 - 8
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -2130,40 +2130,40 @@ select
   
   </select>
   <select id="selectRecentDemand" resultType="com.goafanti.demand.bo.DemandListBo">
- select name,employer_name as employerName,id ,release_date as releaseDate,demand_type as demandType from demand order by  release_date  desc LIMIT 5 
+ select name,employer_name as employerName,id ,release_date as releaseDate,demand_type as demandType from demand where audit_status=2 order by  release_date  desc LIMIT 5 
   </select>
   
     <select id="selectCompanyDemand" resultType="com.goafanti.demand.bo.DemandListBo">
- select name,picture_url as pictureUrl,id from demand d  where d.data_category=1  order by  release_date  desc
+ select name,picture_url as pictureUrl,id from demand d  where d.data_category=1 and d.audit_status=2  order by  release_date  desc
   </select>
    <select id="getUrgentDemand" resultType="com.goafanti.demand.bo.DemandListBo">
  select name,release_date as releaseDate,id,problem_des as problemDes,research_type as researchType,budget_cost as fundForPersonnel,crowd_cost as fundForCrowd,demand_type as demandType,
  validity_period as validityPeriod
-  from demand d  where d.is_urgent=1  order by  release_date  desc
+  from demand d  where d.is_urgent=1 and d.audit_status=2 order by  release_date  desc
   </select>
   
   <select id="getHotDemand" resultType="com.goafanti.demand.bo.DemandListBo">
  select name,release_date as releaseDate,id,problem_des as problemDes,research_type as researchType,budget_cost as fundForPersonnel,crowd_cost as fundForCrowd,demand_type as demandType,
  validity_period as validityPeriod
-  from demand d  where d.is_hot=1  order by  release_date  desc
+  from demand d  where d.is_hot=1 and d.audit_status=2 order by  release_date  desc
   </select>
   
    <select id="getAreaDemand" resultType="com.goafanti.demand.bo.DemandListBo">
- select name,picture_url as pictureUrl ,problem_des as problemDes ,id from demand d  where d.demand_type=4  order by  release_date  desc
+ select name,picture_url as pictureUrl ,problem_des as problemDes ,id from demand d  where d.demand_type=4 and d.audit_status=2 order by  release_date  desc
   </select>
   
      <select id="getProLearnStudyDemand" resultType="com.goafanti.demand.bo.DemandListBo">
     select d.name as name,picture_url as pictureUrl ,problem_des as problemDes,employer_name as employerName,d.id,fg.name as industryCategory1,fgg.name as industryCategory2 from demand d  
     left join aft.field_glossory  fg  on fg.id=d.industry_category_a
     left join aft.field_glossory fgg  on fgg.id=d.industry_category_b
- where d.demand_type=2  order by  release_date  desc
+ where d.demand_type=2 and d.audit_status=2 order by  release_date  desc
   </select>
    <select id="getFundCrowdDemand" resultType="com.goafanti.demand.bo.DemandListBo">
-  select name,picture_url as pictureUrl ,problem_des as problemDes ,id,crowd_cost as fundForCrowd,research_type as researchType from demand d  where d.demand_type=3  order by  release_date  desc
+  select name,picture_url as pictureUrl ,problem_des as problemDes ,id,crowd_cost as fundForCrowd,research_type as researchType from demand d  where d.demand_type=3 and d.audit_status=2  order by  release_date  desc
   </select>
   
    <select id="getPersonnelDemand" resultType="com.goafanti.demand.bo.DemandListBo">
-  select name,picture_url as pictureUrl ,problem_des as problemDes ,id,budget_cost as fundForPersonnel from demand d  where d.demand_type=5  order by  release_date  desc
+  select name,picture_url as pictureUrl ,problem_des as problemDes ,id,budget_cost as fundForPersonnel from demand d  where d.demand_type=5 and d.audit_status=2 order by  release_date  desc
   </select>
   
 </mapper>