Browse Source

解决代码冲突

zou_ht 8 years ago
parent
commit
ade03ec387

+ 25 - 1
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -573,5 +573,29 @@ public class WebpageController extends BaseController {
 		}
 	}
 	
-	
+	/**
+	 * 会员介绍
+	 * @param request
+	 * @param modelview
+	 * @param pageType (0:专利产品页,1:技术成果页面,2:技术需求页面)
+	 * @param keyWord
+	 *   
+	 * @return
+	 */
+	@RequestMapping(value="/portal/search/keyword" ,method = RequestMethod.POST)
+	private ModelAndView searchListByKeyword (HttpServletRequest request, ModelAndView modelview ,Integer pageType ,String keyWord) {
+		modelview.addObject("keyWord", keyWord);
+		System.out.println("进来没有");
+		/*if (null != pageType && pageType == 2) {
+			System.out.println("专利产品页面");
+			modelview.setViewName("/portal/technologyTrading/demand");
+		}else if (null != pageType && (pageType == 1 ||pageType==0)) {
+			System.out.println("技术成果页面");
+			modelview.setViewName("/portal/technologyTrading/achievement");
+		}else {
+			modelview.setViewName("/portal/technologyTrading/achievement");
+		}*/
+		/*modelview.setViewName("/portal/technologyTrading/achievement");*/
+		return new ModelAndView("/portal/technologyTrading/achievement","keyWord", keyWord);
+	}
 }

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

@@ -1462,7 +1462,10 @@
 	on 
 		a.field_a = b.id 	
 	where 
-		a.boutique = 1  and a.audit_status = 3 and a.field_a = #{fieldA,jdbcType=INTEGER}
+		a.boutique = 1  and a.audit_status = 3 
+	<if test="dataCategory != null and dataCategory != ''">
+		and a.field_a = #{fieldA,jdbcType=INTEGER}
+	</if>
 	<if test="dataCategory != null and dataCategory != ''">
 		and data_category = #{dataCategory,jdbcType=INTEGER}
 	</if>
@@ -1484,7 +1487,10 @@
 	on 
 		a.field_a = b.id 
 	where 
-		a.boutique = 1  and a.audit_status = 3 and a.field_a = #{fieldA,jdbcType=INTEGER}
+		a.boutique = 1  and a.audit_status = 3 
+	<if test="dataCategory != null and dataCategory != ''">
+		and a.field_a = #{fieldA,jdbcType=INTEGER}
+	</if>
 	<if test="dataCategory != null and dataCategory != ''">
 		and data_category = #{dataCategory,jdbcType=INTEGER}
 	</if>

+ 60 - 52
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -13,6 +13,7 @@
     <result column="type" jdbcType="INTEGER" property="type" />
     <result column="aid" jdbcType="VARCHAR" property="aid" />
     <result column="mid" jdbcType="VARCHAR" property="mid" />
+    <result column="uid" jdbcType="VARCHAR" property="uid" />
   </resultMap>
   
   <resultMap type="com.goafanti.user.bo.UserPageHomeBo" id="UserPageHomeBo">
@@ -755,57 +756,46 @@
     </if>
   </select>  
   
