Browse Source

细节修改

zou_ht 8 years ago
parent
commit
8ce5b96b33

+ 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>

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

@@ -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;
 	}
 	

+ 2 - 2
src/main/resources/props/config_local.properties

@@ -54,8 +54,8 @@ session.validate.timespan=18000000
 app.name=AFT
 template.cacheable=false
 
-static.host=//sb.jishutao.com/1.0.44
-portal.host=//sf.jishutao.com/portal/2.0.2
+static.host=//sb.jishutao.com/1.0.45
+portal.host=//sf.jishutao.com/portal/2.0.3
 avatar.host=//sb.jishutao.com
 avatar.upload.host=//sb.jishutao.com/upload
 

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


+ 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">

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

@@ -123,9 +123,9 @@
 		 			</div>
 		 			<ol>
 		 				<li>医药生物</li>
-		 				<li>医药生物</li>
-		 				<li>医药生物</li>
-		 				<li>医药生物</li>
+		 				<li>建筑科技</li>
+		 				<li>教育休闲</li>
+		 				<li>航空航天</li>
 		 			</ol>
 				</div>
 			</div>

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

@@ -65,9 +65,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>

+ 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>