Переглянути джерело

申请页面知产百科查询只按类型查,去掉新增新闻必须有发布位置的限制,新闻显示文字限制,文字修改 运用和申请 上传者的跳转

limin 7 роки тому
батько
коміт
4778282e21

+ 1 - 3
src/main/java/com/goafanti/business/bo/JtBusinessProjectResult.java

@@ -17,6 +17,7 @@ public class JtBusinessProjectResult extends JtBusinessProject {
 	private Integer interested;
 	
 	
+	
 	public String getOwnerName() {
 		return ownerName;
 	}
@@ -115,7 +116,4 @@ public void setCompanyId(String companyId) {
 	public void setInterested(Integer interested) {
 		this.interested = interested;
 	}
-
-	
-	
 }

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

@@ -5,14 +5,17 @@ import java.util.Arrays;
 import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
+
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
+
 import org.apache.commons.lang3.time.DateFormatUtils;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
+
 import com.goafanti.achievement.service.AchievementInterestService;
 import com.goafanti.achievement.service.AchievementService;
 import com.goafanti.app.bo.ExpertsListBo;
@@ -36,6 +39,7 @@ import com.goafanti.common.model.JtBusinessProject;
 import com.goafanti.common.model.News;
 import com.goafanti.common.model.Policy;
 import com.goafanti.common.model.User;
+import com.goafanti.common.model.UserIdentity;
 import com.goafanti.common.service.GlobalSearchService;
 import com.goafanti.common.utils.LimitLengthUtil;
 import com.goafanti.common.utils.StringUtils;
@@ -498,7 +502,16 @@ public class WebpageController extends BaseController {
 			}
 		}
 		modelview.addObject("owner", owner);
-		modelview.addObject("pj", jtBusinessProject);
+		modelview.addObject("pj", jtBusinessProject);
+		
+		//判断是否是个人还是组织
+		if(null != jtBusinessProject.getType() && 0 == jtBusinessProject.getType()){//个人
+			UserIdentity uide =  userIdentityService.selectUserIdentityByUserId(jtBusinessProject.getOwnerId());
+			modelview.addObject("uide", uide);
+		}else if(null != jtBusinessProject.getType() && 1 == jtBusinessProject.getType()){//企业
+			String oide = organizationIdentityService.selectOrgIdentityBoByUserId(jtBusinessProject.getOwnerId()).getUid();
+			modelview.addObject("oide", oide);
+		}
 		//System.out.println(jtBusinessProject.toString());
 		if (jtBusinessProject != null) {
 			JtBusinessCategoryTree tree = jtBusinessService.getCategoryTree(jtBusinessProject.getCategoryId());
@@ -545,7 +558,15 @@ public class WebpageController extends BaseController {
 			}
 		}
 		modelview.addObject("owner", owner);
