Browse Source

修改关键字搜索 页面一些调整

limin 7 years ago
parent
commit
d90bad44c3
34 changed files with 127 additions and 46 deletions
  1. 5 0
      src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java
  2. 5 0
      src/main/java/com/goafanti/business/service/impl/JtBusinessServiceImpl.java
  3. 21 5
      src/main/java/com/goafanti/common/mapper/JtCollectSearchMapper.xml
  4. 1 1
      src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml
  5. 12 0
      src/main/java/com/goafanti/common/model/JtCollectSearch.java
  6. 10 0
      src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java
  7. 5 0
      src/main/java/com/goafanti/news/service/NewsService.java
  8. 5 0
      src/main/java/com/goafanti/news/service/PolicyService.java
  9. 1 1
      src/main/java/com/goafanti/user/bo/InputOrganizationIdentity.java
  10. 5 0
      src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java
  11. 4 4
      src/main/webapp/WEB-INF/views/common.html
  12. 2 2
      src/main/webapp/WEB-INF/views/portal/adviser.html
  13. 4 2
      src/main/webapp/WEB-INF/views/portal/adviser/adviserDetail.html
  14. 4 2
      src/main/webapp/WEB-INF/views/portal/adviser/adviserList.html
  15. 1 1
      src/main/webapp/WEB-INF/views/portal/companyProfile.html
  16. 1 1
      src/main/webapp/WEB-INF/views/portal/continueHigh.html
  17. 1 1
      src/main/webapp/WEB-INF/views/portal/evaluation/evaluate.html
  18. 4 4
      src/main/webapp/WEB-INF/views/portal/indexOld.html
  19. 1 1
      src/main/webapp/WEB-INF/views/portal/militaryProject.html
  20. 1 1
      src/main/webapp/WEB-INF/views/portal/news/newsDetailApp.html
  21. 1 1
      src/main/webapp/WEB-INF/views/portal/practicalPatent.html
  22. 17 4
      src/main/webapp/WEB-INF/views/portal/search.html
  23. 1 1
      src/main/webapp/WEB-INF/views/portal/service/patent.html
  24. 1 1
      src/main/webapp/WEB-INF/views/portal/service/patentList.html
  25. 1 1
      src/main/webapp/WEB-INF/views/portal/service/patenteDetails.html
  26. 1 1
      src/main/webapp/WEB-INF/views/portal/service/serviceDetails.html
  27. 1 1
      src/main/webapp/WEB-INF/views/portal/service/serviceIndex.html
  28. 2 2
      src/main/webapp/WEB-INF/views/portal/service/serviceList.html
  29. 3 3
      src/main/webapp/WEB-INF/views/portal/technologyTrading/achievement.html
  30. 1 1
      src/main/webapp/WEB-INF/views/portal/technologyTrading/achievementList.html
  31. 2 1
      src/main/webapp/WEB-INF/views/portal/technologyTrading/demand.html
  32. 1 1
      src/main/webapp/WEB-INF/views/portal/technologyTrading/demandList.html
  33. 1 1
      src/main/webapp/WEB-INF/views/portal/technologyTrading/shopList.html
  34. 1 1
      src/main/webapp/WEB-INF/views/portal/technologyTrading/tradingIndex.html

+ 5 - 0
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -804,6 +804,11 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 			r.setKeyword(a.getKeyword());
 			r.setTitle(a.getName());
 			r.setRowId(a.getId());
+			String sum = a.getIntroduction();
+			if(null != sum && sum.length() > 40){
+				sum = sum.substring(0,40) + "...";
+			}
+			r.setSummary(sum);
 			jtCollectSearchMapper.insertSelective(r);
 		}
 		return auditStatus;

+ 5 - 0
src/main/java/com/goafanti/business/service/impl/JtBusinessServiceImpl.java

@@ -507,6 +507,11 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 		r.setKeyword(jtBusinessProject.getKeyword());
 		r.setTitle(jtBusinessProject.getName());
 		r.setRowId(jtBusinessProject.getId());
