Browse Source

费用字段修改后sql变更

liliang4869 7 years ago
parent
commit
3e56308264

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

@@ -2137,13 +2137,13 @@ select
  select name,picture_url as pictureUrl,id from demand d  where d.data_category=1  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,fund_for_personnel as fundForPersonnel,fund_for_crowd as fundForCrowd,demand_type as demandType,
+ 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
   </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,fund_for_personnel as fundForPersonnel,fund_for_crowd as fundForCrowd,demand_type as demandType,
+ 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
   </select>
@@ -2159,11 +2159,11 @@ select
  where d.demand_type=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,fund_for_crowd as fundForCrowd 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 from demand d  where d.demand_type=3  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,fund_for_personnel 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  order by  release_date  desc
   </select>
   
 </mapper>

+ 5 - 5
src/main/webapp/WEB-INF/views/portal/technologyTrading/demand.html

@@ -239,7 +239,7 @@
 							<div>
 								 <span class="problemDes" th:text="${u2.problemDes}"></span>	
 								 <span class="colorTime" th:if="${u2.validityPeriod}!=null" th:text="${#dates.format(u2.validityPeriod,'yyyy-MM-dd')+'到期'}"></span>
-								 <span class="colorOrange" th:if="${u2.demandType}==5" th:text="${'¥'+u2.fundForPersonnel}+'元/月'"></span>
+								 <span class="colorOrange" th:if="${u2.demandType}==5" th:text="${u2.fundForPersonnel}==null?'¥0元/月':${'¥'+u2.fundForPersonnel+'元/月'}"></span>
 								 <span class="colorOrange" th:if="${u2.demandType}==3" th:text="${'期望资金:¥'+u2.fundForCrowd}+'万'"></span>
 							</div>
 						</div>
@@ -259,7 +259,7 @@
 										class="talents" th:case='5' th:text="技术人才需求"></span>
 									<span th:text="${u3.name}"></span>	
 									<span class="colorOrange" th:if="${u3.demandType}==3" th:text="${u3.researchType}==0?'用途:研发':'用途:扩大再生产'"></span>
-									<span class="colorOrange" th:if="${u3.demandType}==5" th:text="${'¥'+u3.fundForPersonnel+'元/月'}"></span>
+									<span class="colorOrange" th:if="${u3.demandType}==5" th:text="${u3.fundForPersonnel}==null?'¥0.00元/月'${'¥'+u3.fundForPersonnel+'元/月'}"></span>
 									<span class="colorOrange" th:if="${u3.demandType}==3" th:text="${'期望资金:¥'+u3.fundForCrowd+'万'}"></span>
 
 								</div>
@@ -312,7 +312,7 @@
 							<div>
 							
 								 <span class="problemDes" th:text="${h2.problemDes}"></span>	
-								 <span class="colorOrange" th:if="${h2.demandType}==5" th:text="${'¥'+h2.fundForPersonnel}+'元/月'"></span>
+								 <span class="colorOrange" th:if="${h2.demandType}==5" th:text="${h2.fundForPersonnel}==null?'¥0.00元/月'${'¥'+h2.fundForPersonnel}+'元/月'"></span>
 								 <span class="colorOrange" th:if="${h2.demandType}==3" th:text="${'期望资金:¥'+h2.fundForCrowd}+'万'"></span>
 						
 								<span class="colorTime">	<img th:src="${portalHost+'/img/newMenu/demand-5.jpg'}" alt=""></span>
@@ -337,7 +337,7 @@
 									<span th:text="${h3.name}"></span>	
 							
 									<span class="colorOrange" th:if="${h3.demandType}==3" th:text="${h3.researchType}==0?'用途:研发':'用途:扩大再生产'"></span>
-											<span class="colorOrange" th:if="${h3.demandType}==5" th:text="${'¥'+h3.fundForPersonnel+'元/月'}"></span>
+											<span class="colorOrange" th:if="${h3.demandType}==5" th:text="${h3.fundForPersonnel}==null?'¥0.00元/月':${'¥'+h3.fundForPersonnel+'元/月'}"></span>
 									<span class="colorOrange" th:if="${h3.demandType}==3" th:text="${'期望资金:¥'+h3.fundForCrowd+'万'}"></span>
 								</div>
 							</p>
@@ -483,7 +483,7 @@
 						<div>
 							<h4 >
 							<span th:text="${personnelDemand.name}"></span>
-								 <span class="titleBorder">人才</span> <span class="money" th:text="${'¥'+personnelDemand.fundForPersonnel+'元/月'}"></span>
+								 <span class="titleBorder">人才</span> <span class="money" th:text="${personnelDemand.fundForPersonnel}==null?'¥0.00元/月':${'¥'+personnelDemand.fundForPersonnel+'元/月'}"></span>
 							</h4>
 							<p th:text="${personnelDemand.problemDes}"></p>
 							<span class="float-right">招募中</span>