-		modelview.addObject("pj", jtBusinessProject);
+		modelview.addObject("pj", jtBusinessProject);
+		//判断是否是个人还是组织
+		if(0 == jtBusinessProject.getType()){//个人
+			UserIdentity uide =  userIdentityService.selectUserIdentityByUserId(jtBusinessProject.getOwnerId());
+			modelview.addObject("uide", uide);
+		}else if(1 == jtBusinessProject.getType()){//企业
+			String oide =  organizationIdentityService.selectOrgIdentityBoByUserId(jtBusinessProject.getOwnerId()).getUid();
+			modelview.addObject("oide", oide);
+		}
 		//System.out.println(jtBusinessProject.toString());
 		if (jtBusinessProject != null) {
 			JtBusinessCategoryTree tree = jtBusinessService.getCategoryTree(jtBusinessProject.getCategoryId());
@@ -1106,7 +1127,7 @@ public class WebpageController extends BaseController {
 		
 		// 知产百科
 		List<News> news = (List<News>) newsService
-				.listNews(98, null, null, null, null, null, null, 1, 4, 2 + "", null, "web_tech_service_index",null)
+				.listNews(98, null, null, null, null, null, null, 1, 4, 2 + "", null, null,null)
 				.getList();
 		for (News n : news) {
 			if (null != n.getTitleImg() && n.getTitleImg().contains(",")) {

+ 3 - 1
src/main/java/com/goafanti/common/mapper/JtBusinessProjectMapper.xml

@@ -588,6 +588,7 @@
         jtbp.activity_flag as activityFlag, u.nickname as ownerName,ifnull(p.count,0) as interestCount,if(isnull(x.project_id),0,1) as interested,jtbp.keyword,
     jtbp.introduce, jtbp.province, jtbp.city, jtbp.create_time as createTime, jtbp.min_img_url as minImgUrl, jtbp.max_img_url as maxImgUrl, jtbp.value, jtbp.apply_conditions as applyConditions, 
     jtbp.owner_id as ownerId, jtbp.is_hot as isHot, jtbp.audit_status as auditStatus, jtbp.audit_info as auditInfo, jtbp.release_date as releaseDate,jtbc.module as module,jtbp.advertisement
+    ,u.`type` as type
     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
@@ -638,7 +639,8 @@
 	  jtbp.advertisement,
 	  ifnull(dct.dealCount,0) as dealCount,
 	  ifnull(x.count,0) as interestCount,
-	  u.nickname as companyName,u.id as companyId
+	  u.nickname as companyName,u.id as companyId,
+	  u.`type` as type
   from jt_business_project jtbp
   left join user u on u.id=jtbp.owner_id
   left join (select project_id as id,count(*) as count from project_interest group by project_id)x on jtbp.id=x.id

+ 11 - 0
src/main/java/com/goafanti/common/model/JtBusinessProject.java

@@ -125,6 +125,7 @@ public class JtBusinessProject {
 	
 	private String keyword;
 
+	private Integer type;
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column jt_business_project.id
 	 * @return  the value of jt_business_project.id
@@ -554,4 +555,14 @@ public class JtBusinessProject {
 	public void setKeyword(String keyword) {
 		this.keyword = keyword;
 	}
+	
+
+	public Integer getType() {
+		return type;
+	}
+
+	public void setType(Integer type) {
+		this.type = type;
+	}
+	
 }

+ 2 - 2
src/main/java/com/goafanti/news/controller/AdminNewsApiController.java

@@ -185,11 +185,11 @@ public Result apply(InputNews news,BindingResult bindingResult,String[] publishP
 		
 		
 	private void checkApplyParams(InputNews news, List<String>webPages,List<String>appPages, Result result) {
-	if(webPages.size()<1 && appPages.size()<1)
+	/*if(webPages.size()<1 && appPages.size()<1)
 	{
 		result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","发布位置"));
 		return;
-	}
+	}*/
 	if(news ==null || StringUtils.isBlank(news.getTitle())) {
 		result.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","标题"));
 		return;

+ 2 - 2
src/main/webapp/WEB-INF/views/portal/index.html

@@ -241,7 +241,7 @@
 							</div>
 							<div class="newTxt">
 								<h5 th:text="${#strings.abbreviate(p.title,18)}"></h5>
-								<p th:text="${#strings.abbreviate(p.summary,50)}"></p>
+								<p th:text="${#strings.abbreviate(p.summary,65)}"></p>
 							</div>
 						</a>
 					</li>
@@ -261,7 +261,7 @@
 							</div>
 							<div class="newTxt">
 								<h5 th:text="${#strings.abbreviate(n.title,18)}">加奖金哦违法爱按金额积分经济积分经济积分经济if啊积分经济交往和居委会看看哇卡哇卡...</h5>
-								<p th:text="${#strings.abbreviate(n.summary,50)}">哈哈哈哈海鸥科技打飞机附近的啊我的㘝技打飞机附近的啊我的技打飞机附近的啊我的技打飞机附近的啊我的技打飞机附近的啊我的酒店设计大姐姐 但是大家觉得结算单基督教圣诞节ajd...</p>
+								<p th:text="${#strings.abbreviate(n.summary,65)}">哈哈哈哈海鸥科技打飞机附近的啊我的㘝技打飞机附近的啊我的技打飞机附近的啊我的技打飞机附近的啊我的技打飞机附近的啊我的酒店设计大姐姐 但是大家觉得结算单基督教圣诞节ajd...</p>
 							</div>
 						</a>
 					</li>

Різницю між файлами не показано, бо вона завелика
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/patenteDetails.html


Різницю між файлами не показано, бо вона завелика
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/serviceDetails.html


+ 1 - 1
src/main/webapp/WEB-INF/views/portal/technologyTrading/achievement.html

@@ -9,7 +9,7 @@
 </head>
 
 <body>
-   <div th:replace="common::nav('','trading')"></div>
+   <div th:replace="common::nav('','')"></div>
     <!-- search -->
     <div class="container">
         

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

@@ -10,7 +10,7 @@
 
 <body>
 
-		<div th:replace="common::nav('','trading')"></div>
+		<div th:replace="common::nav('','')"></div>
 	<!-- search -->
 	<div class="container">
 		<div class="clearFix search">