+		String sum = jtBusinessProject.getAdvertisement();
+		if(null != sum && sum.length() > 40){
+			sum = sum.substring(0,40) + "...";
+		}
+		r.setSummary(sum);
 		jtCollectSearchMapper.insertSelective(r);
 	}
 		

+ 21 - 5
src/main/java/com/goafanti/common/mapper/JtCollectSearchMapper.xml

@@ -12,6 +12,7 @@
     <result column="row_id" jdbcType="VARCHAR" property="rowId" />
     <result column="title" jdbcType="VARCHAR" property="title" />
     <result column="keyword" jdbcType="VARCHAR" property="keyword" />
+    <result column="summary" jdbcType="VARCHAR" property="summary" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <!--
@@ -87,7 +88,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Mon Sep 10 14:08:59 CST 2018.
     -->
-    id, from_table, row_id, title, keyword
+    id, from_table, row_id, title, keyword, summary
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.JtCollectSearchExample" resultMap="BaseResultMap">
     <!--
@@ -173,6 +174,9 @@
       <if test="keyword != null">
         keyword,
       </if>
+      <if test="summary != null">
+        summary,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -190,6 +194,9 @@
       <if test="keyword != null">
         #{keyword,jdbcType=VARCHAR},
       </if>
+      <if test="summary != null">
+        #{summary,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.goafanti.common.model.JtCollectSearchExample" resultType="java.lang.Long">
@@ -226,6 +233,9 @@
       <if test="record.keyword != null">
         keyword = #{record.keyword,jdbcType=VARCHAR},
       </if>
+      <if test="record.summary != null">
+        summary = #{record.summary,jdbcType=VARCHAR},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -242,7 +252,8 @@
       from_table = #{record.fromTable,jdbcType=VARCHAR},
       row_id = #{record.rowId,jdbcType=VARCHAR},
       title = #{record.title,jdbcType=VARCHAR},
-      keyword = #{record.keyword,jdbcType=VARCHAR}
+      keyword = #{record.keyword,jdbcType=VARCHAR},
+      summary = #{record.summary,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -267,6 +278,9 @@
       <if test="keyword != null">
         keyword = #{keyword,jdbcType=VARCHAR},
       </if>
+      <if test="summary != null">
+        summary = #{summary,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -280,7 +294,8 @@
     set from_table = #{fromTable,jdbcType=VARCHAR},
       row_id = #{rowId,jdbcType=VARCHAR},
       title = #{title,jdbcType=VARCHAR},
-      keyword = #{keyword,jdbcType=VARCHAR}
+      keyword = #{keyword,jdbcType=VARCHAR},
+      summary = #{summary,jdbcType=VARCHAR}
     where id = #{id,jdbcType=INTEGER}
   </update>
    <delete id="deleteByrowId" parameterType="java.lang.String">
@@ -288,15 +303,16 @@
     where row_id = #{id,jdbcType=VARCHAR}
   </delete>
   <select id="globalSearchList" parameterType="String" resultType="com.goafanti.common.model.JtCollectSearch">
-  	  select id,from_table as fromTable,row_id as rowId,title,keyword from jt_collect_search
+  	  select id,from_table as fromTable,row_id as rowId,title,keyword,summary from jt_collect_search
   	  <if test="name !=null">
     where title like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
     </if>
     union 
-    select id,from_table,row_id,title,keyword from jt_collect_search
+    select id,from_table,row_id,title,keyword,summary from jt_collect_search
     <if test="name !=null">
     where keyword like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
     </if>
+    order by id desc
     <if test="page_sql!=null">
 		${page_sql}
 	</if>

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

@@ -1465,7 +1465,7 @@ select a.create_time as createTime,
 
 
 <select id="selectByIdentityId" resultType="com.goafanti.app.bo.ExpertsListBo">