-  <select id="findUserPartnerDetail" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserPartnerDetailBo">
-  	SELECT
-  		u.number,
-        ui.username,
-        ui.province,
-        ui.city,
-        ui.area,
-        uc.engaged_field AS engagedField,
-        info.personal_profile AS personalProfile,
-        u.lvl AS LEVEL,
-        ua.ability_label AS abilityLabel,
-        info.person_portrait_url AS personPortraitUrl,
-        info.life_photo_url AS lifePhotoUrl,
-        interest.id as interestId
-    FROM
-    `user` u
-    LEFT JOIN user_identity ui ON ui.uid = u.id
-    LEFT JOIN user_career uc ON uc.uid = u.id
-    LEFT JOIN user_ability ua ON ua.uid = u.id
-    LEFT JOIN user_info info ON info.uid = u.id
-    LEFT JOIN user_interest interest on interest.to_uid = u.id and interest.from_uid = #{tokenId,jdbcType=VARCHAR}
-    WHERE
-        u.type = 0
-    and u.id = #{uid,jdbcType=VARCHAR}
-  </select>
-  
-  <select id="findOrgPartnerDetail" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgPartnerDetailBo">
-  	SELECT
-  		u.number,
-        oi.unit_name AS unitName,
-        oi.licence_province AS province,
-        oi.licence_city AS city,
-        oi.licence_area AS area,
-        u.lvl AS LEVEL,
-        ua.ability_label AS abilityLabel,
-        info.logo_url AS logoUrl,
-        info.company_introduction AS companyIntroduction,
-        info.publicity_picture_url AS publicityPictureUrl,
-        ot.search_area_category as field, 
-        interest.id as interestId
-    FROM
-    `user` u
-    LEFT JOIN organization_identity oi ON oi.uid = u.id
-    LEFT JOIN organization_info info ON info.uid = u.id
-    LEFT JOIN organization_tech ot ON ot.uid = u.id
-    LEFT JOIN user_ability ua ON ua.uid = u.id
-    LEFT JOIN user_interest interest on interest.to_uid = u.id and interest.from_uid = #{tokenId,jdbcType=VARCHAR}
-    WHERE
-        u.type = 1
-    and u.id = #{uid,jdbcType=VARCHAR} 
-  </select>
+ 	<select id="findUserPartnerDetail" parameterType="java.lang.String"
+		resultType="com.goafanti.user.bo.UserPartnerDetailBo">
+		select
+		u.id,i.username,c.work_unit as work_unit,c.position,c.achievement,
+		info.person_portrait_url as personPortraitUrl,
+		i.province,
+		info.personal_profile as personalProfile,
+		ua.ability_label as abilityLabel
+		from `user` u
+		left join user_identity i on u.id=i.uid
+		left join
+		user_career c on u.id=c.uid
+		left join user_info info on u.id=info.uid
+		left join user_ability ua on u.id=ua.uid
+		WHERE
+		u.type = 0
+		<if test="_parameter!= null">
+			and u.id= #{_parameter,jdbcType=VARCHAR}
+		</if>
+	</select>
+  
+  <select id="findOrgPartnerDetail" parameterType="java.lang.String"
+		resultType="com.goafanti.user.bo.OrgPartnerDetailBo">
+		select
+		u.id,i.username,c.work_unit as work_unit,c.position,c.achievement,
+		info.person_portrait_url as personPortraitUrl,
+		i.province,info.personal_profile as personalProfile,
+		ua.ability_label as abilityLabel
+		from `user` u
+		left join user_identity i on u.id=i.uid
+		left join
+		user_career c on u.id=c.uid
+		left join user_info info on u.id=info.uid
+		left join user_ability ua on u.id=ua.uid
+		WHERE
+		u.type = 1
+		<if test="_parameter!= null">
+			and u.id= #{_parameter,jdbcType=VARCHAR}
+		</if>
+	</select>
   
   <select id="findStarListByPage" parameterType="String" resultType="com.goafanti.user.bo.StarListBo">
   	select 
@@ -935,5 +925,23 @@
   	select number
   	from user
   	where id = #{id,jdbcType=VARCHAR}
-  </select>
+  </select>
+  
+  <select id="findUserPartner" parameterType="String" resultType="com.goafanti.user.bo.UserPartnerDetailBo">
+		select
+		u.id,i.username,c.work_unit as work_unit,c.position,c.achievement,
+		info.person_portrait_url as personPortraitUrl,
+		i.province,
+		info.personal_profile as personalProfile,
+		ua.ability_label as abilityLabel
+		from `user` u
+		left join user_identity i on u.id=i.uid
+		left join
+		user_career c on u.id=c.uid
+		left join user_info info on u.id=info.uid
+		left join user_ability ua on u.id=ua.uid
+		WHERE
+		u.type = 0
+		limit 0,50
+	</select>
 </mapper>

+ 5 - 1
src/main/java/com/goafanti/news/controller/NewsController.java

