Browse Source

Merge remote-tracking branch 'origin/dev' into test

zou_ht 8 years ago
parent
commit
6961aced1d

+ 6 - 6
src/main/java/com/goafanti/common/controller/PortalController.java

@@ -243,17 +243,17 @@ public class PortalController extends BaseController {
 			if (null != category) {
 				if (category == 0) {
 					achievementdetail.setCategoryS("专利");
-				} else if (category == 2) {
+				} else if (category == 1) {
 					achievementdetail.setCategoryS("软著");
-				} else if (category == 3) {
+				} else if (category == 2) {
 					achievementdetail.setCategoryS("项目");
-				} else if (category == 4) {
+				} else if (category == 3) {
 					achievementdetail.setCategoryS("版权");
-				} else if (category == 5) {
+				} else if (category == 4) {
 					achievementdetail.setCategoryS("工业设计");
-				} else if (category == 6) {
+				} else if (category == 5) {
 					achievementdetail.setCategoryS("配方");
-				} else if (category == 7) {
+				} else if (category == 6) {
 					achievementdetail.setCategoryS("非标");
 				}
 

+ 1 - 1
src/main/java/com/goafanti/common/dao/DemandMapper.java

@@ -50,5 +50,5 @@ public interface DemandMapper {
 	
 	ArrayList<DemandListBo> selectDemandList (Integer boutique);
 	
-	List<DemandListBo> selectCsutomerLike();
+	List<DemandListBo> selectCsutomerLike(String uid);
 }

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

@@ -40,6 +40,7 @@
     <result column="audit_status" property="auditStatus" jdbcType="INTEGER" />
     <result column="tech_broker_id" property="techBrokerId" jdbcType="VARCHAR" />
     <result column="boutique" property="boutique" jdbcType="INTEGER" />
+    <result column="uid" property="uid" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     id, serial_number, data_category, name, keyword, info_sources, industry_category_a, 
@@ -1179,17 +1180,14 @@
   <select id="findBoutiqueListByPage" parameterType="java.lang.Integer" resultType="com.goafanti.portal.bo.BoutiqueListBo">
    	select 
    		a.id,a.name,
-   		b.name as industryCategory,
+   		b.name as industryCatalog, 
    		a.picture_url as pictureUrl,
    		a.problem_des as sketch,
    		a.data_category as ownerType,
    		a.employer_name as personName
 	from 
 		demand a 
-	left join 
-		field_glossory b 
-	on 
-		a.industry_category_a = b.id
+	left join field_glossory b on a.industry_category_a = b.id
 	where
 		a.boutique = 1 and a.audit_status =3 and a.deleted_sign=0
 	<if test="industryCategoryA != null and industryCategoryA != ''">
@@ -1218,7 +1216,7 @@
   </select>
   
   <!-- 查询需求列表 -->
-	<select id="selectDemandList" parameterType="java.lang.Integer"
+	<select id="selectDemandList" 
 		resultType="com.goafanti.demand.bo.DemandListBo">
 		SELECT
 		d.id,
@@ -1239,7 +1237,6 @@
 		province,
 		dgg.name AS
 		city,
-		interest.id as interestId,
 		d.employer_name as
 		employerName,
 		u.lvl as
@@ -1255,13 +1252,53 @@
 		ui.city
 		LEFT JOIN field_glossory fg on fg.id = d.industry_category_a
 		LEFT JOIN field_glossory fgg on fgg.id = d.industry_category_b
-		LEFT
-		JOIN demand_interest interest on interest.demand_id = d.id and
-		interest.uid = #{uid,jdbcType=VARCHAR}
 		WHERE
 		<if test="_parameter!= null">
 			d.boutique = #{_parameter,jdbcType=INTEGER}
 		</if>
 		limit 0,30
 	</select>
+  <!-- 猜你喜欢 -->
+	<select id="selectCsutomerLike" 
+		resultType="com.goafanti.demand.bo.DemandListBo">
+		SELECT
+		d.id,
+		d.name,
+		d.keyword,
+		d.data_category as dataCategory,
+		d.fixed_budget as fixedbudget,
+		d.demand_type as demandType,
+		d.picture_url as pictureUrl,
+		d.industry_category_a AS industryCategoryA,
+		fg.name AS
+		industryCategoryAS,
+		fgg.name AS industryCategorBS,
+		d.budget_cost AS
+		budgetCost,
+		d.problem_des AS problemDes,
+		dg.name AS
+		province,
+		dgg.name AS
+		city,
+		d.employer_name as
+		employerName,
+		u.lvl as
+		level
+		FROM
+		demand d
+		LEFT JOIN `user` u on u.id = d.employer_id
+		LEFT JOIN
+		user_identity ui on ui.uid = d.employer_id
+		LEFT JOIN district_glossory
+		dg ON dg.id = ui.province
+		LEFT JOIN district_glossory dgg ON dgg.id =
+		ui.city
+		LEFT JOIN field_glossory fg on fg.id = d.industry_category_a
+		LEFT JOIN field_glossory fgg on fgg.id = d.industry_category_b 
+		LEFT JOIN demand_interest interest on interest.demand_id = d.id 
+		where
+		interest.uid = #{_parameter,jdbcType=INTEGER}
+		limit 0,4
+	</select>
+	
 </mapper>

+ 3 - 2
src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java

@@ -482,7 +482,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		}
 
 		if (pSize == null || pSize < 0 || pSize > 10) {
-			pSize = 10;
+			pSize = 12;
 		}
 		
 		return (Pagination<DemandSearchListBo>) findPage("findSearchDemandListByPage", "findSearchDemandCount", params,
@@ -743,12 +743,13 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 
 	@Override
 	public ArrayList<DemandListBo> selectDemandList(Integer boutique) {
+		System.out.println(TokenManager.getUserId());
 		return demandMapper.selectDemandList(boutique);
 	}
 
 	@Override
 	public List<DemandListBo> selectCsutomerLike() {
-		return demandMapper.selectCsutomerLike();
+		return demandMapper.selectCsutomerLike(TokenManager.getUserId());
 	}
 
 }

+ 21 - 3
src/main/java/com/goafanti/portal/controller/PortalSearchController.java

@@ -22,6 +22,7 @@ import com.goafanti.common.enums.UserType;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.demand.service.DemandService;
 import com.goafanti.portal.bo.AchievementSearchListBo;
+import com.goafanti.portal.bo.BoutiqueListBo;
 import com.goafanti.user.service.OrganizationIdentityService;
 import com.goafanti.user.service.UserIdentityService;
 
@@ -184,13 +185,30 @@ public class PortalSearchController extends BaseController {
 		if (StringUtils.isNumeric(pageNo)) {
 			pNo = Integer.parseInt(pageNo);
 		}
+		Pagination<BoutiqueListBo> boutiqueSearchList = null ;
 		if(boutiqueType == 0){
-			res.setData(achievementService.boutiqueSearchList(null, 0, industryCatalog, pNo, pSize));
+			boutiqueSearchList=achievementService.boutiqueSearchList(null, 0, industryCatalog, pNo, pSize);
 		}else if(boutiqueType == 1){
-			res.setData(achievementService.boutiqueSearchList(1, null, industryCatalog, pNo, pSize));
+			boutiqueSearchList=achievementService.boutiqueSearchList(1, null, industryCatalog, pNo, pSize);
 		}else if(boutiqueType == 2){
-			res.setData(demandService.boutiqueSearchList(industryCatalog, pNo, pSize));
+			boutiqueSearchList=demandService.boutiqueSearchList(industryCatalog, pNo, pSize);
 		}
+		
+		@SuppressWarnings("unchecked")
+		List<BoutiqueListBo> BoutiqueListBo = (List<BoutiqueListBo>) boutiqueSearchList.getList();
+		
+		for (int i = 0; i < BoutiqueListBo.size(); i++) {
+			String pic=BoutiqueListBo.get(i).getPictureUrl();//在存在多张图片的情况下,暂时先取第一张
+			if(null!= pic) {
+				boolean hascomma = pic.contains(",");
+				if(hascomma) {
+					String[] picurl = pic.split(",");
+					BoutiqueListBo.get(i).setPictureUrl(picurl[0]);
+				}
+			}
+		};
+		boutiqueSearchList.setList(BoutiqueListBo);
+		res.setData(boutiqueSearchList);
 		return res;
 	}
 	

File diff suppressed because it is too large
+ 403 - 325
src/main/webapp/WEB-INF/views/common.html


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

@@ -3,7 +3,7 @@
 	xmlns:th="http://www.thymeleaf.org"
 	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
 <head th:replace="common::header(~{::title},~{::link})">
-<title>首页--我的技术和科技服务交易平台</title>
+<title>技淘--我的技术和科技服务交易平台</title>
 <link th:href="${portalHost + '/vendors.css'}" rel="stylesheet">
 <link th:href="${portalHost + '/index.css'}" rel="stylesheet">
 </head>

+ 6 - 6
src/main/webapp/WEB-INF/views/portal/service/serviceIndex.html

@@ -133,11 +133,11 @@
   	</div>
   	<div class="customer">
   		<div class="customer_main container">
-  			<span class="that" id="office">子公司</span>
-			<span id="custom">大客户</span>
+  			<!-- <span class="that" id="office">子公司</span> -->
+			<span id="custom" class="that">大客户</span>
   		</div>
   		<hr />
-  		<div class="container change_left">
+  		<!-- <div class="container change_left">
   			<ul class="customer_company">
 				<li class="thon">
 					<img th:src="${portalHost+'/img/service_17.jpg'}"/>
@@ -173,11 +173,11 @@
 					<img th:src="${portalHost+'/img/service_24.jpg'}"/>
 					<p>沈阳科德信息咨询有限公司</p>
 				</li>
-			</ul>
- 		<ol class="customer_circle">
+			</ul> -->
+ 		<!-- <ol class="customer_circle">
 	  			<li class="thonli"></li>
 	  			<li></li>
-	  		</ol>
+	  		</ol> -->
   		</div>
   		<div class="container change_right">
   		<ul class="customer_company">

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

@@ -147,10 +147,10 @@
 		 				<button id="btn_search"></button>				
 		 			</div>
 		 			<ol>
-		 				<li>医药生物</li>
-		 				<li>建筑科技</li>
-		 				<li>教育休闲</li>
-		 				<li>航空航天</li>
+		 				<li val="457">医药医疗</li>
+		 				<li val="4">建筑建材</li>
+		 				<li val="464">教育休闲</li>
+		 				<li val="460">航空航天</li>
 		 			</ol>
 				</div>
 			</div>

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

@@ -122,10 +122,10 @@
 		 				<button id="btt_search"></button>				
 		 			</div>
 		 			<ol>
-		 				<li>医药生物</li>
-		 				<li>医药生物</li>
-		 				<li>医药生物</li>
-		 				<li>医药生物</li>
+		 				<li val="457">医药医疗</li>
+		 				<li val="4">建筑建材</li>
+		 				<li val="464">教育休闲</li>
+		 				<li val="460">航空航天</li>
 		 			</ol>
 				</div>
 			</div>

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

@@ -52,8 +52,13 @@
 						<div class="inline_span">
 							<span>有效日期:</span> <span th:text="${demand.validityPeriodS}?${demand.validityPeriodS}:永久"></span>
 						</div>
-						<!-- <span> <img src="../../img/detail_img5.jpg" alt="" /> <span>8</span></span> -->
-						<div class="detail_btn">我要咨询</div>
+						<div class="loves">                       
+                       		<span class="box_love"></span><span class="dem_number">8</span><span>我感兴趣</span>
+                    	</div>
+	                    <div class="detail_btn">
+	                       <a href="javascript:;">我要咨询</a><a href="javascript:;" id="purchase">立即购买</a>
+	                    </div>
+
 					</div>
 					<div class="fine">
 						<div class="fine_title">精品需求</div>
@@ -65,9 +70,6 @@
 							<div th:if="${reboutiquedemand.pictureUrl} != null" >
 								<img th:src="${avatarUploadHost+reboutiquedemand.pictureUrl}" alt=""/>
 							</div>
-							
-							
-							<img src="${avatarUploadHost+reboutiquedemand.pictureUrl}" />
 							<p th:text="${reboutiquedemand.name}"></p>
 							<p th:text="${reboutiquedemand.id}" class="demandId"></p>
 							<p th:text="${reboutiquedemand.dataCategory}" class="demandTyp"></p>
@@ -110,7 +112,7 @@
 								<p th:text="${redemandlist.dataCategory}" class="demandTyp"></p>
 								<a href="#">了解详情</a>
 							</div>
-							<div class="star">
+							<!-- <div class="star">
 								<p>精品:</p>
 								<ol>
 									<li></li>
@@ -119,7 +121,8 @@
 									<li></li>
 									<li></li>
 								</ol>
-							</div></li>
+							</div> -->
+							</li>
 					</ul>
 				</div>
 			</div>

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

@@ -94,19 +94,19 @@
 				<div>
 					<div class="clear_line"></div>
 					<div class="technolo_text">
-						<div>
+						<div val="120088780303908864">
 							<a href="#">查看答案</a>
 							<h5>技淘网平台交易违规处罚</h5>
 						</div>
-						<div>
+						<div val="120088955617427456">
 							<a href="#">查看答案</a>
 							<h5>技术需求发布规范</h5>
 						</div>
-						<div>
+						<div val="120089164124667904">
 							<a href="#">查看答案</a>
 							<h5>争议纠纷发起流程及规则</h5>
 						</div>
-						<div>
+						<div val="120089403078361088">
 							<a href="#">查看答案</a>
 							<h5>交易安全保障</h5>
 						</div>