liliang4869 лет назад: 7
Родитель
Сommit
98d7bd5b78

+ 4 - 3
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -38,6 +38,7 @@ import com.goafanti.user.service.UserIdentityService;
 
 
 import com.goafanti.news.bo.NewsPortalList;
+import com.goafanti.news.bo.PolicyResult;
 import com.goafanti.news.enums.NewsType;
 import com.goafanti.news.service.NewsService;
 import com.goafanti.news.service.PolicyService;
@@ -275,7 +276,7 @@ public class WebpageController extends BaseController {
 		modelview.setViewName("/portal/service/serviceIndex");
 		//政策
 //		List<PolicyEntity>policyEntities=achievementService.getIntellectualProperty(8);
-		List<Policy>policies=(List<Policy>) policyService.searchPolicy(null, null, null, null, "web_tech_service_index", 1, 8).getList();
+		List<PolicyResult>policies=(List<PolicyResult>) policyService.searchPolicy(null, null, null, null, "web_tech_service_index", 1, 8).getList();
 		modelview.addObject("policyList",policies); 
 		//新闻
 		List<News>news=(List<News>) newsService.portalNewsList(5, 1, null, null, null, null).getList();
@@ -519,7 +520,7 @@ public class WebpageController extends BaseController {
 		modelview.addObject("achievements",achievementObjects);
 //		List<PolicyEntity> policyEntities=achievementService.getIntellectualProperty(4);
 		@SuppressWarnings("unchecked")
-		List<Policy>policies=(List<Policy>) policyService.searchPolicy("", null, null, null, "web_index", 1, 4).getList();
+		List<PolicyResult>policies=(List<PolicyResult>) policyService.searchPolicy("", null, null, null, "web_index", 1, 4).getList();
 		modelview.addObject("policys",policies);
 		List<DemandListBo> demandListBos=demandService.getHotDemand(9, url, "web_index");
 		for(DemandListBo demandListBo:demandListBos) {
@@ -677,7 +678,7 @@ public class WebpageController extends BaseController {
 		modelview.addObject("practicalTechnology",practicalTechnology); 
 		
 //		List<PolicyEntity>intellectualPropertyPolicyList=achievementService.getIntellectualProperty(5);
-		List<Policy> policies=(List<Policy>) policyService.searchPolicy("", null, null, null, "web_index", 1, 5).getList();
+		List<PolicyResult> policies=(List<PolicyResult>) policyService.searchPolicy("", null, null, null, "web_index", 1, 5).getList();
 		modelview.addObject("policyList",policies);
 		return modelview;
 	}

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

@@ -97,7 +97,7 @@
       employer_address, employer_contacts, employer_contacts_mobile, 
       employer_contacts_mailbox, contacts, status, 
       release_status, release_date, create_time, 
-      principal_id, deleted_sign, audit_status, tech_broker_id,boutique,remark,urgent_days,urgent_money,contact_mobile)
+      principal_id, deleted_sign, audit_status, tech_broker_id,boutique,remark,urgent_days,urgent_money,contact_mobile,crowd_cost)
     values (#{id,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, #{dataCategory,jdbcType=INTEGER}, 
       #{name,jdbcType=VARCHAR}, #{keyword,jdbcType=VARCHAR}, #{infoSources,jdbcType=INTEGER}, 
       #{industryCategoryA,jdbcType=INTEGER}, #{industryCategoryB,jdbcType=INTEGER}, #{industryCategoryC,jdbcType=INTEGER}, 
@@ -110,7 +110,7 @@
       #{employerContactsMailbox,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, 
       #{releaseStatus,jdbcType=INTEGER}, #{releaseDate,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, 
       #{principalId,jdbcType=VARCHAR}, #{deletedSign,jdbcType=INTEGER}, #{auditStatus,jdbcType=INTEGER},
-      #{techBrokerId,jdbcType=VARCHAR},#{boutique,jdbcType=INTEGER},#{remark,jdbcType=VARCHAR},#{urgentDays,jdbcType=VARCHAR},#{urgentMoney,jdbcType=VARCHAR},#{contactMobile,jdbcType=VARCHAR})
+      #{techBrokerId,jdbcType=VARCHAR},#{boutique,jdbcType=INTEGER},#{remark,jdbcType=VARCHAR},#{urgentDays,jdbcType=VARCHAR},#{urgentMoney,jdbcType=VARCHAR},#{contactMobile,jdbcType=VARCHAR},#{crowdCost,jdbcType=DECIMAL})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.Demand" >
     insert into demand
@@ -485,6 +485,9 @@
       <if test="researchType != null">
       	research_type = #{researchType,jdbcType=VARCHAR},
       </if>
+      <if test="crowdCost!=null">
+      crowd_cost=#{crowdCost,jdbcType=DECIMAL}
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>

+ 6 - 2
src/main/java/com/goafanti/common/mapper/PolicyMapper.xml

@@ -543,7 +543,7 @@
       release_date = #{releaseDate,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=BIGINT}
   </update>
-  <select id="findPolicyByPageAndPublishPages" resultType="com.goafanti.common.model.Policy">
+  <select id="findPolicyByPageAndPublishPages" resultType="com.goafanti.news.bo.PolicyResult">
   select 
   p.title,
   p.author,
@@ -551,8 +551,12 @@
   p.id,
   p.source,
   p.release_date as releaseDate,
-  p.title_img as titleImg 
+  p.title_img as titleImg ,
+  dg.name as provinceS,
+  dgg.name as cityS
   from policy p
+  left join district_glossory dg on dg.name =p.province
+  left join district_glossory dgg on dgg.name=p.city
   <if test="publishPage!=null">
   left join policy_publish pp on pp.policy_id=p.id
   </if>

+ 2 - 1
src/main/java/com/goafanti/news/bo/PolicyResult.java

@@ -6,7 +6,8 @@ import com.goafanti.common.model.Policy;
 
 public class PolicyResult extends Policy {
 List<String>publishPages;
-
+public String provinceS;
+public String cityS;
 public List<String> getPublishPages() {
 	return publishPages;
 }

+ 2 - 2
src/main/java/com/goafanti/news/service/PolicyService.java

@@ -127,7 +127,7 @@ return 	-1;
 }
 
 @SuppressWarnings("unchecked")
-public Pagination<Policy>searchPolicy(String title,Integer auditStatus,String startReleaseDate,String endReleaseDate,String publishPage,Integer pageNo,Integer pageSize){
+public Pagination<PolicyResult>searchPolicy(String title,Integer auditStatus,String startReleaseDate,String endReleaseDate,String publishPage,Integer pageNo,Integer pageSize){
 	Map<String, Object> params = new HashMap<>();
 	if(title!=null)params.put("title", title);
 	if(auditStatus!=null &&auditStatus>=0 && auditStatus<=4)params.put("auditStatus", auditStatus);
@@ -136,6 +136,6 @@ public Pagination<Policy>searchPolicy(String title,Integer auditStatus,String st
 	}
 	if(endReleaseDate!=null)params.put("endDate", endReleaseDate); 
 	if(publishPage!=null)params.put("publishPage", publishPage);
-	return (Pagination<Policy>) findPage("findPolicyByPageAndPublishPages","findPolicyCountByPageAndPublishPages",params, pageNo, pageSize); 
+	return (Pagination<PolicyResult>) findPage("findPolicyByPageAndPublishPages","findPolicyCountByPageAndPublishPages",params, pageNo, pageSize); 
 }
 }