-	select a.id,a.uid as uid,b.nickname as username,b.society_tag as keyword,a.expert from user_identity a 
+	select a.id,a.uid as uid,b.nickname as username,b.society_tag as keyword,a.expert,b.introduction from user_identity a 
     left join user b on a.uid=b.id
     where a.id=#{id,jdbcType=VARCHAR}
 </select>

+ 12 - 0
src/main/java/com/goafanti/common/model/JtCollectSearch.java

@@ -45,6 +45,8 @@ public class JtCollectSearch {
      * @mbg.generated Mon Sep 10 14:08:59 CST 2018
      */
     private String keyword;
+    
+    private String summary;
 
     /**
      * This method was generated by MyBatis Generator.
@@ -165,4 +167,14 @@ public class JtCollectSearch {
     public void setKeyword(String keyword) {
         this.keyword = keyword;
     }
+
+	public String getSummary() {
+		return summary;
+	}
+
+	public void setSummary(String summary) {
+		this.summary = summary;
+	}
+    
+    
 }

+ 10 - 0
src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java

@@ -603,6 +603,11 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 				r.setKeyword(d.getKeyword());
 				r.setTitle(d.getName());
 				r.setRowId(d.getId());
+				String sum = d.getProblemDes();
+				if(null != sum && sum.length() > 40){
+					sum = sum.substring(0,40) + "...";
+				}
+				r.setSummary(sum);
 				jtCollectSearchMapper.insertSelective(r);				
 			}
 			if (d.getAuditStatus()==4) {
@@ -960,6 +965,11 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 			r.setKeyword(d.getKeyword());
 			r.setTitle(d.getName());
 			r.setRowId(d.getId());
+			String sum = d.getProblemDes();
+			if(null != sum && sum.length() > 40){
+				sum = sum.substring(0,40) + "...";
+			}
+			r.setSummary(sum);
 			i=jtCollectSearchMapper.insertSelective(r);
 		}
 		return i;

+ 5 - 0
src/main/java/com/goafanti/news/service/NewsService.java

@@ -379,6 +379,11 @@ public class NewsService extends BaseMybatisDao<NewsMapper> {
 			r.setKeyword(news.getKeyword());
 			r.setTitle(news.getTitle());
 			r.setRowId(news.getId().toString());
+			String sum = news.getSummary();
+			if(null != sum && sum.length() > 40){
+				sum = sum.substring(0,40) + "...";
+			}
+			r.setSummary(sum);
 			jtCollectSearchMapper.insertSelective(r);
 		}
 		

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

@@ -176,6 +176,11 @@ public void addJtCollectSearch(Policy policy) {
 		r.setKeyword(policy.getKeyword());
 		r.setTitle(policy.getTitle());
 		r.setRowId(policy.getId().toString());
+		String sum = policy.getSummary();
+		if(null != sum && sum.length() > 40){
+			sum = sum.substring(0,40) + "...";
+		}
+		r.setSummary(sum);
 		jtCollectSearchMapper.insertSelective(r);
 	}
 	

+ 1 - 1
src/main/java/com/goafanti/user/bo/InputOrganizationIdentity.java

@@ -182,7 +182,7 @@ public class InputOrganizationIdentity {
 	@Size(min = 0, max = 127, message = "{" + ErrorConstants.EMAIL_SIZE_ERROR + "}")
 	private String email;
 	
-	@Size(min = 0, max = 127, message = "{" + ErrorConstants.EMAIL_SIZE_ERROR + "}")
+	@Size(min = 0, max = 127, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String companyLogoUrl;
 	
 	@Size(min = 0, max = 1, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")

+ 5 - 0
src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java

@@ -602,6 +602,11 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
 				r.setKeyword(SocietyTagStatus.getStatus(u.getKeyword()).getDesc());
 				r.setTitle(u.getUsername());
 				r.setRowId(u.getUid());
+				String sum = u.getIntroduction();
+				if(null != sum && sum.length() > 40){
+					sum = sum.substring(0,40) + "...";
+				}
+				r.setSummary(sum);
 				jtCollectSearchMapper.insertSelective(r);
 			}
 		

+ 4 - 4
src/main/webapp/WEB-INF/views/common.html

@@ -420,7 +420,7 @@
 						</div>
 						<div class="login_pass">
 							<label for="pass"><img th:src="${portalHost+'/img/login_password.png'}"/></label>
-							<input type="password" name="pass" id="Lo_pass" placeholder="请输入密码" />
+							<input type="password" name="pass" id="Lo_pass" autocomplete="off" placeholder="请输入密码" />
 						</div>
 						<div class="login_pass">
 							<img th:src="${portalHost+'/img/resiger_username.jpg'}" alt=""/>
@@ -491,12 +491,12 @@
 					<div class="password_center">
 						<div >
 							<label for="new_pass">
-								新密码:<input type="password" name="type" id="new_pass" placeholder="请输入您的新密码..."/>
+								新密码:<input type="password" name="type" id="new_pass" autocomplete="off" placeholder="请输入您的新密码..."/>
 							</label>
 						</div>
 						<div >
 							<label for="new_pass_again">
-								确认密码:<input type="password" name="type" id="new_pass_again" placeholder="请确认您的密码..."/>
+								确认密码:<input type="password" name="type" id="new_pass_again" autocomplete="off" placeholder="请确认您的密码..."/>
 							</label>
 						</div>
 						<div class="fastener">
@@ -590,7 +590,7 @@
 		</script>
 		<th:block th:replace="${scripts}" />
 		<script language="javascript" src="https://put.zoosnet.net/JS/LsJS.aspx?siteid=PUT70876498&float=1&lng=cn"></script>
-		
+		<script type="text/javascript"> var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://"); document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F2073c2690b7e25f76523dd7e270d2774' type='text/javascript'%3E%3C/script%3E")) </script>
 	</th:block>
 
 </body>

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

@@ -57,8 +57,8 @@
 		<div th:replace="common::login"></div>
     </footer>
     <div th:replace="common::footer(~{::script})">
-	<script type="text/javascript" th:src="${portalHost+'/vendors.js'}"></script>
-	<script type="text/javascript" th:src="${portalHost+'/newMenu/adviser.js'}"></script>
+    	<script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${portalHost+'/newMenu/adviser.js'}"></script>
 	</div>
 	</body>
 	

+ 4 - 2
src/main/webapp/WEB-INF/views/portal/adviser/adviserDetail.html

@@ -1,5 +1,7 @@
 <!DOCTYPE html>
-<html lang="en">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:th="http://www.thymeleaf.org"
+	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
 
 <head>
     <meta charset="UTF-8">
@@ -96,7 +98,7 @@
 		<div th:replace="common::login"></div>
     </footer>
     <div th:replace="common::footer(~{::script})">
-		<script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
+    	<script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
 		<script type="text/javascript" th:src="${portalHost+'/newMenu/adviserDetail.js'}"></script>
 	</div>
 

+ 4 - 2
src/main/webapp/WEB-INF/views/portal/adviser/adviserList.html

@@ -1,5 +1,7 @@
 <!DOCTYPE html>
-<html lang="en">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:th="http://www.thymeleaf.org"
+	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
 <head>
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -61,7 +63,7 @@
 		<div th:replace="common::login"></div>
     </footer>
     <div th:replace="common::footer(~{::script})">
-		<script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
+    	<script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
 		<script type="text/javascript" th:src="${portalHost + '/newMenu/adviserList.js'}"></script>
 	</div>
 </body>

File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/companyProfile.html


File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/continueHigh.html


+ 1 - 1
src/main/webapp/WEB-INF/views/portal/evaluation/evaluate.html

@@ -455,7 +455,7 @@
 		<div th:replace="common::login"></div>
     </footer>
     <div th:replace="common::footer(~{::script})">
-		<script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
+    	<script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
 		<script type="text/javascript" th:src="${portalHost+'/evaluation/evaluate.js'}"></script>
 	</div>
 </body>

+ 4 - 4
src/main/webapp/WEB-INF/views/portal/indexOld.html

@@ -376,9 +376,9 @@
 		<div th:replace="common::copyright"></div>
 		<div th:replace="common::login"></div>
 	</footer>
-		<div th:replace="common::footer(~{::script})">
-	<script type="text/javascript" th:src="${portalHost+'/vendors.js'}"></script>
-	<script type="text/javascript" th:src="${portalHost+'/index.js'}"></script>
+	<div th:replace="common::footer(~{::script})">
+		<script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${portalHost+'/index.js'}"></script>
 	</div>
-	</body>
+</body>
 </html>

File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/militaryProject.html


+ 1 - 1
src/main/webapp/WEB-INF/views/portal/news/newsDetailApp.html

@@ -16,7 +16,7 @@
 			</div>
 		</div>
 	</div>
-	<div th:replace="common::footer(~{::script})">
+	<div th:replace="common::footer(~{::script})">	
 		<script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
 		<script type="text/javascript" th:src="${portalHost + '/news/newsDetailApp.js'}"></script>
 	</div>

File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/practicalPatent.html


+ 17 - 4
src/main/webapp/WEB-INF/views/portal/search.html

@@ -10,9 +10,22 @@
 	</head>
 	<body>
 	<div th:replace="common::nav('','adviserDetail')"></div>  
-		 <div class="carousel">
+		<!--  <div class="carousel">
 	        <img th:src="${portalHost+'/img/patent/patent_banners.jpg'}" alt="First slide">
-	    </div>
+	    </div> -->
+	    <div class="indexSearch">
+			<div class="search-inp">
+				<div class="input-group">
+					<input type="text" class="form-control demandSearch" placeholder="请输入关键字">
+					<span class="input-group-btn">
+						<button class="btn btn-default searchBtn" type="button">
+							<img src="../img/newMenu/search-icon.jpg" alt=""> 搜索
+						</button>
+					</span>
+				</div>
+			</div>
+		</div>
+	    
 	    <div class="title">
 	    	为您找到下列符合条件的信息:
 	    </div>
@@ -45,8 +58,8 @@
 		<div th:replace="common::login"></div>
     </footer>
     <div th:replace="common::footer(~{::script})">
-	<script type="text/javascript" th:src="${portalHost+'/vendors.js'}"></script>
-	<script type="text/javascript" th:src="${portalHost+'/search.js'}"></script>
+	    <script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${portalHost+'/search.js'}"></script>
 	</div>
 	</body>
 </html>

File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/patent.html


File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/patentList.html


File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/patenteDetails.html


File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/serviceDetails.html


File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/serviceIndex.html


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

@@ -98,8 +98,8 @@
 	<div th:replace="common::footer(~{::script})">
 		<script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
 		<script type="text/javascript" th:src="${portalHost+'/newMenu/serviceList.js'}"></script>
-		</div>
-		</body>
+	</div>
+</body>
 
 
 </html>

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

@@ -339,9 +339,9 @@
 		<div th:replace="common::login"></div>
     </footer>
    	<div th:replace="common::footer(~{::script})">
-<script type="text/javascript" th:src="${portalHost+'/vendors.js'}"></script>
-<script type="text/javascript" th:src="${portalHost+'/newMenu/achievement.js'}"></script>
-</div>
+   		<script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${portalHost+'/newMenu/achievement.js'}"></script>
+	</div>
 
 </body>
 

File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/technologyTrading/achievementList.html


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

@@ -461,6 +461,7 @@
 	</footer>
 	<div th:replace="common::footer(~{::script})">
 		<script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
-<script type="text/javascript" th:src="${portalHost+'/newMenu/demand.js'}"></script></div>
+		<script type="text/javascript" th:src="${portalHost+'/newMenu/demand.js'}"></script>
+	</div>
 </body>
 </html>

File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/technologyTrading/demandList.html


File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/technologyTrading/shopList.html


File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/technologyTrading/tradingIndex.html