@@ -117,7 +117,11 @@ public class NewsController extends BaseController {
 		News newsDetail = newsService.findNewsDetail(id);
 		Object news = newsList.getList().get(0);
 		SimpleDateFormat fmt = new SimpleDateFormat();
-		newsDetail.setCreateTimeS(fmt.format(newsDetail.getCreateTime()));
+		if(null!= newsDetail) {
+			if(null != newsDetail.getCreateTime()) {
+				newsDetail.setCreateTimeS(fmt.format(newsDetail.getCreateTime()));
+			}
+		}
 		@SuppressWarnings("unchecked")
 		List<NewsPortalList> la = (List<NewsPortalList>) newsList.getList();
 		for (NewsPortalList n : la) {

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

@@ -22,7 +22,12 @@
 					<span>来源:<span th:text="${newsDetail.source}?${newsDetail.source}:行业新闻"></span></span>
 				</div>
 				<div class="content_img">
-					<img th:src="${avatarUploadHost+newsDetail.titleImg}" alt="" />
+					<div th:if="${newsDetail.titleImg} == null " >
+						<img th:src="${avatarUploadHost+ '/default/neswimg_null.png'}" alt=""/>
+					</div>
+					<div th:if="${newsDetail.titleImg} != null " >
+						<img th:src= "${avatarUploadHost+newsDetail.titleImg}"alt="" />
+					</div>
 				</div>
 				<p  th:text="${newsDetail.content}?${newsDetail.content}:'暂无内容'">
 				</p>

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

@@ -32,6 +32,14 @@
   		<div class="achievement_top"><img th:src="${portalHost + '/img/achievement_01.png'}" alt=""/></div>  		
   	</div>
   	<div class="container">
+  		
+  		<div th:if="${keyWord} != null "  id="keyword1">
+			<p th:text="${keyWord}"></p>
+		</div>
+		<div th:if="${keyWord} == null " id="keyword2">
+			<p></p>
+		</div>
+  		
   		<div class="achievement_header">
   			<p>全部结果: </p>
   			<ul>
@@ -119,7 +127,7 @@
 							<div class="inp_select">
 								<input type="number" name="" id="minprice" placeholder="最小价格" maxlength="6" min="0"/>
 								<span>-</span>
-								<input type="number" id="maxprice" placeholder="最大价格" maxlength="6" min="0"/>
+								<input type="number" id="maxprice" placeholder="最大价格" maxlength="6" min="0"/>
 								<button>确定</button>
 							</div>
 						</li>

+ 7 - 2
src/main/webapp/WEB-INF/views/portal/technologyTrading/achievementDetail.html

@@ -24,7 +24,7 @@
 						alt="" /></a>
 				</div>-->				
 				<div class="detail_toptitle">
-					<a href="#">技术交易&nbsp;&nbsp;></a> <a href="#">技术专利&nbsp;&nbsp;></a> <a href="#"
+					<a href="/portal/technologyTrading/index.html">技术交易&nbsp;&nbsp;></a> <a href="/portal/technologyTrading/achievement.html">技术专利&nbsp;&nbsp;></a> <a href="#"
 						class="a_detail">专利详情</a>
 				</div>
 			</div>
@@ -40,9 +40,14 @@
 							<ul th:if="#{detail.pictureList.empty}">
 							</ul>
 						</div> -->
-						<div class="big_img" th:each="achievementdetail:${achievementdetail}">
+						<div th:if="${achievementdetail.technicalPictureUrl} == null " >
+							<img th:src="${avatarUploadHost+ '/default/bigimg_null.png'}" alt=""/>
+						</div>
+						<div th:if="${achievementdetail.technicalPictureUrl} != null " >
 							<img th:src= "${avatarUploadHost+achievementdetail.technicalPictureUrl}"alt="" />
 						</div>
+						
+						
 					</div>
 					<div class="basic"  th:each="achievementdetail:${achievementdetail}">
 						<div class="basic_left">

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

@@ -101,7 +101,7 @@
 							<div class="inp_select">
 								<input type="number" name="" id="minprice" placeholder="最小价格" maxlength="6" min="0"/>
 								<span>-</span>
-								<input type="number" id="maxprice" placeholder="最大价格" maxlength="6" min="0"/>
+								<input type="number" id="maxprice" placeholder="最大价格" maxlength="6" min="0"/>
 								<button>确定</button>
 							</div>
 						</li>

+ 7 - 2
src/main/webapp/WEB-INF/views/portal/technologyTrading/demandDetail.html

@@ -22,7 +22,7 @@
 					<a href="#"> <img th:src="${portalHost + '/img/detail_weibo.jpg'}" alt="" /></a>
 				</div> -->
 				<div class="detail_toptitle" th:each="demand:${demand}">
-					<a href="#">技术交易&nbsp;&nbsp;></a>  <a href="#">技术需求&nbsp;&nbsp;></a>  <a href="#"class="a_detail" th:text="${demand.name}">关于超细颗粒金属碳化物的制造技术</a>
+					<a href="/portal/technologyTrading/index.html">技术交易&nbsp;&nbsp;></a>  <a href="/portal/technologyTrading/demand.html">技术需求&nbsp;&nbsp;></a>  <a href="#"class="a_detail" th:text="${demand.name}">关于超细颗粒金属碳化物的制造技术</a>
 				</div>
 			</div>
 			<div class="detail_center">
@@ -31,7 +31,12 @@
 						<h3 th:text="${demand.name}"></h3>
 					</div>
 					<div class="big_img">
-						<img th:src= "${avatarUploadHost+demand.pictureUrl}?${avatarUploadHost+demand.pictureUrl}:${avatarUploadHost+ 'default/xuqiuimg_null.png'}"alt="" />
+						<div th:if="${demand.pictureUrl} == null " >
+							<img th:src="${avatarUploadHost+ '/default/bigimg_null.png'}" alt=""/>
+						</div>
+						<div th:if="${demand.pictureUrl} != null " >
+							<img th:src= "${avatarUploadHost+demand.pictureUrl}"alt="" />
+						</div>
 					</div>
 					<div class="basic">
 						<div>

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