Browse Source

Merge branch 'patch' of https://git.coding.net/aft/AFT.git into patch

Michael 8 years ago
parent
commit
4c4ccb0a67

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

@@ -808,33 +808,33 @@ public class PortalController extends BaseController {
 		;
 
 		// 判断登录没登录. 登录了.查找用户喜欢的. 没登录就随机查四个.
-		boolean isLogin = TokenManager.isLogin();
-		List<DemandListBo> demandlist = demandService.selectDemandList(0);// 查询所有专利
-		List<DemandListBo> redemandlist = new ArrayList<DemandListBo>();
-
-		if (demandlist.size() >= 5) {
-			int idx = new Random().nextInt(demandlist.size() - 4);
-			redemandlist.add(demandlist.get(idx));
-			redemandlist.add(demandlist.get(idx + 1));
-			redemandlist.add(demandlist.get(idx + 2));
-			redemandlist.add(demandlist.get(idx + 3));
-		} else {
-			redemandlist.addAll(demandlist);
-		}
+				boolean isLogin = TokenManager.isLogin();
+				List<DemandListBo> demandlist = demandService.selectDemandList(0);// 查询所有专利
+				List<DemandListBo> redemandlist = new ArrayList<DemandListBo>();
+
+				if (demandlist.size() >= 5) {
+					int idx = new Random().nextInt(demandlist.size() - 4);
+					redemandlist.add(demandlist.get(idx));
+					redemandlist.add(demandlist.get(idx + 1));
+					redemandlist.add(demandlist.get(idx + 2));
+					redemandlist.add(demandlist.get(idx + 3));
+				} else {
+					redemandlist.addAll(demandlist);
+				}
 
-		if (isLogin) {
-			List<DemandListBo> customerlikelist = demandService.selectCsutomerLike();// 猜你喜欢专利
-			int size;
-			if (customerlikelist.size() < redemandlist.size()) {
-				size = customerlikelist.size();
-			} else {
-				size = redemandlist.size();
-			}
+				if (isLogin) {
+					List<DemandListBo> customerlikelist = demandService.selectCsutomerLike();// 猜你喜欢专利
+					int size;
+					if (customerlikelist.size() < redemandlist.size()) {
+						size = customerlikelist.size();
+					} else {
+						size = redemandlist.size();
+					}
 
-			for (int i = 0; i < size; i++) {
-				redemandlist.set(i, customerlikelist.get(i));
-			}
-		}
+					for (int i = 0; i < size; i++) {
+						redemandlist.set(i, customerlikelist.get(i));
+					}
+				}
 
 		for (int i = 0; i < redemandlist.size(); i++) {
 			Integer demandType = redemandlist.get(i).getDemandType();

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

@@ -1166,7 +1166,7 @@
   		a.field_b as fieldB,
   		a.transfer_price as transferPrice,
   		a.maturity,
-  		a.introduction,
+  		a.introduction,a.boutique,
   		a.transfer_mode as transferMode,
   		a.technical_picture_url as technicalPictureUrl,
   		b.name as fieldAs

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

@@ -1026,7 +1026,7 @@
 	  		d.id, d.name, d.keyword,d.data_category as dataCategory,d.picture_url as pictureUrl,
 	  		d.serial_number as serialNumber, d.data_category as dataCategory, d.industry_category_a as industryCategoryA,
 	  		d.industry_category_b as industryCategoryB, d.demand_type as demandType, d.budget_cost as budgetCost,
-	  		d.problem_des as problemDes, d.release_date as releaseDate, d.employer_name as employerName,
+	  		d.problem_des as problemDes, d.release_date as releaseDate, d.employer_name as employerName,d.boutique,
 	  	 u.lvl as level
   		from demand d
   		left join user u on u.id = d.employer_id
@@ -1392,7 +1392,7 @@
 		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}
+		interest.uid = #{uid,jdbcType=INTEGER}
 		limit 0,4
 	</select>
 	

+ 10 - 0
src/main/java/com/goafanti/portal/bo/AchievementSearchListBo.java

@@ -107,6 +107,8 @@ public class AchievementSearchListBo {
 	
 	/** 是否国际*/
 	private Integer internationalFlag;
+	/** 是否精品*/
+	private Integer boutique;
 	
 	public Integer getLevel() {
 		return level;
@@ -296,5 +298,13 @@ public class AchievementSearchListBo {
 	public void setInternationalFlag(Integer internationalFlag) {
 		this.internationalFlag = internationalFlag;
 	}
+
+	public Integer getBoutique() {
+		return boutique;
+	}
+
+	public void setBoutique(Integer boutique) {
+		this.boutique = boutique;
+	}
 	
 }

+ 12 - 0
src/main/java/com/goafanti/portal/bo/DemandSearchListBo.java

@@ -76,6 +76,10 @@ public class DemandSearchListBo {
 	 * 用户等级
 	 */
 	private String		pictureUrl;
+	/**
+	 * 是否精品
+	 */
+	private Integer 	boutique;
 	
 	public String getEmployerName() {
 		return employerName;
@@ -205,5 +209,13 @@ public class DemandSearchListBo {
 		this.pictureUrl = pictureUrl;
 	}
 
+	public Integer getBoutique() {
+		return boutique;
+	}
+
+	public void setBoutique(Integer boutique) {
+		this.boutique = boutique;
+	}
+
 	
 }

+ 2 - 0
src/main/webapp/WEB-INF/views/portal/technologyTrading/achievementOrder.html

@@ -93,6 +93,8 @@
 									交易方式:<span
 										th:text="${reachievementlist.transferModeS}?${reachievementlist.transferModeS}:暂无"></span>
 								</p>
+								<p class="likeId" th:text="${reachievementlist.id}"></p>
+								<p class="likeType" th:text="${reachievementlist.ownerType}"></p>
 								<a href="#">了解详情</a>
 							</div></li>
 					</ul>

+ 28 - 13
src/main/webapp/WEB-INF/views/portal/technologyTrading/demandOrder.html

@@ -74,27 +74,42 @@
 				<div class="line">猜你喜欢</div>
 				<div class="main_introduce">
 					<ul>
-						<li th:each="reachievementlist:${reachievementlist}"><img
-							th:src="${portalHost+'/img/detail_img4.jpg'}" alt="" />
+						<li th:each="redemandlist:${redemandlist}"> 
+							<div th:if="${redemandlist.pictureUrl} == null " >
+								<img th:src="${avatarUploadHost+ '/default/xuqiuimg_null.png'}" alt=""/>
+							</div>
+							<div th:if="${redemandlist.pictureUrl} != null" >
+								<img th:src="${avatarUploadHost+redemandlist.pictureUrl}" alt=""/>
+							</div>
+						 
 							<div class="list_text">
 								<p>
-									行业:<span
-										th:text="${redemandlist.industryCategoryAS}?${redemandlist.industryCategoryAS}:暂无行业分类"></span>
+									行业:<span th:text="${redemandlist.industryCategoryAS}?${redemandlist.industryCategoryAS}:暂无行业分类"></span>
 								</p>
-								<p>
-									名称:<span
-										th:text="${redemandlist.name}?${redemandlist.name}:暂无名称"></span>
+								<p >
+									名称:<span th:text="${redemandlist.name}?${redemandlist.name}:暂无名称"></span>
 								</p>
 								<p>
-									类型:<span
-										th:text="${redemandlist.demandTypeS}?${redemandlist.demandTypeS}:暂无分类"></span>
+									类型:<span th:text="${redemandlist.demandTypeS}?${redemandlist.demandTypeS}:暂无分类"></span>
 								</p>
-								<p>
-									预算:<span
-										th:text="${redemandlist.fixedbudget}?${redemandlist.fixedbudget}:价格面议"></span>
+								<p class="money">
+									预算:<span th:text="${redemandlist.fixedbudget}?${redemandlist.fixedbudget}:价格面议"></span>
 								</p>
+								<p th:text="${redemandlist.id}" class="demandId"></p>
+								<p th:text="${redemandlist.dataCategory}" class="demandTyp"></p>
 								<a href="#">了解详情</a>
-							</div></li>
+							</div>
+							<!-- <div class="star">
+								<p>精品:</p>
+								<ol>
+									<li></li>
+									<li></li>
+									<li></li>
+									<li></li>
+									<li></li>
+								</ol>
+							</div> -->
+							</li>
 					</ul>
 				</div>
 			</div>