浏览代码

Accept Merge Request #249 营销活动管理 : (test -> prod)

Merge Request: 营销活动管理
Created By: @浅川
Accepted By: @浅川
URL: https://coding.net/t/aft/p/AFT/git/merge/249
浅川 8 年之前
父节点
当前提交
496aea8843
共有 45 个文件被更改,包括 2407 次插入1086 次删除
  1. 11 4
      src/main/java/com/goafanti/achievement/bo/AchievementListBo.java
  2. 23 1
      src/main/java/com/goafanti/achievement/bo/AchievementOrgOwnerDetailBo.java
  3. 1 1
      src/main/java/com/goafanti/achievement/bo/InputAchievementOrder.java
  4. 2 2
      src/main/java/com/goafanti/achievement/service/AchievementService.java
  5. 14 7
      src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java
  6. 69 8
      src/main/java/com/goafanti/admin/controller/AdminAchievementApiController.java
  7. 67 9
      src/main/java/com/goafanti/admin/controller/AdminDemandApiController.java
  8. 2 1
      src/main/java/com/goafanti/common/constant/ErrorConstants.java
  9. 415 65
      src/main/java/com/goafanti/common/controller/PortalController.java
  10. 13 1
      src/main/java/com/goafanti/common/controller/WebpageController.java
  11. 1 1
      src/main/java/com/goafanti/common/dao/DemandMapper.java
  12. 33 0
      src/main/java/com/goafanti/common/dao/MarketingManagementMapper.java
  13. 91 89
      src/main/java/com/goafanti/common/enums/AttachmentType.java
  14. 26 0
      src/main/java/com/goafanti/common/enums/MarketingPage.java
  15. 83 5
      src/main/java/com/goafanti/common/mapper/AchievementMapper.xml
  16. 139 17
      src/main/java/com/goafanti/common/mapper/DemandMapper.xml
  17. 33 0
      src/main/java/com/goafanti/common/mapper/MarketingManagementMapper.xml
  18. 281 281
      src/main/java/com/goafanti/common/utils/FileUtils.java
  19. 9 1
      src/main/java/com/goafanti/demand/bo/DemandManageDetailBo.java
  20. 12 1
      src/main/java/com/goafanti/demand/bo/DemandManageListBo.java
  21. 2 2
      src/main/java/com/goafanti/demand/service/DemandService.java
  22. 17 10
      src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java
  23. 27 0
      src/main/java/com/goafanti/marketing/bo/MarketingManagementBo.java
  24. 51 0
      src/main/java/com/goafanti/marketing/service/MarketingManagementService.java
  25. 49 0
      src/main/java/com/goafanti/marketing/service/impl/MarketingManagementServiceImpl.java
  26. 10 0
      src/main/java/com/goafanti/portal/bo/AchievementPortalDetailBo.java
  27. 2 0
      src/main/java/com/goafanti/portal/controller/PortalInterestApiController.java
  28. 1 0
      src/main/java/com/goafanti/portal/controller/PortalOrderApiController.java
  29. 21 3
      src/main/java/com/goafanti/portal/controller/PortalSearchController.java
  30. 4 4
      src/main/resources/props/config_local.properties
  31. 4 4
      src/main/resources/props/config_test.properties
  32. 96 94
      src/main/resources/props/error.properties
  33. 414 325
      src/main/webapp/WEB-INF/views/common.html
  34. 60 107
      src/main/webapp/WEB-INF/views/portal/index.html
  35. 1 0
      src/main/webapp/WEB-INF/views/portal/news/newsDetail.html
  36. 3 3
      src/main/webapp/WEB-INF/views/portal/service/highTechCognizance.html
  37. 1 9
      src/main/webapp/WEB-INF/views/portal/service/propertyRight.html
  38. 6 6
      src/main/webapp/WEB-INF/views/portal/service/serviceIndex.html
  39. 6 6
      src/main/webapp/WEB-INF/views/portal/technologyTrading/achievement.html
  40. 13 2
      src/main/webapp/WEB-INF/views/portal/technologyTrading/achievementDetail.html
  41. 136 0
      src/main/webapp/WEB-INF/views/portal/technologyTrading/achievementOrder.html
  42. 6 6
      src/main/webapp/WEB-INF/views/portal/technologyTrading/demand.html
  43. 12 7
      src/main/webapp/WEB-INF/views/portal/technologyTrading/demandDetail.html
  44. 136 0
      src/main/webapp/WEB-INF/views/portal/technologyTrading/demandOrder.html
  45. 4 4
      src/main/webapp/WEB-INF/views/portal/technologyTrading/index.html

+ 11 - 4
src/main/java/com/goafanti/achievement/bo/AchievementListBo.java

@@ -116,6 +116,10 @@ public class AchievementListBo {
 	private String			transferModeS;
 	
 	private String	ownerTypeS;
+	/**
+	 * 是否展示在首页 0-否  1-是
+	 */
+	private Integer hot;
 	
 	public String getOrgId() {
 		return orgId;
@@ -334,9 +338,12 @@ public class AchievementListBo {
 	public void setOwnerTypeS(String ownerTypeS) {
 		this.ownerTypeS = ownerTypeS;
 	}
-	
-	
-	
-	
+	@JsonFormat(shape = Shape.STRING)
+	public Integer getHot() {
+		return hot;
+	}
 
+	public void setHot(Integer hot) {
+		this.hot = hot;
+	}
 }

+ 23 - 1
src/main/java/com/goafanti/achievement/bo/AchievementOrgOwnerDetailBo.java

@@ -1,5 +1,7 @@
 package com.goafanti.achievement.bo;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonFormat.Shape;
 import com.goafanti.common.model.Achievement;
 
 public class AchievementOrgOwnerDetailBo extends Achievement {
@@ -12,7 +14,11 @@ public class AchievementOrgOwnerDetailBo extends Achievement {
 	private String	iOwnerEmail;
 
 	private String	iOwnerPostalAddress;
-
+	
+	private Integer hot;
+	
+	private String coverImg;
+	
 	public String getiOwnerPostalAddress() {
 		return iOwnerPostalAddress;
 	}
@@ -52,5 +58,21 @@ public class AchievementOrgOwnerDetailBo extends Achievement {
 	public void setiOwnerEmail(String iOwnerEmail) {
 		this.iOwnerEmail = iOwnerEmail;
 	}
+	
+	@JsonFormat(shape = Shape.STRING)
+	public Integer getHot() {
+		return hot;
+	}
+
+	public void setHot(Integer hot) {
+		this.hot = hot;
+	}
 
+	public String getCoverImg() {
+		return coverImg;
+	}
+
+	public void setCoverImg(String coverImg) {
+		this.coverImg = coverImg;
+	}
 }

+ 1 - 1
src/main/java/com/goafanti/achievement/bo/InputAchievementOrder.java

@@ -7,7 +7,7 @@ import javax.validation.constraints.Size;
 import com.goafanti.common.constant.ErrorConstants;
 
 public class InputAchievementOrder {
-	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	@Size(min = 0, max = 37, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String	id;
 
 	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")

+ 2 - 2
src/main/java/com/goafanti/achievement/service/AchievementService.java

@@ -21,7 +21,7 @@ public interface AchievementService {
 
 	Pagination<AchievementListBo> listUserOwnerAchievement(String username, String ownerName, String ownerId, Integer auditStatus, Integer serialNumber,
 			String name, String keyword, Integer category, Integer status, String releaseDateStartDate,
-			String releaseDateEndDate, Integer releaseStatus, Integer pNo, Integer pSize);
+			String releaseDateEndDate, Integer releaseStatus, Integer pNo, Integer pSize,Integer boutique,Integer effective);
 
 	void saveAchievement(Achievement a, String[] keywords);
 
@@ -41,7 +41,7 @@ public interface AchievementService {
 
 	Pagination<AchievementListBo> listOrgOwnerAchievement(String unitName, String ownerName, String ownerId, Integer auditStatus, Integer serialNumber,
 			String name, String keyword, Integer category, Integer status, String releaseDateStartDate,
-			String releaseDateEndDate, Integer releaseStatus, Integer pNo, Integer pSize);
+			String releaseDateEndDate, Integer releaseStatus, Integer pNo, Integer pSize,Integer boutique,Integer hot);
 
 	AchievementUserOwnerDetailBo selectUserOwnerDetail(String id);
 

+ 14 - 7
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -92,7 +92,8 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 	@Override
 	public Pagination<AchievementListBo> listUserOwnerAchievement(String username, String ownerName, String ownerId,
 			Integer auditStatus, Integer serialNumber, String name, String keyword, Integer category, Integer status,
-			String releaseDateStartDate, String releaseDateEndDate, Integer releaseStatus, Integer pNo, Integer pSize) {
+			String releaseDateStartDate, String releaseDateEndDate, Integer releaseStatus, Integer pNo, Integer pSize
+			,Integer boutique,Integer hot) {
 		if (pNo == null || pNo < 0) {
 			pNo = 1;
 		}
@@ -103,7 +104,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		return (Pagination<AchievementListBo>) findPage("findUserOwnerAchievementListByPage",
 				"findUserOwnerAchievementCount",
 				disposeParams(username, ownerName, ownerId, auditStatus, serialNumber, name, keyword, category, status,
-						releaseDateStartDate, releaseDateEndDate, releaseStatus, UserType.PERSONAL.getCode()),
+						releaseDateStartDate, releaseDateEndDate, releaseStatus, UserType.PERSONAL.getCode(),boutique,hot),
 				pNo, pSize);
 	}
 
@@ -111,7 +112,8 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 	@Override
 	public Pagination<AchievementListBo> listOrgOwnerAchievement(String unitName, String ownerName, String ownerId,
 			Integer auditStatus, Integer serialNumber, String name, String keyword, Integer category, Integer status,
-			String releaseDateStartDate, String releaseDateEndDate, Integer releaseStatus, Integer pNo, Integer pSize) {
+			String releaseDateStartDate, String releaseDateEndDate, Integer releaseStatus, Integer pNo, Integer pSize,
+			Integer boutique,Integer hot) {
 		if (pNo == null || pNo < 0) {
 			pNo = 1;
 		}
@@ -122,7 +124,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		return (Pagination<AchievementListBo>) findPage("findOrgOwnerAchievementListByPage",
 				"findOrgOwnerAchievementCount",
 				disposeParams(unitName, ownerName, ownerId, auditStatus, serialNumber, name, keyword, category, status,
-						releaseDateStartDate, releaseDateEndDate, releaseStatus, UserType.ORGANIZATION.getCode()),
+						releaseDateStartDate, releaseDateEndDate, releaseStatus, UserType.ORGANIZATION.getCode(),boutique,hot),
 				pNo, pSize);
 	}
 
@@ -204,13 +206,13 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		}
 		return (Pagination<AchievementListBo>) findPage("findAchievementListByPage",
 				"findAchievementCount", disposeParams(null, null, TokenManager.getUserId(), auditStatus, serialNumber,
-						name, keyword, category, status, releaseDateStartDate, releaseDateEndDate, releaseStatus, null),
+						name, keyword, category, status, releaseDateStartDate, releaseDateEndDate, releaseStatus, null,null,null),
 				pNo, pSize);
 	}
 
 	private Map<String, Object> disposeParams(String username, String ownerName, String ownerId, Integer auditStatus,
 			Integer serialNumber, String name, String keyword, Integer category, Integer status,
-			String releaseDateStartDate, String releaseDateEndDate, Integer releaseStatus, Integer type) {
+			String releaseDateStartDate, String releaseDateEndDate, Integer releaseStatus, Integer type,Integer boutique,Integer hot) {
 		Map<String, Object> params = new HashMap<>();
 
 		Date rStart = null;
@@ -281,7 +283,12 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		if (null != releaseStatus) {
 			params.put("releaseStatus", releaseStatus);
 		}
-
+		if (null != boutique){
+			params.put("boutique", boutique);
+		}
+		if(null != hot){
+			params.put("hot", hot);
+		}
 		if (TokenManager.hasRole(AFTConstants.TECHBROKER)) {
 			params.put("techBrokerId", TokenManager.getAdminId());
 		}

+ 69 - 8
src/main/java/com/goafanti/admin/controller/AdminAchievementApiController.java

@@ -34,12 +34,15 @@ import com.goafanti.common.enums.AchievementReleaseStatus;
 import com.goafanti.common.enums.AchievementSwitchSign;
 import com.goafanti.common.enums.AttachmentType;
 import com.goafanti.common.enums.DeleteStatus;
+import com.goafanti.common.enums.MarketingPage;
 import com.goafanti.common.model.Achievement;
 import com.goafanti.common.model.AchievementOrder;
 import com.goafanti.common.model.AftFile;
+import com.goafanti.common.model.MarketingManagement;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.marketing.service.MarketingManagementService;
 import com.goafanti.user.service.UserService;
 @RestController
 @RequestMapping(value = "/api/admin/achievement")
@@ -52,6 +55,8 @@ public class AdminAchievementApiController extends CertifyApiController {
     private AftFileService			aftFileService;
     @Resource
     private AchievementOrderService	achievementOrderService;
+    @Resource
+    private MarketingManagementService marketingManagementService;
     /**
      * 个人成果列表
      */
@@ -59,7 +64,7 @@ public class AdminAchievementApiController extends CertifyApiController {
     private Result userList(String username, String ownerName, String ownerId, Integer auditStatus,
             Integer serialNumber, String name, String keyword, Integer category, Integer status,
             String releaseDateStartDate, String releaseDateEndDate, Integer releaseStatus, String pageNo,
-            String pageSize) {
+            String pageSize,Integer boutique,Integer hot) {
         Result res = new Result();
         Integer pNo = 1;
         Integer pSize = 10;
@@ -70,7 +75,7 @@ public class AdminAchievementApiController extends CertifyApiController {
             pNo = Integer.parseInt(pageNo);
         }
         res.setData(achievementService.listUserOwnerAchievement(username, ownerName, ownerId, auditStatus, serialNumber, name,
-                keyword, category, status, releaseDateStartDate, releaseDateEndDate, releaseStatus, pNo, pSize));
+                keyword, category, status, releaseDateStartDate, releaseDateEndDate, releaseStatus, pNo, pSize,boutique,hot));
         return res;
     }
     /**
@@ -79,7 +84,7 @@ public class AdminAchievementApiController extends CertifyApiController {
     @RequestMapping(value = "/orgList", method = RequestMethod.GET)
     private Result orgList(String unitName, String ownerName, String ownerId, Integer auditStatus, Integer serialNumber, String name,
             String keyword, Integer category, Integer status, String releaseDateStartDate, String releaseDateEndDate,
-            Integer releaseStatus, String pageNo, String pageSize) {
+            Integer releaseStatus, String pageNo, String pageSize,Integer boutique,Integer hot) {
         Result res = new Result();
         Integer pNo = 1;
         Integer pSize = 10;
@@ -90,7 +95,7 @@ public class AdminAchievementApiController extends CertifyApiController {
             pNo = Integer.parseInt(pageNo);
         }
         res.setData(achievementService.listOrgOwnerAchievement(unitName, ownerName, ownerId, auditStatus, serialNumber, name,
-                keyword, category, status, releaseDateStartDate, releaseDateEndDate, releaseStatus, pNo, pSize));
+                keyword, category, status, releaseDateStartDate, releaseDateEndDate, releaseStatus, pNo, pSize,boutique,hot));
         return res;
     }
     /**
@@ -148,7 +153,7 @@ public class AdminAchievementApiController extends CertifyApiController {
      */
     @RequestMapping(value = "/apply", method = RequestMethod.POST)
     private Result apply(@Valid InputAchievement ia, BindingResult bindingResult,
-            @RequestParam(name = "keywords[]", required = false) String[] keywords) {
+            @RequestParam(name = "keywords[]", required = false) String[] keywords,String coverImg,Integer hot) {
         Result res = new Result();
         if (bindingResult.hasErrors()) {
             res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
@@ -166,6 +171,22 @@ public class AdminAchievementApiController extends CertifyApiController {
         Achievement a = new Achievement();
         BeanUtils.copyProperties(ia, a);
         achievementService.saveAchievement(a, keywords);
+        if(null != hot && hot == 1){ //属于营销活动
+        	int marketHisCount = marketingManagementService.getMarketingCount(
+        			MarketingPage.mainAchievement.getPageUrl(), MarketingPage.mainAchievement.getBoothType(),1);
+        	if(marketHisCount >= MarketingPage.mainAchievement.getBoothSize()) { //展位已满
+        		 res.getError().add(buildError(ErrorConstants.MARKET_BOOTH_MAX, "",marketHisCount));
+        		 return res;
+        	}else{ //保存营销记录
+        		MarketingManagement mm = new MarketingManagement();
+        		mm.setShowPage(MarketingPage.mainAchievement.getPageUrl()); //营销页面
+        		mm.setCategory(MarketingPage.mainAchievement.getBoothType()); //营销分类
+            	if(StringUtils.isNotBlank(coverImg)) mm.setCoverImg(coverImg);
+            	mm.setProductId(a.getId());
+            	mm.setEffective(1);
+        		marketingManagementService.save(mm);
+        	}    	
+        }      
         return res;
     }
     /**
@@ -173,7 +194,7 @@ public class AdminAchievementApiController extends CertifyApiController {
      */
     @RequestMapping(value = "/update", method = RequestMethod.POST)
     public Result update(@Valid InputAchievement ia, BindingResult bindingResult, Integer switchSign,
-            @RequestParam(name = "keywords[]", required = false) String[] keywords) {
+            @RequestParam(name = "keywords[]", required = false) String[] keywords,String coverImg,Integer hot) {
         Result res = new Result();
         if (bindingResult.hasErrors()) {
             res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
@@ -210,7 +231,45 @@ public class AdminAchievementApiController extends CertifyApiController {
         Achievement a = new Achievement();
         BeanUtils.copyProperties(ia, a);
         achievementService.updateAchievement(a, keywords, switchSign);
-        return res;
+        //更新营销活动
+       MarketingManagement mm = marketingManagementService.selectMarket(
+    		   MarketingPage.mainAchievement.getPageUrl(), MarketingPage.mainAchievement.getBoothType(), a.getId());
+       if (null != mm) {
+			if(mm.getEffective() == 1){ //原本属于营销有效
+				if (null != coverImg) mm.setCoverImg(coverImg);
+				if (null != hot) mm.setEffective(hot);
+				marketingManagementService.update(mm);
+			}else if(mm.getEffective() == 0){ //原本属于营销无效
+				int marketHisCount = marketingManagementService.getMarketingCount(
+						MarketingPage.mainAchievement.getPageUrl(), MarketingPage.mainAchievement.getBoothType(), 1);
+				if (marketHisCount >= MarketingPage.mainAchievement.getBoothSize()) { // 展位已满
+					res.getError().add(buildError(ErrorConstants.MARKET_BOOTH_MAX,"", marketHisCount));
+					return res;
+				}else{
+					if (null != hot) mm.setEffective(hot);
+					if (null != coverImg) mm.setCoverImg(coverImg);
+					marketingManagementService.update(mm);
+				}
+			}
+		}else{
+    	   if(null != hot && hot == 1){ //属于营销活动
+           	int marketHisCount = marketingManagementService.getMarketingCount(
+           			MarketingPage.mainAchievement.getPageUrl(), MarketingPage.mainAchievement.getBoothType(),1);
+           	if(marketHisCount >= MarketingPage.mainAchievement.getBoothSize()) { //展位已满
+           		 res.getError().add(buildError(ErrorConstants.MARKET_BOOTH_MAX, "",marketHisCount));
+           		 return res;
+           	}else{ //保存营销记录
+           		mm = new MarketingManagement();
+           		mm.setShowPage(MarketingPage.mainAchievement.getPageUrl()); //营销页面
+           		mm.setCategory(MarketingPage.mainAchievement.getBoothType()); //营销分类
+               	if(StringUtils.isNotBlank(coverImg)) mm.setCoverImg(coverImg);
+               	mm.setProductId(a.getId());
+               	mm.setEffective(1);
+           		marketingManagementService.save(mm);
+           	}    	
+           } 
+       }    
+       return res;
     }
     /**
      * 科技成果匹配科技需求
@@ -399,7 +458,8 @@ public class AdminAchievementApiController extends CertifyApiController {
         Result res = new Result();
         AttachmentType attachmentType = AttachmentType.getField(sign);
         if (attachmentType == AttachmentType.ACHIEVEMENT_TECHNICAL_PICTURE
-                || attachmentType == AttachmentType.ACHIEVEMENT_MATURITY_PICTURE) {
+                || attachmentType == AttachmentType.ACHIEVEMENT_MATURITY_PICTURE
+                || attachmentType == AttachmentType.ACHIEVEMENT_COVER_PICTURE) {
             res.setData(handleFiles(res, "/achievement/", false, req, sign, "achievement"));
         } else {
             res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
@@ -422,6 +482,7 @@ public class AdminAchievementApiController extends CertifyApiController {
                     return res;
                 }
             }
+            marketingManagementService.deleteByProductId(Arrays.asList(ids));
             res.setData(achievementService.deleteByPrimaryKey(Arrays.asList(ids)));
         }
         return res;

+ 67 - 9
src/main/java/com/goafanti/admin/controller/AdminDemandApiController.java

@@ -36,9 +36,11 @@ import com.goafanti.common.enums.DemandImportFields;
 import com.goafanti.common.enums.DemandOrderStatus;
 import com.goafanti.common.enums.DemandReleaseStatus;
 import com.goafanti.common.enums.DemandSwitchSign;
+import com.goafanti.common.enums.MarketingPage;
 import com.goafanti.common.model.AftFile;
 import com.goafanti.common.model.Demand;
 import com.goafanti.common.model.DemandOrder;
+import com.goafanti.common.model.MarketingManagement;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.shiro.token.TokenManager;
@@ -46,6 +48,7 @@ import com.goafanti.demand.bo.DemandImportBo;
 import com.goafanti.demand.bo.InputDemand;
 import com.goafanti.demand.service.DemandOrderService;
 import com.goafanti.demand.service.DemandService;
+import com.goafanti.marketing.service.MarketingManagementService;
 import com.goafanti.user.service.UserService;
 
 @RestController
@@ -59,7 +62,8 @@ public class AdminDemandApiController extends CertifyApiController {
 	private AftFileService		aftFileService;
 	@Resource
 	private DemandOrderService	demandOrderService;
-
+	@Resource
+    private MarketingManagementService marketingManagementService;
 	/**
 	 * 科技需求匹配科技成果
 	 */
@@ -192,7 +196,7 @@ public class AdminDemandApiController extends CertifyApiController {
 	public Result userList(String employerName, Integer auditStatus, Integer province, Integer serialNumber, String name, String keyword,
 			Integer infoSources, Integer demandType, String validityPeriodStartDate, String validityPeriodEndDate,
 			String username, Integer status, Integer releaseStatus, String releaseDateStartDate,
-			String releaseDateEndDate, String pageNo, String pageSize) {
+			String releaseDateEndDate, String pageNo, String pageSize,Integer boutique,Integer hot) {
 		Result res = new Result();
 		Integer pNo = 1;
 		Integer pSize = 10;
@@ -205,7 +209,7 @@ public class AdminDemandApiController extends CertifyApiController {
 		}
 		res.setData(demandService.selectUserDemandManageList(employerName, auditStatus, province, serialNumber, name, keyword,
 				infoSources, demandType, validityPeriodStartDate, validityPeriodEndDate, username, status,
-				releaseStatus, releaseDateStartDate, releaseDateEndDate, pNo, pSize));
+				releaseStatus, releaseDateStartDate, releaseDateEndDate, pNo, pSize,boutique,hot));
 		return res;
 	}
 
@@ -216,7 +220,7 @@ public class AdminDemandApiController extends CertifyApiController {
 	public Result orgList(String employerName, Integer auditStatus, Integer province, Integer serialNumber, String name, String keyword,
 			Integer infoSources, Integer demandType, String validityPeriodStartDate, String validityPeriodEndDate,
 			String unitName, Integer status, Integer releaseStatus, String releaseDateStartDate,
-			String releaseDateEndDate, String pageNo, String pageSize) {
+			String releaseDateEndDate, String pageNo, String pageSize,Integer boutique,Integer hot) {
 		Result res = new Result();
 		Integer pNo = 1;
 		Integer pSize = 10;
@@ -229,7 +233,7 @@ public class AdminDemandApiController extends CertifyApiController {
 		}
 		res.setData(demandService.selectOrgDemandManageList(employerName, auditStatus, province, serialNumber, name, keyword,
 				infoSources, demandType, validityPeriodStartDate, validityPeriodEndDate, unitName, status,
-				releaseStatus, releaseDateStartDate, releaseDateEndDate, pNo, pSize));
+				releaseStatus, releaseDateStartDate, releaseDateEndDate, pNo, pSize,boutique,hot));
 		return res;
 	}
 
@@ -239,7 +243,7 @@ public class AdminDemandApiController extends CertifyApiController {
 	@RequestMapping(value = "/apply", method = RequestMethod.POST)
 	public Result userApply(@Valid InputDemand demand, BindingResult bindingResult,
 			@RequestParam(name = "keywords[]", required = false) String[] keywords,
-			String validityPeriodFormattedDate) {
+			String validityPeriodFormattedDate,String coverImg,Integer hot) {
 		Result res = new Result();
 		if (bindingResult.hasErrors()) {
 			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
@@ -256,10 +260,25 @@ public class AdminDemandApiController extends CertifyApiController {
 		if (!res.getError().isEmpty()) {
 			return res;
 		}
-
 		Demand d = new Demand();
 		BeanUtils.copyProperties(demand, d);
 		demandService.saveUserDemand(d, validityPeriodFormattedDate, keywords);
+		if (null != hot && hot == 1) { // 属于营销活动
+			int marketHisCount = marketingManagementService.getMarketingCount(MarketingPage.mainDemand.getPageUrl(),
+					MarketingPage.mainDemand.getBoothType(), 1);
+			if (marketHisCount >= MarketingPage.mainDemand.getBoothSize()) { // 展位已满
+				res.getError().add(buildError(ErrorConstants.MARKET_BOOTH_MAX, "",marketHisCount));
+				return res;
+			} else { // 保存营销记录
+				MarketingManagement mm = new MarketingManagement();
+				mm.setShowPage(MarketingPage.mainDemand.getPageUrl()); // 营销页面
+				mm.setCategory(MarketingPage.mainDemand.getBoothType()); // 营销分类
+				if (StringUtils.isNotBlank(coverImg)) mm.setCoverImg(coverImg);
+				mm.setProductId(d.getId());
+				mm.setEffective(1);
+				marketingManagementService.save(mm);
+			}
+		}
 		return res;
 	}
 
@@ -328,7 +347,7 @@ public class AdminDemandApiController extends CertifyApiController {
 
 		AttachmentType attachmentType = AttachmentType.getField(sign);
 
-		if (attachmentType == AttachmentType.DEMAND_PICTURE) {
+		if (attachmentType == AttachmentType.DEMAND_PICTURE|| attachmentType == AttachmentType.DEMAND_COVER_PICTURE) {
 			res.setData(handleFiles(res, "/demand/", false, req, sign, uid));
 		} else {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
@@ -365,7 +384,7 @@ public class AdminDemandApiController extends CertifyApiController {
 	@RequestMapping(value = "/update", method = RequestMethod.POST)
 	public Result updateUser(@Valid InputDemand demand, BindingResult bindingResult, Integer switchSign,
 			@RequestParam(name = "keywords[]", required = false) String[] keywords,
-			String validityPeriodFormattedDate) {
+			String validityPeriodFormattedDate,String coverImg,Integer hot) {
 		Result res = new Result();
 		if (bindingResult.hasErrors()) {
 			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
@@ -404,6 +423,44 @@ public class AdminDemandApiController extends CertifyApiController {
 		Demand d = new Demand();
 		BeanUtils.copyProperties(demand, d);
 		res.setData(demandService.updateUserDemand(d, validityPeriodFormattedDate, keywords, switchSign));
+		// 更新营销活动
+		MarketingManagement mm = marketingManagementService.selectMarket(MarketingPage.mainDemand.getPageUrl(),
+				MarketingPage.mainDemand.getBoothType(), d.getId());
+		if (null != mm) {
+			if(mm.getEffective() == 1){
+				if (null != coverImg) mm.setCoverImg(coverImg);
+				if (null != hot) mm.setEffective(hot);
+				marketingManagementService.update(mm);
+			}else if(mm.getEffective() == 0){
+				int marketHisCount = marketingManagementService.getMarketingCount(
+						MarketingPage.mainDemand.getPageUrl(), MarketingPage.mainDemand.getBoothType(), 1);
+				if (marketHisCount >= MarketingPage.mainDemand.getBoothSize()) { // 展位已满
+					res.getError().add(buildError(ErrorConstants.MARKET_BOOTH_MAX,"", marketHisCount));
+					return res;
+				}else{
+					if (null != hot) mm.setEffective(hot);
+					if (null != coverImg) mm.setCoverImg(coverImg);
+					marketingManagementService.update(mm);
+				}
+			}
+		} else {
+			if (null != hot && hot == 1) { // 属于营销活动
+				int marketHisCount = marketingManagementService.getMarketingCount(
+						MarketingPage.mainDemand.getPageUrl(), MarketingPage.mainDemand.getBoothType(), 1);
+				if (marketHisCount >= MarketingPage.mainDemand.getBoothSize()) { // 展位已满
+					res.getError().add(buildError(ErrorConstants.MARKET_BOOTH_MAX,"", marketHisCount));
+					return res;
+				} else { // 保存营销记录
+					mm = new MarketingManagement();
+					mm.setShowPage(MarketingPage.mainDemand.getPageUrl()); // 营销页面
+					mm.setCategory(MarketingPage.mainDemand.getBoothType()); // 营销分类
+					if (StringUtils.isNotBlank(coverImg)) mm.setCoverImg(coverImg);
+					mm.setProductId(d.getId());
+					mm.setEffective(1);
+					marketingManagementService.save(mm);
+				}
+			}
+		}		
 		return res;
 	}
 
@@ -467,6 +524,7 @@ public class AdminDemandApiController extends CertifyApiController {
 					return res;
 				}
 			}
+			marketingManagementService.deleteByProductId(Arrays.asList(ids));
 			res.setData(demandService.deleteByPrimaryKey(Arrays.asList(ids)));
 		}
 		return res;

+ 2 - 1
src/main/java/com/goafanti/common/constant/ErrorConstants.java

@@ -103,5 +103,6 @@ public class ErrorConstants {
 	public static final String	WRONG_MONEY							= "WRONG_MONEY";
 
 	public static final String	M_CODE_ERROR						= "M_CODE_ERROR";
-
+	
+	public static final String MARKET_BOOTH_MAX						= "MARKET_BOOTH_MAX";				
 }

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

@@ -35,23 +35,23 @@ import com.goafanti.portal.bo.DemandPortalSimilarListBo;
 @Controller
 public class PortalController extends BaseController {
 	@Resource
-	private  FieldGlossoryService glossoryService;
+	private FieldGlossoryService glossoryService;
 	@Resource
-	private AchievementService		achievementService;
+	private AchievementService achievementService;
 	@Resource
-	private DemandService			demandService;
+	private DemandService demandService;
 	@Resource
-	private FieldGlossoryService	fieldGlossoryService;
+	private FieldGlossoryService fieldGlossoryService;
 
-	private static final String		UNIT				= "万元";
+	private static final String UNIT = "万元";
 
-	private static final int		MULTIPLE			= 20;
+	private static final int MULTIPLE = 20;
 
-	private static final String		DELIMITER			= "/";
+	private static final String DELIMITER = "/";
 
-	private static final String		PRICE_NEGOTIABLE	= "价格面议";
+	private static final String PRICE_NEGOTIABLE = "价格面议";
 
-	private static final String		UNCERTIFY			= "未认证";
+	private static final String UNCERTIFY = "未认证";
 
 	@RequestMapping(value = "/index", method = RequestMethod.GET)
 	public ModelAndView index(HttpServletRequest request, ModelAndView modelview) {
@@ -124,17 +124,15 @@ public class PortalController extends BaseController {
 			demand.setLocation((StringUtils.isBlank(demand.getProvince()) ? "" : demand.getProvince())
 					+ (StringUtils.isBlank(demand.getCity()) ? "" : demand.getCity()));
 		}
-		
-		
-			String demandpic=demand.getPictureUrl();//在存在多张图片的情况下,暂时先取第一张
-			if(null!= demandpic) {
-				boolean hascomma = demandpic.contains(",");
-				if(hascomma) {
-					String[] picurl = demandpic.split(",");
-					demand.setPictureUrl(picurl[0]);
-				}
+
+		String demandpic = demand.getPictureUrl();// 在存在多张图片的情况下,暂时先取第一张
+		if (null != demandpic) {
+			boolean hascomma = demandpic.contains(",");
+			if (hascomma) {
+				String[] picurl = demandpic.split(",");
+				demand.setPictureUrl(picurl[0]);
 			}
-		
+		}
 
 		/*--------------查询精品需求---------------*/
 		List<DemandListBo> boutiquedemand = demandService.selectDemandList(1);
@@ -146,19 +144,20 @@ public class PortalController extends BaseController {
 			reboutiquedemand.add(boutiquedemand.get(index + 2));
 		} else {
 			reboutiquedemand.addAll(boutiquedemand);
-		};
-		
+		}
+		;
+
 		for (int i = 0; i < reboutiquedemand.size(); i++) {
-			String pic=reboutiquedemand.get(i).getPictureUrl();//在存在多张图片的情况下,暂时先取第一张
-			if(null!= pic) {
+			String pic = reboutiquedemand.get(i).getPictureUrl();// 在存在多张图片的情况下,暂时先取第一张
+			if (null != pic) {
 				boolean hascomma = pic.contains(",");
-				if(hascomma) {
+				if (hascomma) {
 					String[] picurl = pic.split(",");
 					reboutiquedemand.get(i).setPictureUrl(picurl[0]);
 				}
 			}
-		};
-		
+		}
+		;
 
 		// 判断登录没登录. 登录了.查找用户喜欢的. 没登录就随机查四个.
 		boolean isLogin = TokenManager.isLogin();
@@ -166,7 +165,7 @@ public class PortalController extends BaseController {
 		List<DemandListBo> redemandlist = new ArrayList<DemandListBo>();
 
 		if (demandlist.size() >= 5) {
-			int idx =  new Random().nextInt(demandlist.size() - 4);
+			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));
@@ -204,18 +203,20 @@ public class PortalController extends BaseController {
 					redemandlist.get(i).setDemandTypeS("技术人才型需求");
 				}
 			}
-		};
-		
+		}
+		;
+
 		for (int i = 0; i < redemandlist.size(); i++) {
-			String pic=redemandlist.get(i).getPictureUrl();//在存在多张图片的情况下,暂时先取第一张
-			if(null!= pic) {
+			String pic = redemandlist.get(i).getPictureUrl();// 在存在多张图片的情况下,暂时先取第一张
+			if (null != pic) {
 				boolean hascomma = pic.contains(",");
-				if(hascomma) {
+				if (hascomma) {
 					String[] picurl = pic.split(",");
 					redemandlist.get(i).setPictureUrl(picurl[0]);
 				}
 			}
-		};
+		}
+		;
 
 		mv.setViewName("/portal/technologyTrading/demandDetail");
 		mv.addObject("demand", demand);
@@ -238,22 +239,24 @@ public class PortalController extends BaseController {
 			achievementdetail = achievementService.findOrgPortalAchievementDetail(id);
 		}
 		if (null != achievementdetail) {
-
+			achievementdetail.setId(id);
+			achievementdetail.setOwnerType(String.valueOf(type));
+			System.out.println(achievementdetail.getOwnerType());
 			Integer category = achievementdetail.getCategory();
 			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("非标");
 				}
 
@@ -341,17 +344,16 @@ public class PortalController extends BaseController {
 					achievementdetail.setMaturityS(AchievementMaturity.MASSPRODUCTION.getDesc());
 				}
 			}
-			
-			String pic=achievementdetail.getTechnicalPictureUrl();//在存在多张图片的情况下,暂时先取第一张
-			if(null!= pic) {
+
+			String pic = achievementdetail.getTechnicalPictureUrl();// 在存在多张图片的情况下,暂时先取第一张
+			if (null != pic) {
 				boolean hascomma = pic.contains(",");
-				if(hascomma) {
+				if (hascomma) {
 					String[] picurl = pic.split(",");
 					achievementdetail.setTechnicalPictureUrl(picurl[0]);
 				}
 			}
-			
-			
+
 			String location = "";
 			String province = achievementdetail.getProvince();
 			String city = achievementdetail.getCity();
@@ -367,7 +369,7 @@ public class PortalController extends BaseController {
 					achievementdetail.setTransferPriceS(PRICE_NEGOTIABLE);
 				}
 			}
-			
+
 			achievementdetail.setLocation(location);
 
 		}
@@ -376,26 +378,26 @@ public class PortalController extends BaseController {
 		List<AchievementListBo> boutiqueachievement = achievementService.getAchievement(1);
 		List<AchievementListBo> reboutiqueachievement = new ArrayList<AchievementListBo>();
 		if (boutiqueachievement.size() >= 4) {
-			int index =  new Random().nextInt(boutiqueachievement.size() - 3);
+			int index = new Random().nextInt(boutiqueachievement.size() - 3);
 			reboutiqueachievement.add(boutiqueachievement.get(index));
 			reboutiqueachievement.add(boutiqueachievement.get(index + 1));
 			reboutiqueachievement.add(boutiqueachievement.get(index + 2));
 		} else {
 			reboutiqueachievement.addAll(boutiqueachievement);
-		};
-		
+		}
+		;
+
 		for (int i = 0; i < boutiqueachievement.size(); i++) {
-			String pic=boutiqueachievement.get(i).getTechnicalpictureurl();//在存在多张图片的情况下,暂时先取第一张
-			if(null!= pic) {
+			String pic = boutiqueachievement.get(i).getTechnicalpictureurl();// 在存在多张图片的情况下,暂时先取第一张
+			if (null != pic) {
 				boolean hascomma = pic.contains(",");
-				if(hascomma) {
+				if (hascomma) {
 					String[] picurl = pic.split(",");
 					boutiqueachievement.get(i).setTechnicalpictureurl(picurl[0]);
 				}
 			}
-		};
-		
-		
+		}
+		;
 
 		// 判断登录没登录. 登录了.查找用户喜欢的. 没登录就随机查四个.
 		boolean isLogin = TokenManager.isLogin();
@@ -403,7 +405,7 @@ public class PortalController extends BaseController {
 		List<AchievementListBo> reachievementlist = new ArrayList<AchievementListBo>();
 
 		if (achievementlist.size() >= 5) {
-			int idx =  new Random().nextInt(achievementlist.size() - 4);
+			int idx = new Random().nextInt(achievementlist.size() - 4);
 			reachievementlist.add(achievementlist.get(idx));
 			reachievementlist.add(achievementlist.get(idx + 1));
 			reachievementlist.add(achievementlist.get(idx + 2));
@@ -432,7 +434,7 @@ public class PortalController extends BaseController {
 			Integer fieldA = reachievementlist.get(i).getFieldA();
 			String field = "";
 			boolean a = Boolean.FALSE;
-			if (null != fieldA && null !=achievementdetail ) {
+			if (null != fieldA && null != achievementdetail) {
 				List<AchievementPortalSimilarListBo> similarList = achievementService.findByFieldA(fieldA,
 						achievementdetail.getId(), type);
 				if (!similarList.isEmpty()) {
@@ -457,7 +459,7 @@ public class PortalController extends BaseController {
 				if (StringUtils.isNotBlank(reachievementlist.get(i).getFieldAS())) {
 					a = Boolean.TRUE;
 				}
-				
+
 				String fieldAs = glossoryService.getName(fieldA);
 				reachievementlist.get(i).setFieldAS(fieldAs);
 			}
@@ -501,17 +503,17 @@ public class PortalController extends BaseController {
 				} else if (AchievementMaturity.MASSPRODUCTION.getCode().equals(maturity)) {
 					reachievementlist.get(i).setMaturityS(AchievementMaturity.MASSPRODUCTION.getDesc());
 				}
-			};
-			
-			String pic=reachievementlist.get(i).getTechnicalpictureurl();//在存在多张图片的情况下,暂时先取第一张
-			if(null!= pic) {
+			}
+			;
+
+			String pic = reachievementlist.get(i).getTechnicalpictureurl();// 在存在多张图片的情况下,暂时先取第一张
+			if (null != pic) {
 				boolean hascomma = pic.contains(",");
-				if(hascomma) {
+				if (hascomma) {
 					String[] picurl = pic.split(",");
 					reachievementlist.get(i).setTechnicalpictureurl(picurl[0]);
 				}
 			}
-			
 
 		}
 
@@ -522,4 +524,352 @@ public class PortalController extends BaseController {
 		return mv;
 	}
 
+	/**
+	 * 订单确认页(成果专利)
+	 */
+	@RequestMapping(value = "/portal/technologyTrading/achievementOrder", method = RequestMethod.GET)
+	public ModelAndView portalAchievementOrder(String id, Integer type) {
+		ModelAndView mv = new ModelAndView();
+		AchievementPortalDetailBo achievementdetail = null;
+		achievementdetail = achievementService.findUserPortalAchievementDetail(id);
+		if (null != achievementdetail) {
+			achievementdetail.setId(id);
+			achievementdetail.setOwnerType(String.valueOf(type));
+			System.out.println(achievementdetail.getOwnerType());
+			Integer category = achievementdetail.getCategory();
+			if (null != category) {
+				if (category == 0) {
+					achievementdetail.setCategoryS("专利");
+				} else if (category == 1) {
+					achievementdetail.setCategoryS("软著");
+				} else if (category == 2) {
+					achievementdetail.setCategoryS("项目");
+				} else if (category == 3) {
+					achievementdetail.setCategoryS("版权");
+				} else if (category == 4) {
+					achievementdetail.setCategoryS("工业设计");
+				} else if (category == 5) {
+					achievementdetail.setCategoryS("配方");
+				} else if (category == 6) {
+					achievementdetail.setCategoryS("非标");
+				}
+
+			}
+			;
+
+			Integer transfermode = achievementdetail.getTransferMode();
+			if (null != transfermode) {
+				if (AchievementTransferMode.FULLTRANSFER.getCode().equals(transfermode)) {
+					achievementdetail.setTransferModeS(AchievementTransferMode.FULLTRANSFER.getDesc());
+				} else if (AchievementTransferMode.PERMISSIONTRANSFER.getCode().equals(transfermode)) {
+					achievementdetail.setTransferModeS(AchievementTransferMode.PERMISSIONTRANSFER.getDesc());
+				} else if (AchievementTransferMode.TECHNOLOGYSHARES.getCode().equals(transfermode)) {
+					achievementdetail.setTransferModeS(AchievementTransferMode.TECHNOLOGYSHARES.getDesc());
+				} else if (AchievementTransferMode.EXCLUSIVETECHNOLOGYSHARES.getCode().equals(transfermode)) {
+					achievementdetail.setTransferModeS(AchievementTransferMode.EXCLUSIVETECHNOLOGYSHARES.getDesc());
+				}
+			}
+
+		}
+
+		// 查询精品成果
+		List<AchievementListBo> boutiqueachievement = achievementService.getAchievement(1);
+		List<AchievementListBo> reboutiqueachievement = new ArrayList<AchievementListBo>();
+		if (boutiqueachievement.size() >= 4) {
+			int index = new Random().nextInt(boutiqueachievement.size() - 3);
+			reboutiqueachievement.add(boutiqueachievement.get(index));
+			reboutiqueachievement.add(boutiqueachievement.get(index + 1));
+			reboutiqueachievement.add(boutiqueachievement.get(index + 2));
+		} else {
+			reboutiqueachievement.addAll(boutiqueachievement);
+		}
+		;
+
+		for (int i = 0; i < boutiqueachievement.size(); i++) {
+			String pic = boutiqueachievement.get(i).getTechnicalpictureurl();// 在存在多张图片的情况下,暂时先取第一张
+			if (null != pic) {
+				boolean hascomma = pic.contains(",");
+				if (hascomma) {
+					String[] picurl = pic.split(",");
+					boutiqueachievement.get(i).setTechnicalpictureurl(picurl[0]);
+				}
+			}
+		}
+		;
+
+		// 判断登录没登录. 登录了.查找用户喜欢的. 没登录就随机查四个.
+		boolean isLogin = TokenManager.isLogin();
+		List<AchievementListBo> achievementlist = achievementService.getAchievement(0);// 查询所有专利
+		List<AchievementListBo> reachievementlist = new ArrayList<AchievementListBo>();
+
+		if (achievementlist.size() >= 5) {
+			int idx = new Random().nextInt(achievementlist.size() - 4);
+			reachievementlist.add(achievementlist.get(idx));
+			reachievementlist.add(achievementlist.get(idx + 1));
+			reachievementlist.add(achievementlist.get(idx + 2));
+			reachievementlist.add(achievementlist.get(idx + 3));
+		} else {
+			reachievementlist.addAll(achievementlist);
+		}
+
+		if (isLogin) {
+			List<AchievementListBo> customerlikelist = achievementService.getPerhapLike();// 猜你喜欢专利
+			int size;
+			if (customerlikelist.size() < reachievementlist.size()) {
+				size = customerlikelist.size();
+			} else {
+				size = reachievementlist.size();
+			}
+
+			for (int i = 0; i < size; i++) {
+				reachievementlist.set(i, customerlikelist.get(i));
+			}
+		}
+
+		/*----------------------------------------------------------*/
+
+		for (int i = 0; i < reachievementlist.size(); i++) {
+			Integer fieldA = reachievementlist.get(i).getFieldA();
+			String field = "";
+			boolean a = Boolean.FALSE;
+			if (null != fieldA && null != achievementdetail) {
+				List<AchievementPortalSimilarListBo> similarList = achievementService.findByFieldA(fieldA,
+						achievementdetail.getId(), type);
+				if (!similarList.isEmpty()) {
+					for (AchievementPortalSimilarListBo bo : similarList) {
+						if (null != bo.getMaturity()) {
+							bo.setMaturityS(bo.getMaturity() * MULTIPLE + "%");
+						}
+
+						if (null == bo.getBargainingMode()
+								|| AchievementBargainingMode.NEGOTIABLE.getCode().equals(bo.getBargainingMode())) {
+							bo.setTransferPriceS(PRICE_NEGOTIABLE);
+						} else {
+							if (null != bo.getTransferPrice() && bo.getTransferPrice().compareTo(BigDecimal.ZERO) > 0) {
+								bo.setTransferPriceS(bo.getTransferPrice() + UNIT);
+							} else {
+								bo.setTransferPriceS(PRICE_NEGOTIABLE);
+							}
+						}
+					}
+				}
+				mv.addObject("similarList", similarList);
+				if (StringUtils.isNotBlank(reachievementlist.get(i).getFieldAS())) {
+					a = Boolean.TRUE;
+				}
+
+				String fieldAs = glossoryService.getName(fieldA);
+				reachievementlist.get(i).setFieldAS(fieldAs);
+			}
+
+			field += (a ? reachievementlist.get(i).getFieldAS() : "");
+			reachievementlist.get(i).setField(field);
+
+			Integer ownertyp = reachievementlist.get(i).getOwnerType();
+			if (null != ownertyp) {
+				if (ownertyp == 0) {
+					reachievementlist.get(i).setOwnerTypeS("个人所有");
+				} else if (ownertyp == 1) {
+					reachievementlist.get(i).setOwnerTypeS("组织所有");
+				}
+			}
+
+			Integer transfermode = reachievementlist.get(i).getTransferMode();
+			if (null != transfermode) {
+				if (AchievementTransferMode.FULLTRANSFER.getCode().equals(transfermode)) {
+					reachievementlist.get(i).setTransferModeS(AchievementTransferMode.FULLTRANSFER.getDesc());
+				} else if (AchievementTransferMode.PERMISSIONTRANSFER.getCode().equals(transfermode)) {
+					reachievementlist.get(i).setTransferModeS(AchievementTransferMode.PERMISSIONTRANSFER.getDesc());
+				} else if (AchievementTransferMode.TECHNOLOGYSHARES.getCode().equals(transfermode)) {
+					reachievementlist.get(i).setTransferModeS(AchievementTransferMode.TECHNOLOGYSHARES.getDesc());
+				} else if (AchievementTransferMode.EXCLUSIVETECHNOLOGYSHARES.getCode().equals(transfermode)) {
+					reachievementlist.get(i)
+							.setTransferModeS(AchievementTransferMode.EXCLUSIVETECHNOLOGYSHARES.getDesc());
+				}
+			}
+
+			Integer maturity = reachievementlist.get(i).getMaturity();
+			if (null != maturity) {
+				if (AchievementMaturity.RESEARCH.getCode().equals(maturity)) {
+					reachievementlist.get(i).setMaturityS(AchievementMaturity.RESEARCH.getDesc());
+				} else if (AchievementMaturity.SAMPLE.getCode().equals(maturity)) {
+					reachievementlist.get(i).setMaturityS(AchievementMaturity.SAMPLE.getDesc());
+				} else if (AchievementMaturity.PRIMARYTEST.getCode().equals(maturity)) {
+					reachievementlist.get(i).setMaturityS(AchievementMaturity.PRIMARYTEST.getDesc());
+				} else if (AchievementMaturity.INTERMEDIATETEST.getCode().equals(maturity)) {
+					reachievementlist.get(i).setMaturityS(AchievementMaturity.INTERMEDIATETEST.getDesc());
+				} else if (AchievementMaturity.MASSPRODUCTION.getCode().equals(maturity)) {
+					reachievementlist.get(i).setMaturityS(AchievementMaturity.MASSPRODUCTION.getDesc());
+				}
+			};
+			String pic = reachievementlist.get(i).getTechnicalpictureurl();// 在存在多张图片的情况下,暂时先取第一张
+			if (null != pic) {
+				boolean hascomma = pic.contains(",");
+				if (hascomma) {
+					String[] picurl = pic.split(",");
+					reachievementlist.get(i).setTechnicalpictureurl(picurl[0]);
+				}
+			}
+		}
+		mv.setViewName("/portal/technologyTrading/achievementOrder");
+		mv.addObject("achievementdetail", achievementdetail);
+		mv.addObject("reachievementlist", reachievementlist);
+		return mv;
+	}
+	
+	
+	/**
+	 * 下单页面(需求)
+	 */
+	@RequestMapping(value = "/portal/technologyTrading/demandOrder", method = RequestMethod.GET)
+	public ModelAndView portalDemandOrder(String id, Integer type) {
+		ModelAndView mv = new ModelAndView();
+		DemandPortalDetailBo demand = null;
+		demand = demandService.findUserPortalDemandDetail(id);
+		if (null != demand) {
+			if (null != demand.getBudgetCost()) {
+				demand.setBudgetCostS(demand.getBudgetCost() + UNIT);
+			} else {
+				demand.setBudgetCostS(PRICE_NEGOTIABLE);
+			}
+			if (StringUtils.isBlank(demand.getEmployerName())) {
+				if (UserLevel.GENERAL.getCode().equals(demand.getLevel())) {
+					demand.setEmployerName(UNCERTIFY);
+				} else {
+					demand.setEmployerName(" ");
+				}
+			}
+			Integer industryCategoryA = demand.getIndustryCategoryA();
+			boolean hasCategoryA = false;
+			boolean hasCategoryB = false;
+			if (null != industryCategoryA) {
+				List<DemandPortalSimilarListBo> similarList = demandService.findByIndustryCategoryA(industryCategoryA,
+						demand.getId());
+				if (!similarList.isEmpty()) {
+					for (DemandPortalSimilarListBo s : similarList) {
+						hasCategoryA = StringUtils.isNotBlank(s.getIndustryCategoryAS());
+						hasCategoryB = StringUtils.isNotBlank(s.getIndustryCategoryBS());
+						s.setIndustryCategory((hasCategoryA ? s.getIndustryCategoryAS() : "")
+								+ (hasCategoryA && hasCategoryB ? DELIMITER : "")
+								+ (hasCategoryB ? s.getIndustryCategoryBS() : ""));
+						if (null != s.getBudgetCost() && s.getBudgetCost().compareTo(BigDecimal.ZERO) > 0) {
+							s.setBudgetCostS(s.getBudgetCost() + UNIT);
+						} else {
+							s.setBudgetCostS(PRICE_NEGOTIABLE);
+						}
+					}
+				}
+				mv.addObject("similarList", similarList);
+				hasCategoryA = StringUtils.isNotBlank(demand.getIndustryCategoryAS());
+			}
+			hasCategoryB = StringUtils.isNotBlank(demand.getIndustryCategoryBS());
+
+			demand.setIndustryCategory((hasCategoryA ? demand.getIndustryCategoryAS() : "")
+					+ (hasCategoryA && hasCategoryB ? DELIMITER : "")
+					+ (hasCategoryB ? demand.getIndustryCategoryBS() : ""));
+
+			demand.setLocation((StringUtils.isBlank(demand.getProvince()) ? "" : demand.getProvince())
+					+ (StringUtils.isBlank(demand.getCity()) ? "" : demand.getCity()));
+		}
+
+		String demandpic = demand.getPictureUrl();// 在存在多张图片的情况下,暂时先取第一张
+		if (null != demandpic) {
+			boolean hascomma = demandpic.contains(",");
+			if (hascomma) {
+				String[] picurl = demandpic.split(",");
+				demand.setPictureUrl(picurl[0]);
+			}
+		}
+
+		/*--------------查询精品需求---------------*/
+		List<DemandListBo> boutiquedemand = demandService.selectDemandList(1);
+		List<DemandListBo> reboutiquedemand = new ArrayList<DemandListBo>();
+		if (boutiquedemand.size() >= 4) {
+			int index = new Random().nextInt(boutiquedemand.size() - 3);
+			reboutiquedemand.add(boutiquedemand.get(index));
+			reboutiquedemand.add(boutiquedemand.get(index + 1));
+			reboutiquedemand.add(boutiquedemand.get(index + 2));
+		} else {
+			reboutiquedemand.addAll(boutiquedemand);
+		}
+		;
+
+		for (int i = 0; i < reboutiquedemand.size(); i++) {
+			String pic = reboutiquedemand.get(i).getPictureUrl();// 在存在多张图片的情况下,暂时先取第一张
+			if (null != pic) {
+				boolean hascomma = pic.contains(",");
+				if (hascomma) {
+					String[] picurl = pic.split(",");
+					reboutiquedemand.get(i).setPictureUrl(picurl[0]);
+				}
+			}
+		}
+		;
+
+		// 判断登录没登录. 登录了.查找用户喜欢的. 没登录就随机查四个.
+		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();
+			}
+
+			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();
+			if (null != redemandlist) {
+				if (demandType == 1) {
+					redemandlist.get(i).setDemandTypeS("技术购买需求");
+				} else if (demandType == 2) {
+					redemandlist.get(i).setDemandTypeS("技术设备类需求");
+				} else if (demandType == 3) {
+					redemandlist.get(i).setDemandTypeS("技术方案型需求");
+				} else if (demandType == 4) {
+					redemandlist.get(i).setDemandTypeS("技术攻关型需求");
+				} else if (demandType == 5) {
+					redemandlist.get(i).setDemandTypeS("技术人才型需求");
+				}
+			}
+		}
+		;
+
+		for (int i = 0; i < redemandlist.size(); i++) {
+			String pic = redemandlist.get(i).getPictureUrl();// 在存在多张图片的情况下,暂时先取第一张
+			if (null != pic) {
+				boolean hascomma = pic.contains(",");
+				if (hascomma) {
+					String[] picurl = pic.split(",");
+					redemandlist.get(i).setPictureUrl(picurl[0]);
+				}
+			}
+		}
+		;
+
+		mv.setViewName("/portal/technologyTrading/demandOrder");
+		mv.addObject("demand", demand);
+		mv.addObject("reboutiquedemand", reboutiquedemand);
+		mv.addObject("redemandlist", redemandlist);
+
+		return mv;
+	}
 }

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

@@ -18,11 +18,14 @@ import com.goafanti.banners.enums.BannersType;
 import com.goafanti.banners.service.BannersService;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.enums.AchievementMaturity;
+import com.goafanti.common.enums.MarketingPage;
 import com.goafanti.common.enums.UserType;
 import com.goafanti.common.model.Banners;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.dataGlossory.service.DistrictGlossoryService;
 import com.goafanti.demand.service.DemandService;
+import com.goafanti.marketing.bo.MarketingManagementBo;
+import com.goafanti.marketing.service.MarketingManagementService;
 import com.goafanti.portal.bo.InternationalListBo;
 import com.goafanti.user.bo.UserPartnerDetailBo;
 import com.goafanti.user.service.OrganizationIdentityService;
@@ -57,6 +60,9 @@ public class WebpageController extends BaseController {
 
 	@Resource
 	private NewsService newsService;
+	
+	@Resource
+	private MarketingManagementService marketingManagementService; 
 
 	/**
 	 * 首页
@@ -68,8 +74,14 @@ public class WebpageController extends BaseController {
 		if (!banners.isEmpty()) {
 			modelview.addObject("banner", banners.get(0));
 		}
-		modelview.addObject("zfwl", newsService.findIndexNewsList(0, NewsType.ZFWL.getCode(), 2));
+		//modelview.addObject("zfwl", newsService.findIndexNewsList(0, NewsType.ZFWL.getCode(), 2));
 		modelview.addObject("jtdt", newsService.findIndexNewsList(0, NewsType.JTDT.getCode(), 4));
+		List<MarketingManagementBo> achievementList = marketingManagementService.selectMarketList(
+				MarketingPage.mainAchievement.getPageUrl(), MarketingPage.mainAchievement.getBoothType());
+		List<MarketingManagementBo> demandList = marketingManagementService.selectMarketList(
+				MarketingPage.mainDemand.getPageUrl(), MarketingPage.mainDemand.getBoothType());
+		modelview.addObject("achievementList", achievementList);
+		modelview.addObject("demandList", demandList);
 		return modelview;
 	}
 

+ 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);
 }

+ 33 - 0
src/main/java/com/goafanti/common/dao/MarketingManagementMapper.java

@@ -2,6 +2,8 @@ package com.goafanti.common.dao;
 
 import com.goafanti.common.model.MarketingManagement;
 import com.goafanti.common.model.MarketingManagementExample;
+import com.goafanti.marketing.bo.MarketingManagementBo;
+
 import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
@@ -93,4 +95,35 @@ public interface MarketingManagementMapper {
      * @mbg.generated Tue Sep 26 14:34:04 CST 2017
      */
     int updateByPrimaryKey(MarketingManagement record);
+    
+    /**
+     *  查询营销页面活动数量
+     * @param showPage 
+     * @param category
+     * @param effective
+     * @return
+     */
+     int getMarketingCount(@Param("showPage")String showPage, @Param("category")Integer category, @Param("effective")Integer effective);
+    
+    /**
+     * 查询已有的活动产品
+     * @param showPage
+     * @param category
+     * @param productId
+     */
+    MarketingManagement selectMarket(@Param("showPage")String showPage, @Param("category")Integer category, @Param("productId")String productId);
+
+    /**
+     * 取消营销活动
+     * @param productIds
+     */
+	void deleteByProductId(@Param("productIds")List<String> productIds);
+	
+	/**
+	 * 查询营销活动列表
+	 * @param showPage
+	 * @param category
+	 * @return
+	 */
+	List<MarketingManagementBo> selectMarketList(@Param("showPage")String showPage, @Param("category")Integer category);
 }

+ 91 - 89
src/main/java/com/goafanti/common/enums/AttachmentType.java

@@ -1,89 +1,91 @@
-package com.goafanti.common.enums;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public enum AttachmentType {
-	COPYRIGHT_AUTH("copyright_auth", "软著证书"),
-	COPYRIGHT_APPLY("copyright_apply", "软著申请书"),
-	DEFAULT("attachment", "附件"),
-	PATENT_PRORY_STATEMENT("patent_prory_statement", "专利代理委托书"),
-	PATENT_WRITING("patent_writing", "专利稿件"),
-	AUTHORIZATION_NOTICE("authorization_notice", "授权通知书 "),
-	PATENT_CERTIFICATE("patent_certificate", "专利证书"),
-	PATENT_TEMPLATE("patent_template", "专利代理委托书模版"),
-	INSTITUTION("institution", "研发部门制度"),
-	PROTOCOL("protocol", "产学研技术中心协议"),
-	PROOF("proof", "研发活动立项证明材料"),
-	ACTIVITY_COST_ACCOUNT("activity_cost_account", "研发活动费用台帐"),
-	TECH_PRODUCT("tech_product", "高新技术产品台帐"),
-	PROPERTY_RIGHT("property_right", "知识产权证书"),
-	ACHIEVEMENT("achievement", "科技成果附件"),
-	RATEPAY("ratepay", "企业纳税申报表"),
-	FINANCE("finance", "企业财务报表"),
-	ROSTER("roster", "企业花名册"),
-	SOCIAL_SECURITY("social_security", "企业社保情况表"),
-	HONOR("honor", "荣誉及其他证明材料"),
-	LAST_YEAR_RATEPAY("last_year_ratepay", "上年度纳税申报表"),
-	TECH_PROJECT("tech_project", "科技项目申报材料"),
-	STANDARD("standard", "标准制定附件"),
-	MANUSCRIPT("manuscript", "知识产权稿件"),
-	ORGCODE("orgcode", "组织结构代码证"),
-	LICENCE("licence", "营业执照"),
-	DEMAND_PICTURE("demand_picture", "科技需求图片资料"),
-	DEMAND_TEXT_FILE("demand_text_file", "科技需求文本文件资料"),
-	ACHIEVEMENT_TECHNICAL_PICTURE("achievement_technical_picture", "科技成果技术图片"),
-	ACHIEVEMENT_MATURITY_PICTURE("achievement_maturity_picture", "科技成果成熟度资料图片"),
-	ACHIEVEMENT_MATURITY_TEXT_FILE("achievement_maturity_text_file", "科技成果成熟度资料文本文件"),
-	ACHIEVEMENT_TECH_PLAN("achievement_tech_plan", "科技成果技术方案文件"),
-	ACHIEVEMENT_BUSINESS_PLAN("achievement_business_plan", "科技成果商业计划书"),
-	DEMAND_TEMPLATE("demand_template", "科技需求批量导入模板"),
-	ACHIEVEMENT_TEMPLATE("achievement_template", "科技成果批量导入模板"),
-	DEMAND_ORDER_FILE("demand_order_file", "科技需求意向单/交易单附件"),
-	BANNERS_PIC("banners", "广告图片"),
-	NEWS_TITLE_PICTURE("news_title_picture", "新闻题图图片"),
-	NEWS_CONTENT_PICTURE("news_content_picture", "新闻内容图片"),
-	LECTURE_PICTURE("lecture_picture", "科技讲堂展示图片"),
-	ACTIVITY_TITLE_PICTURE("activity_title_picture", "活动题图"),
-	ACTIVITY_CONTENT_PICTURE("activity_content_picture", "活动内容图片");
-	
-
-	private AttachmentType(String code, String desc) {
-		this.code = code;
-		this.desc = desc;
-	}
-
-	private static Map<String, AttachmentType> status = new HashMap<String, AttachmentType>();
-
-	static {
-		for (AttachmentType value : AttachmentType.values()) {
-			status.put(value.getCode(), value);
-		}
-	}
-
-	public static AttachmentType getField(String code) {
-		if (containsType(code)) {
-			return status.get(code);
-		}
-		return DEFAULT;
-	}
-
-	public static String getFieldDesc(String code) {
-		return getField(code).getDesc();
-	}
-
-	public static boolean containsType(String code) {
-		return status.containsKey(code);
-	}
-
-	private String	code;
-	private String	desc;
-
-	public String getCode() {
-		return code;
-	}
-
-	public String getDesc() {
-		return desc;
-	}
-}
+package com.goafanti.common.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum AttachmentType {
+	COPYRIGHT_AUTH("copyright_auth", "软著证书"),
+	COPYRIGHT_APPLY("copyright_apply", "软著申请书"),
+	DEFAULT("attachment", "附件"),
+	PATENT_PRORY_STATEMENT("patent_prory_statement", "专利代理委托书"),
+	PATENT_WRITING("patent_writing", "专利稿件"),
+	AUTHORIZATION_NOTICE("authorization_notice", "授权通知书 "),
+	PATENT_CERTIFICATE("patent_certificate", "专利证书"),
+	PATENT_TEMPLATE("patent_template", "专利代理委托书模版"),
+	INSTITUTION("institution", "研发部门制度"),
+	PROTOCOL("protocol", "产学研技术中心协议"),
+	PROOF("proof", "研发活动立项证明材料"),
+	ACTIVITY_COST_ACCOUNT("activity_cost_account", "研发活动费用台帐"),
+	TECH_PRODUCT("tech_product", "高新技术产品台帐"),
+	PROPERTY_RIGHT("property_right", "知识产权证书"),
+	ACHIEVEMENT("achievement", "科技成果附件"),
+	RATEPAY("ratepay", "企业纳税申报表"),
+	FINANCE("finance", "企业财务报表"),
+	ROSTER("roster", "企业花名册"),
+	SOCIAL_SECURITY("social_security", "企业社保情况表"),
+	HONOR("honor", "荣誉及其他证明材料"),
+	LAST_YEAR_RATEPAY("last_year_ratepay", "上年度纳税申报表"),
+	TECH_PROJECT("tech_project", "科技项目申报材料"),
+	STANDARD("standard", "标准制定附件"),
+	MANUSCRIPT("manuscript", "知识产权稿件"),
+	ORGCODE("orgcode", "组织结构代码证"),
+	LICENCE("licence", "营业执照"),
+	DEMAND_PICTURE("demand_picture", "科技需求图片资料"),
+	DEMAND_TEXT_FILE("demand_text_file", "科技需求文本文件资料"),
+	ACHIEVEMENT_TECHNICAL_PICTURE("achievement_technical_picture", "科技成果技术图片"),
+	ACHIEVEMENT_MATURITY_PICTURE("achievement_maturity_picture", "科技成果成熟度资料图片"),
+	ACHIEVEMENT_MATURITY_TEXT_FILE("achievement_maturity_text_file", "科技成果成熟度资料文本文件"),
+	ACHIEVEMENT_TECH_PLAN("achievement_tech_plan", "科技成果技术方案文件"),
+	ACHIEVEMENT_BUSINESS_PLAN("achievement_business_plan", "科技成果商业计划书"),
+	ACHIEVEMENT_COVER_PICTURE("achievement_cover_picture","科技成果封面图"),
+	DEMAND_TEMPLATE("demand_template", "科技需求批量导入模板"),
+	ACHIEVEMENT_TEMPLATE("achievement_template", "科技成果批量导入模板"),
+	DEMAND_ORDER_FILE("demand_order_file", "科技需求意向单/交易单附件"),
+	DEMAND_COVER_PICTURE("demand_cover_picture","科技需求封面图"),
+	BANNERS_PIC("banners", "广告图片"),
+	NEWS_TITLE_PICTURE("news_title_picture", "新闻题图图片"),
+	NEWS_CONTENT_PICTURE("news_content_picture", "新闻内容图片"),
+	LECTURE_PICTURE("lecture_picture", "科技讲堂展示图片"),
+	ACTIVITY_TITLE_PICTURE("activity_title_picture", "活动题图"),
+	ACTIVITY_CONTENT_PICTURE("activity_content_picture", "活动内容图片");
+	
+
+	private AttachmentType(String code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+
+	private static Map<String, AttachmentType> status = new HashMap<String, AttachmentType>();
+
+	static {
+		for (AttachmentType value : AttachmentType.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+
+	public static AttachmentType getField(String code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return DEFAULT;
+	}
+
+	public static String getFieldDesc(String code) {
+		return getField(code).getDesc();
+	}
+
+	public static boolean containsType(String code) {
+		return status.containsKey(code);
+	}
+
+	private String	code;
+	private String	desc;
+
+	public String getCode() {
+		return code;
+	}
+
+	public String getDesc() {
+		return desc;
+	}
+}

+ 26 - 0
src/main/java/com/goafanti/common/enums/MarketingPage.java

@@ -0,0 +1,26 @@
+package com.goafanti.common.enums;
+
+public enum MarketingPage {
+	mainAchievement("/index",1,5), //首页成果
+	mainDemand("/index",2,5),	// 首页需求
+	mainPolicy("/index",6,3); //首页政策
+	
+	MarketingPage(String pageUrl,Integer boothType,Integer boothSize){
+		this.boothSize = boothSize;
+		this.pageUrl = pageUrl;
+		this.boothType = boothType;
+	};
+	private Integer boothSize;
+	private Integer boothType;
+	private String pageUrl;
+	public Integer getBoothSize() {
+		return boothSize;
+	}
+	public Integer getBoothType() {
+		return boothType;
+	}
+	public String getPageUrl() {
+		return pageUrl;
+	}
+
+}

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

@@ -697,10 +697,25 @@
   		a.id, a.serial_number as serialNumber, a.data_category as dataCategory, 
   		a.name, a.keyword, a.category, a.owner_name as ownerName, a.owner_type as ownerType, 
   		ui.username as username, a.owner_id as ownerId, a.org_id as orgId, a.contacts,
-  		a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId
+  		a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId,a.boutique
+  	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		,1 as hot
+	</if>
+	<if test="hot != null and hot == 0"><!-- 不在首页 -->
+		,0 as hot
+	</if>
+	<if test="hot==null"><!-- 无首页参数 -->
+		,ifnull(mm.effective,0) as hot
+	</if>
   	from achievement a
   	LEFT JOIN admin ad on a.id = a.tech_broker_id
   	LEFT JOIN user_identity ui on a.owner_id = ui.uid
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		inner join marketing_management mm on a.id = mm.product_id
+	</if>
+	<if test="hot == null"> <!-- 无首页参数 -->
+		left join marketing_management mm on a.id = mm.product_id 
+	</if>
   	where a.deleted_sign = 0 and a.owner_type = 0
   	<if test="ownerName != null">
   		and  a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
@@ -742,6 +757,15 @@
 	<if test="techBrokerId != null">
 	   and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
 	</if>
+	<if test="boutique != null">
+		and a.boutique = #{boutique,jdbcType=INTEGER}
+	</if>
+	<if test="hot != null and hot == 0"><!-- 不在首页 -->
+		and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
+	</if>
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		and mm.effective = 1
+	</if>
 	order by a.serial_number desc
 	<if test="page_sql!=null">
 			${page_sql}
@@ -752,6 +776,12 @@
   	select 
   		count(1)
   	from achievement
+  	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		inner join marketing_management mm on a.id = mm.product_id
+	</if>
+	<if test="hot == null"> <!-- 无首页参数 -->
+		left join marketing_management mm on a.id = mm.product_id 
+	</if>
   	where deleted_sign = 0 and owner_type = 0
   	<if test="ownerName != null">
   		and  a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
@@ -793,6 +823,15 @@
 	<if test="techBrokerId != null">
 	   and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
 	</if>
+	<if test="boutique != null">
+		and a.boutique = #{boutique,jdbcType=INTEGER}
+	</if>
+	<if test="hot != null and hot = 0"><!-- 不在首页 -->
+		and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
+	</if>
+	<if test="hot != null and hot = 1"><!-- 在首页 -->
+		and mm.effective = 1
+	</if>
   </select>
   
   
@@ -803,9 +842,24 @@
   		a.name, a.keyword, a.category, a.owner_name as ownerName, a.owner_type as ownerType, 
   		oi.unit_name as username, a.owner_id as ownerId, a.org_id as orgId, a.contacts,
   		a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId,a.boutique
+  	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		,1 as hot
+	</if>
+	<if test="hot != null and hot == 0"><!-- 无首页参数 -->
+		,0 as hot
+	</if>
+	<if test="hot==null"><!-- 在首页 -->
+		,ifnull(mm.effective,0) as hot
+	</if>
   	from achievement a
   	LEFT JOIN admin ad on ad.id = a.tech_broker_id
-  	LEFT JOIN organization_identity oi on a.owner_id = oi.uid
+	LEFT JOIN organization_identity oi on a.owner_id = oi.uid
+  	<if test="hot != null and hot == 1"> <!-- 在首页 -->
+		inner join marketing_management mm on a.id = mm.product_id
+	</if>
+	<if test="hot == null"> <!-- 无首页参数 -->
+		left join marketing_management mm on a.id = mm.product_id 
+	</if>
   	where a.deleted_sign = 0 and a.owner_type = 1
   	<if test="ownerName != null">
   		and  a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
@@ -847,6 +901,15 @@
 	<if test="techBrokerId != null">
 	   and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
 	</if>
+	<if test="boutique != null">
+		and a.boutique = #{boutique,jdbcType=INTEGER}
+	</if>
+	<if test="hot != null and hot == 0"><!-- 不在首页 -->
+		and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
+	</if>
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		and mm.effective = 1
+	</if>
 	order by serial_number desc
 	<if test="page_sql!=null">
 			${page_sql}
@@ -858,8 +921,14 @@
   		count(1)
   	from achievement a
   	<if test="unitName != null">
-  	LEFT JOIN organization_identity oi on a.owner_id = oi.uid
+  		LEFT JOIN organization_identity oi on a.owner_id = oi.uid
   	</if>
+  	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		inner join marketing_management mm on a.id = mm.product_id
+	</if>
+	<if test="hot == null"> <!-- 无首页参数 -->
+		left join marketing_management mm on a.id = mm.product_id 
+	</if>
   	where a.deleted_sign = 0 and a.owner_type = 1
   	<if test="ownerName != null">
   		and  a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
@@ -901,6 +970,12 @@
 	<if test="techBrokerId != null">
 	   and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
 	</if>
+	<if test="hot != null and hot == 0"><!-- 不在首页 -->
+		and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
+	</if>
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		and  mm.effective = 1
+	</if>
   </select>
   
   
@@ -1016,10 +1091,11 @@
 		    a.create_time as createTime, a.release_status as releaseStatus, 
 		    a.release_date as releaseDate, a.audit_status as auditStatus, a.tech_broker_id as techBrokerId,
 		    ui.username as iOwnerName, ui.province, ui.city, ui.area, u.email as iOwnerEmail,
-		    ui.id_number as iOwnerIdNumber, u.mobile as iOwnerMobile
+		    ui.id_number as iOwnerIdNumber, u.mobile as iOwnerMobile,a.boutique,ifnull(mm.effective,0) as hot,mm.cover_img as coverImg
     from achievement a
     left join user_identity ui on a.owner_id = ui.uid
     left join user u on u.id = a.owner_id
+    left join marketing_management mm on a.id = mm.product_id
     where a.id = #{id,jdbcType=VARCHAR}
   </select>
   
@@ -1041,10 +1117,11 @@
 		    a.create_time as createTime, a.release_status as releaseStatus, 
 		    a.release_date as releaseDate, a.audit_status as auditStatus, a.tech_broker_id as techBrokerId,
 		    oi.unit_name as iOwnerName, oi.postal_address as iOwnerPostalAddress, u.email as iOwnerEmail,
-		    oi.org_code as iOwnerIdNumber, u.mobile as iOwnerMobile,a.jmrh_flag as jmrhFlag , a.boutique as boutique
+		    oi.org_code as iOwnerIdNumber, u.mobile as iOwnerMobile,a.boutique,ifnull(mm.effective,0) hot,mm.cover_img as coverImg
     from achievement a
     left join organization_identity oi on a.owner_id = oi.uid
     left join user u on u.id = a.owner_id
+    left join marketing_management mm on a.id = mm.product_id
     where a.id = #{id,jdbcType=VARCHAR}
   </select>
   
@@ -1275,6 +1352,7 @@
 		interest.id as interestId,
 		u.lvl as level,
 		a.owner_name as ownerName,
+		a.owner_mobile as ownerMobile,
 		a.bargaining_mode as bargainingMode
 	FROM
 		achievement a

+ 139 - 17
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, 
@@ -488,13 +489,28 @@
 	  ui.username, d.demand_type as demandType, d.validity_period as validityPeriod, 
 	  d.employer_name as employerName, ui.province, d.status, 
 	  d.release_status as releaseStatus, d.release_date as releaseDate, a.name as techBrokerId,
-	  d.employer_id as employerId, d.audit_status as auditStatus
+	  d.employer_id as employerId, d.audit_status as auditStatus,d.boutique
+	 <if test="hot != null and hot == 1"><!-- 在首页 -->
+		,1 as hot
+	 </if>
+	 <if test="hot != null and hot == 0"><!-- 不在首页 -->
+		,0 as hot
+	 </if>
+	 <if test="hot==null"><!-- 无首页参数 -->
+		,ifnull(mm.effective,0) as hot
+	 </if>
 	from  demand d 
 	LEFT JOIN user_identity ui on d.employer_id = ui.uid
 	LEFT JOIN admin a on a.id = d.tech_broker_id
 	<if test="adminId != null">
 		LEFT JOIN user u on d.employer_id = u.id
 	</if>
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		inner join marketing_management mm on d.id = mm.product_id
+	</if>
+	<if test="hot == null"> <!-- 无首页参数 -->
+		left join marketing_management mm on d.id = mm.product_id 
+	</if>
 	where d.deleted_sign = 0 and d.data_category = 0 
 	<if test="adminId != null">
 		and (u.mid = #{adminId,jdbcType=VARCHAR}
@@ -548,6 +564,15 @@
 	<if test="rEnd != null">
 	   and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
 	</if>
+	<if test="boutique != null">
+		and d.boutique = #{boutique,jdbcType=INTEGER}
+	</if>
+	<if test="hot != null and hot == 0"><!-- 不在首页 -->
+		and d.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
+	</if>
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		and mm.effective = 1
+	</if>
   	order by d.serial_number desc
   	<if test="page_sql!=null">
 		${page_sql}
@@ -555,14 +580,20 @@
   </select>
   
   <select id ="findManageUserDemandCount" parameterType="String" resultType="java.lang.Integer">
-  		select 
-	 count(1)
+  	select 
+	count(1)
 	from  demand d 
 	LEFT JOIN user_identity ui on d.employer_id = ui.uid
 	LEFT JOIN admin a on a.id = d.tech_broker_id
 	<if test="adminId != null">
 		LEFT JOIN user u on d.employer_id = u.id
 	</if>
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		inner join marketing_management mm on d.id = mm.product_id
+	</if>
+	<if test="hot == null"> <!-- 无首页参数 -->
+		left join marketing_management mm on d.id = mm.product_id 
+	</if>
 	where d.deleted_sign = 0 and d.data_category = 0 
 	<if test="adminId != null">
 		and (u.mid = #{adminId,jdbcType=VARCHAR}
@@ -616,6 +647,15 @@
 	<if test="rEnd != null">
 	   and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
 	</if>
+	<if test="boutique != null">
+		and d.boutique = #{boutique,jdbcType=INTEGER}
+	</if>
+	<if test="hot != null and hot == 0"><!-- 不在首页 -->
+		and d.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
+	</if>
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		and mm.effective = 1
+	</if>
   </select>
   
    <select id="findManageOrgDemandListByPage" parameterType="String" resultType="com.goafanti.demand.bo.DemandManageListBo">
@@ -627,12 +667,27 @@
 	  d.release_status as releaseStatus, d.release_date as releaseDate, a.name as techBrokerId,
 	  d.employer_id as employerId, d.audit_status as auditStatus,
 	  d.tech_broker_id as techBrokerId,d.boutique
+	 <if test="hot != null and hot == 1"><!-- 在首页 -->
+		,1 as hot
+	 </if>
+	 <if test="hot != null and hot == 0"><!-- 不在首页 -->
+		,0 as hot
+	 </if>
+	 <if test="hot==null"><!-- 无首页参数 -->
+		,ifnull(mm.effective,0) as hot
+	 </if>
 	from  demand d 
 	LEFT JOIN organization_identity oi on d.employer_id = oi.uid
 	LEFT JOIN admin a on a.id = d.tech_broker_id
 	<if test="adminId != null">
 		LEFT JOIN user u on d.employer_id = u.id
 	</if>
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		inner join marketing_management mm on d.id = mm.product_id
+	</if>
+	<if test="hot == null"> <!-- 无首页参数 -->
+		left join marketing_management mm on d.id = mm.product_id 
+	</if>
 	where d.deleted_sign = 0 and d.data_category = 1 
 	<if test="adminId != null">
 		and (u.mid = #{adminId,jdbcType=VARCHAR}
@@ -690,6 +745,15 @@
 	<if test="rEnd != null">
 	   and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
 	</if>
+	<if test="boutique != null">
+		and d.boutique = #{boutique,jdbcType=INTEGER}
+	</if>
+	<if test="hot != null and hot == 0"><!-- 不在首页 -->
+		and d.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
+	</if>
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		and mm.effective = 1
+	</if>
   	order by d.serial_number desc
   	<if test="page_sql!=null">
 			${page_sql}
@@ -697,14 +761,23 @@
   </select>
   
   <select id ="findManageOrgDemandCount" parameterType="String" resultType="java.lang.Integer">
-  		select 
-	 count(1)
+  	select 
+	count(1)
 	from  demand d 
 	LEFT JOIN organization_identity oi on d.employer_id = oi.uid
 	LEFT JOIN admin a on a.id = d.tech_broker_id
 	<if test="adminId != null">
 		LEFT JOIN user u on d.employer_id = u.id
 	</if>
+	<if test="adminId != null">
+		LEFT JOIN user u on d.employer_id = u.id
+	</if>
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		inner join marketing_management mm on d.id = mm.product_id
+	</if>
+	<if test="hot == null"> <!-- 无首页参数 -->
+		left join marketing_management mm on d.id = mm.product_id 
+	</if>
 	where d.deleted_sign = 0 and d.data_category = 1
 	<if test="adminId != null">
 		and (u.mid = #{adminId,jdbcType=VARCHAR}
@@ -762,6 +835,15 @@
 	<if test="rEnd != null">
 	   and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
 	</if>
+	<if test="boutique != null">
+		and d.boutique = #{boutique,jdbcType=INTEGER}
+	</if>
+	<if test="hot != null and hot == 0"><!-- 不在首页 -->
+		and d.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
+	</if>
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		and mm.effective = 1
+	</if>
   </select>
   
   <select id="selectUserDemandDetail" parameterType="java.lang.String" resultType="com.goafanti.demand.bo.DemandManageDetailBo">
@@ -778,11 +860,13 @@
   		info.postal_address as address, u.email as mailbox,  u.mobile as mobile, d.audit_status as auditStatus,
   		d.employer_address as employerAddress, d.employer_contacts_mobile as employerContactsMobile,
   		d.employer_contacts_mailbox as employerContactsMailbox, d.employer_name as employerName,
-  		d.tech_broker_id as techBrokerId,  u.mobile as contactsName
+  		d.tech_broker_id as techBrokerId,  u.mobile as contactsName,
+  		d.boutique,ifnull(mm.effective,0) as hot,mm.cover_img as coverImg
   	from demand d 
   	left join user_identity ui on ui.uid = d.employer_id
   	left join user_info info on info.uid = d.employer_id
   	left join user u on u.id = d.employer_id
+  	left join marketing_management mm on d.id = mm.product_id
   	where d.data_category = 0 and d.id = #{id,jdbcType=VARCHAR}
   </select>
   
@@ -801,10 +885,12 @@
   		oi.postal_address as address, u.email as mailbox,  d.contacts, d.audit_status as auditStatus,
   		d.tech_broker_id as techBrokerId,
   		d.employer_address as employerAddress, d.employer_contacts_mobile as employerContactsMobile,
-  		d.employer_contacts_mailbox as employerContactsMailbox, d.employer_name as employerName,d.boutique
+  		d.employer_contacts_mailbox as employerContactsMailbox, d.employer_name as employerName,
+  		d.boutique,ifnull(mm.effective,0) as hot,mm.cover_img as coverImg
   	from demand d 
   	left join organization_identity oi on oi.uid = d.employer_id
   	left join user u on u.id = d.employer_id
+  	left join marketing_management mm on d.id = mm.product_id
   	where d.data_category = 1 and d.id = #{id,jdbcType=VARCHAR}
   </select>
   
@@ -1179,17 +1265,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 +1301,7 @@
   </select>
   
   <!-- 查询需求列表 -->
-	<select id="selectDemandList" parameterType="java.lang.Integer"
+	<select id="selectDemandList" 
 		resultType="com.goafanti.demand.bo.DemandListBo">
 		SELECT
 		d.id,
@@ -1239,7 +1322,6 @@
 		province,
 		dgg.name AS
 		city,
-		interest.id as interestId,
 		d.employer_name as
 		employerName,
 		u.lvl as
@@ -1255,13 +1337,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>

+ 33 - 0
src/main/java/com/goafanti/common/mapper/MarketingManagementMapper.xml

@@ -330,4 +330,37 @@
       effective = #{effective,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
   </update>
+  <select id="getMarketingCount" resultType="java.lang.Integer">
+  	 select count(0) from marketing_management 
+  	 where show_page = #{showPage,jdbcType=VARCHAR} 
+  	 and category = #{category,jdbcType=INTEGER} 
+  	 and effective = #{effective,jdbcType=INTEGER}
+  </select>
+  <select id="selectMarket"  resultMap="BaseResultMap">
+  	 select 
+  	 <include refid="Base_Column_List" /> 
+  	 from marketing_management
+  	 where show_page = #{showPage,jdbcType=VARCHAR} 
+  	 and category = #{category,jdbcType=INTEGER} 
+  	 and product_id = #{productId,jdbcType=VARCHAR}
+  </select>
+  <select id="deleteByProductId">
+  	update marketing_management set effective = 0
+  	where  product_id in 
+	<foreach item="item"  collection="productIds" open="(" separator="," close=")">
+		#{item}
+	</foreach>
+  </select>
+  <select id="selectMarketList" resultType="com.goafanti.marketing.bo.MarketingManagementBo">
+  	<if test="category == 1"> <!-- 成果 -->
+  		select mm.product_id as productId,x.owner_type as ownerType,x.summary,x.name,mm.cover_img as coverImg
+		from marketing_management mm left join achievement x on mm.product_id = x.id
+		where mm.effective =1 and x.audit_status=3 and x.deleted_sign = 0 and mm.show_page= #{showPage,jdbcType=VARCHAR}
+  	</if>
+  	<if test="category == 2"> <!-- 需求 -->
+  		select mm.product_id as productId,x.demand_type as ownerType,x.name,mm.cover_img as coverImg
+		from marketing_management mm left join demand x on mm.product_id = x.id
+		where mm.effective =1  and x.audit_status =3 and x.deleted_sign = 0 and mm.show_page= #{showPage,jdbcType=VARCHAR}
+  	</if>
+  </select>
 </mapper>

+ 281 - 281
src/main/java/com/goafanti/common/utils/FileUtils.java

@@ -1,281 +1,281 @@
-package com.goafanti.common.utils;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.util.regex.Pattern;
-
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.multipart.MultipartFile;
-
-import com.goafanti.common.enums.AttachmentType;
-
-public class FileUtils {
-	@Value(value = "${upload.private.path}")
-	private String					uploadPrivatePath	= null;
-
-	private static final Pattern	SLASH_PATTERN		= Pattern.compile("^/|/$");
-	private static final String		SLASH				= "/";
-	private static final String		UNDERLINE			= "_";
-
-	/**
-	 * response 输出JSON
-	 * 
-	 * @param hresponse
-	 * @param resultMap
-	 * @throws IOException
-	 */
-	public static void out(HttpServletResponse response, String jsonStr) {
-		PrintWriter out = null;
-		try {
-			response.setHeader("Content-Type", "application/json");
-			response.setCharacterEncoding("UTF-8");
-			out = response.getWriter();
-			out.println(jsonStr);
-		} catch (Exception e) {
-			LoggerUtils.fmtError(FileUtils.class, e, "输出数据失败");
-		} finally {
-			if (null != out) {
-				out.flush();
-				out.close();
-			}
-		}
-	}
-
-	/**
-	 * Excel报表导出
-	 * 
-	 * @param response
-	 * @param fileName
-	 * @param workbook
-	 */
-	public static void downloadExcel(HttpServletResponse response, String fileName, HSSFWorkbook workbook) {
-		String fn = null;
-		try {
-			fn = URLEncoder.encode(fileName, "UTF-8");
-		} catch (UnsupportedEncodingException e1) {
-			fn = fileName;
-		}
-		response.setContentType("application/x-download;charset=UTF-8");
-		response.setHeader("Content-Disposition", "attachment; filename=\"" + fn + "\";");
-		OutputStream out = null;
-		try {
-			out = response.getOutputStream();
-			workbook.write(out);
-		} catch (IOException e) {
-			LoggerUtils.fmtError(FileUtils.class, e, "输出Excel失败");
-		} finally {
-			if (null != out) {
-				try {
-					out.flush();
-					out.close();
-				} catch (IOException e) {
-					out = null;
-				}
-			}
-		}
-	}
-
-	/**
-	 * 根据上传文件 拼接fileName
-	 * 
-	 * @param mf
-	 * @param isPrivate
-	 * @param sign
-	 * @param path
-	 * @return
-	 */
-	public static String mosaicFileName(MultipartFile mf, boolean isPrivate, String sign, String path, String uid) {
-		String suffix = mf.getOriginalFilename().substring(mf.getOriginalFilename().lastIndexOf("."));
-		boolean uniq = false;
-		if (sign.indexOf("protocol") != -1 || sign.indexOf("achievement") != -1 || sign.indexOf("honor") != -1
-				|| sign.indexOf("proof") != -1 || sign.indexOf("activity_cost_account") != -1
-				|| sign.indexOf("tech_product") != -1 || sign.indexOf("property_ritht") != -1
-				|| sign.indexOf("tech_project") != -1 || sign.indexOf("patent_prory_statement") != -1
-				|| sign.indexOf("patent_writing") != -1 || sign.indexOf("authorization_notice") != -1
-				|| sign.indexOf("patent_certificate") != -1 || sign.indexOf("standard") != -1
-				|| sign.indexOf("demand_picture") != -1 || sign.indexOf("demand_text_file") != -1
-				|| sign.indexOf("achievement_technical_picture") != -1
-				|| sign.indexOf("achievement_maturity_picture") != -1 || sign.indexOf("demand_order_file") != -1
-				|| sign.indexOf("lecture_picture") != -1
-				|| sign.indexOf("news") != -1) {
-			uniq = true;
-		}
-		String fileName = "";
-		if (isPrivate || sign != "") {
-			if (uniq) {
-				fileName = path + uid + "/" + System.nanoTime() + "_" + sign + suffix;
-			} else {
-				fileName = path + uid + "/" + sign + suffix;
-			}
-		} else {
-			fileName = path + uid + "/" + System.nanoTime() + suffix;
-		}
-		return fileName;
-	}
-
-	/**
-	 * 获取下载文件名称
-	 * 
-	 * @param path
-	 * @return
-	 */
-	public static String getDownloadFileName(String path) {
-		if (StringUtils.isBlank(path) || path.lastIndexOf(".") < 0) {
-			return null;
-		}
-		String prefix = "附件";
-		String suffix = path.substring(path.lastIndexOf("."));
-		if (path.indexOf(AttachmentType.PATENT_PRORY_STATEMENT.getCode()) != -1) {
-			prefix = "专利代理委托书";
-		} else if (path.indexOf(AttachmentType.PATENT_WRITING.getCode()) != -1) {
-			prefix = "专利稿件";
-		} else if (path.indexOf(AttachmentType.AUTHORIZATION_NOTICE.getCode()) != -1) {
-			prefix = "授权通知书";
-		} else if (path.indexOf(AttachmentType.PATENT_CERTIFICATE.getCode()) != -1) {
-			prefix = "专利证书";
-		} else if (path.indexOf(AttachmentType.PROOF.getCode()) != -1) {
-			prefix = "立项证明材料";
-		} else if (path.indexOf(AttachmentType.ACTIVITY_COST_ACCOUNT.getCode()) != -1) {
-			prefix = "研发活动费用台帐";
-		} else if (path.indexOf(AttachmentType.TECH_PRODUCT.getCode()) != -1) {
-			prefix = "高新技术产品台帐";
-		} else if (path.indexOf(AttachmentType.PROPERTY_RIGHT.getCode()) != -1) {
-			prefix = "知识产权证书";
-		} else if (path.indexOf(AttachmentType.ROSTER.getCode()) != -1) {
-			prefix = subStr(path) + "花名册";
-		} else if (path.indexOf(AttachmentType.SOCIAL_SECURITY.getCode()) != -1) {
-			prefix = subStr(path) + "社保情况";
-		} else if (path.indexOf(AttachmentType.HONOR.getCode()) != -1) {
-			prefix = "荣誉材料证明";
-		} else if (path.indexOf(AttachmentType.ACHIEVEMENT.getCode()) != -1) {
-			prefix = "科技成果附件";
-		} else if (path.indexOf(AttachmentType.INSTITUTION.getCode()) != -1) {
-			prefix = "制度目录";
-		} else if (path.indexOf(AttachmentType.PROTOCOL.getCode()) != -1) {
-			prefix = "技术协议";
-		} else if (path.indexOf(AttachmentType.FINANCE.getCode()) != -1) {
-			prefix = subStr(path) + "财务报表";
-		} else if (path.indexOf(AttachmentType.RATEPAY.getCode()) != -1) {
-			prefix = subStr(path) + "纳税申报表";
-		} else if (path.indexOf(AttachmentType.TECH_PROJECT.getCode()) != -1) {
-			prefix = "科技项目资料";
-		} else if (path.indexOf(AttachmentType.STANDARD.getCode()) != -1) {
-			prefix = "标准制定";
-		} else if (path.indexOf(AttachmentType.MANUSCRIPT.getCode()) != -1) {
-			prefix = "稿件";
-		} else if (path.indexOf(AttachmentType.DEMAND_TEXT_FILE.getCode()) != -1) {
-			prefix = "科技需求文本文件资料";
-		} else if (path.indexOf(AttachmentType.ACHIEVEMENT_MATURITY_TEXT_FILE.getCode()) != -1) {
-			prefix = "科技成果成熟度资料文本文件";
-		} else if (path.indexOf(AttachmentType.ACHIEVEMENT_TECH_PLAN.getCode()) != -1) {
-			prefix = "科技成果技术方案文件";
-		} else if (path.indexOf(AttachmentType.ACHIEVEMENT_BUSINESS_PLAN.getCode()) != -1) {
-			prefix = "科技成果商业计划书";
-		}
-
-		return prefix + suffix;
-	}
-
-	public static String getSuffix(String path) {
-		if (StringUtils.isBlank(path) || path.lastIndexOf(".") < 0) {
-			return "";
-		}
-		return path.substring(path.lastIndexOf("."));
-	}
-
-	/**
-	 * 拼接文件路径
-	 * 
-	 * @param root
-	 * @param params
-	 * @return
-	 */
-	public static String buildFilePath(String... params) {
-		StringBuilder sb = new StringBuilder();
-		if (params != null) {
-			for (String s : params) {
-				sb.append(SLASH);
-				sb.append(SLASH_PATTERN.matcher(s).replaceAll(""));
-			}
-		}
-		return sb.toString();
-	}
-
-	/**
-	 * 拼接文件名字
-	 * 
-	 * @param root
-	 * @param params
-	 * @return
-	 */
-	public static String buildFileName(String... params) {
-		return StringUtils.join(params, UNDERLINE);
-	}
-
-	// year
-	private static String subStr(String s) {
-		return "企业" + s.substring(s.lastIndexOf(UNDERLINE) + 1, s.lastIndexOf("."));
-	}
-
-	public static boolean deleteFile(String realFilePath) {
-		return new File(realFilePath).delete();
-	}
-
-	/**
-	 * 
-	 * @param response
-	 * @param fileName
-	 * @param realFilePath
-	 */
-	public static void downloadFile(HttpServletResponse response, String fileName, String realFilePath) {
-		InputStream in = null;
-		OutputStream out = null;
-		byte[] buffer = new byte[8 * 1024];
-		try {
-			File file = new File(realFilePath);
-			in = new FileInputStream(file);
-			out = response.getOutputStream();
-			// 设置文件MIME类型
-			response.setContentType("application/octet-stream");
-			fileName = java.net.URLEncoder.encode(fileName, "UTF-8");
-			response.setHeader("Content-Disposition", "attachment; filename=" + fileName);
-			response.setHeader("Content-Length", String.valueOf(file.length()));
-			for (;;) {
-				int bytes = in.read(buffer);
-				if (bytes == -1) {
-					break;
-				}
-				out.write(buffer, 0, bytes);
-			}
-		} catch (IOException e) {
-			LoggerUtils.fmtError(FileUtils.class, e, "IO错误:%s", e.getMessage());
-		} finally {
-			try {
-				if (in != null) {
-					in.close();
-				}
-			} catch (IOException e) {
-				in = null;
-				LoggerUtils.fmtError(FileUtils.class, e, "IO错误:%s", e.getMessage());
-			}
-			try {
-				if (out != null) {
-					out.close();
-				}
-			} catch (IOException e) {
-				out = null;
-				LoggerUtils.fmtError(FileUtils.class, e, "IO错误:%s", e.getMessage());
-			}
-		}
-	}
-
-}
+package com.goafanti.common.utils;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.regex.Pattern;
+
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.multipart.MultipartFile;
+
+import com.goafanti.common.enums.AttachmentType;
+
+public class FileUtils {
+	@Value(value = "${upload.private.path}")
+	private String					uploadPrivatePath	= null;
+
+	private static final Pattern	SLASH_PATTERN		= Pattern.compile("^/|/$");
+	private static final String		SLASH				= "/";
+	private static final String		UNDERLINE			= "_";
+
+	/**
+	 * response 输出JSON
+	 * 
+	 * @param hresponse
+	 * @param resultMap
+	 * @throws IOException
+	 */
+	public static void out(HttpServletResponse response, String jsonStr) {
+		PrintWriter out = null;
+		try {
+			response.setHeader("Content-Type", "application/json");
+			response.setCharacterEncoding("UTF-8");
+			out = response.getWriter();
+			out.println(jsonStr);
+		} catch (Exception e) {
+			LoggerUtils.fmtError(FileUtils.class, e, "输出数据失败");
+		} finally {
+			if (null != out) {
+				out.flush();
+				out.close();
+			}
+		}
+	}
+
+	/**
+	 * Excel报表导出
+	 * 
+	 * @param response
+	 * @param fileName
+	 * @param workbook
+	 */
+	public static void downloadExcel(HttpServletResponse response, String fileName, HSSFWorkbook workbook) {
+		String fn = null;
+		try {
+			fn = URLEncoder.encode(fileName, "UTF-8");
+		} catch (UnsupportedEncodingException e1) {
+			fn = fileName;
+		}
+		response.setContentType("application/x-download;charset=UTF-8");
+		response.setHeader("Content-Disposition", "attachment; filename=\"" + fn + "\";");
+		OutputStream out = null;
+		try {
+			out = response.getOutputStream();
+			workbook.write(out);
+		} catch (IOException e) {
+			LoggerUtils.fmtError(FileUtils.class, e, "输出Excel失败");
+		} finally {
+			if (null != out) {
+				try {
+					out.flush();
+					out.close();
+				} catch (IOException e) {
+					out = null;
+				}
+			}
+		}
+	}
+
+	/**
+	 * 根据上传文件 拼接fileName
+	 * 
+	 * @param mf
+	 * @param isPrivate
+	 * @param sign
+	 * @param path
+	 * @return
+	 */
+	public static String mosaicFileName(MultipartFile mf, boolean isPrivate, String sign, String path, String uid) {
+		String suffix = mf.getOriginalFilename().substring(mf.getOriginalFilename().lastIndexOf("."));
+		boolean uniq = false;
+		if (sign.indexOf("protocol") != -1 || sign.indexOf("achievement") != -1 || sign.indexOf("honor") != -1
+				|| sign.indexOf("proof") != -1 || sign.indexOf("activity_cost_account") != -1
+				|| sign.indexOf("tech_product") != -1 || sign.indexOf("property_ritht") != -1
+				|| sign.indexOf("tech_project") != -1 || sign.indexOf("patent_prory_statement") != -1
+				|| sign.indexOf("patent_writing") != -1 || sign.indexOf("authorization_notice") != -1
+				|| sign.indexOf("patent_certificate") != -1 || sign.indexOf("standard") != -1
+				|| sign.indexOf("demand_picture") != -1 || sign.indexOf("demand_text_file") != -1
+				|| sign.indexOf("achievement_technical_picture") != -1
+				|| sign.indexOf("achievement_maturity_picture") != -1 || sign.indexOf("demand_order_file") != -1
+				|| sign.indexOf("lecture_picture") != -1|| sign.indexOf("cover_picture") != -1 
+				|| sign.indexOf("news") != -1) {
+			uniq = true;
+		}
+		String fileName = "";
+		if (isPrivate || sign != "") {
+			if (uniq) {
+				fileName = path + uid + "/" + System.nanoTime() + "_" + sign + suffix;
+			} else {
+				fileName = path + uid + "/" + sign + suffix;
+			}
+		} else {
+			fileName = path + uid + "/" + System.nanoTime() + suffix;
+		}
+		return fileName;
+	}
+
+	/**
+	 * 获取下载文件名称
+	 * 
+	 * @param path
+	 * @return
+	 */
+	public static String getDownloadFileName(String path) {
+		if (StringUtils.isBlank(path) || path.lastIndexOf(".") < 0) {
+			return null;
+		}
+		String prefix = "附件";
+		String suffix = path.substring(path.lastIndexOf("."));
+		if (path.indexOf(AttachmentType.PATENT_PRORY_STATEMENT.getCode()) != -1) {
+			prefix = "专利代理委托书";
+		} else if (path.indexOf(AttachmentType.PATENT_WRITING.getCode()) != -1) {
+			prefix = "专利稿件";
+		} else if (path.indexOf(AttachmentType.AUTHORIZATION_NOTICE.getCode()) != -1) {
+			prefix = "授权通知书";
+		} else if (path.indexOf(AttachmentType.PATENT_CERTIFICATE.getCode()) != -1) {
+			prefix = "专利证书";
+		} else if (path.indexOf(AttachmentType.PROOF.getCode()) != -1) {
+			prefix = "立项证明材料";
+		} else if (path.indexOf(AttachmentType.ACTIVITY_COST_ACCOUNT.getCode()) != -1) {
+			prefix = "研发活动费用台帐";
+		} else if (path.indexOf(AttachmentType.TECH_PRODUCT.getCode()) != -1) {
+			prefix = "高新技术产品台帐";
+		} else if (path.indexOf(AttachmentType.PROPERTY_RIGHT.getCode()) != -1) {
+			prefix = "知识产权证书";
+		} else if (path.indexOf(AttachmentType.ROSTER.getCode()) != -1) {
+			prefix = subStr(path) + "花名册";
+		} else if (path.indexOf(AttachmentType.SOCIAL_SECURITY.getCode()) != -1) {
+			prefix = subStr(path) + "社保情况";
+		} else if (path.indexOf(AttachmentType.HONOR.getCode()) != -1) {
+			prefix = "荣誉材料证明";
+		} else if (path.indexOf(AttachmentType.ACHIEVEMENT.getCode()) != -1) {
+			prefix = "科技成果附件";
+		} else if (path.indexOf(AttachmentType.INSTITUTION.getCode()) != -1) {
+			prefix = "制度目录";
+		} else if (path.indexOf(AttachmentType.PROTOCOL.getCode()) != -1) {
+			prefix = "技术协议";
+		} else if (path.indexOf(AttachmentType.FINANCE.getCode()) != -1) {
+			prefix = subStr(path) + "财务报表";
+		} else if (path.indexOf(AttachmentType.RATEPAY.getCode()) != -1) {
+			prefix = subStr(path) + "纳税申报表";
+		} else if (path.indexOf(AttachmentType.TECH_PROJECT.getCode()) != -1) {
+			prefix = "科技项目资料";
+		} else if (path.indexOf(AttachmentType.STANDARD.getCode()) != -1) {
+			prefix = "标准制定";
+		} else if (path.indexOf(AttachmentType.MANUSCRIPT.getCode()) != -1) {
+			prefix = "稿件";
+		} else if (path.indexOf(AttachmentType.DEMAND_TEXT_FILE.getCode()) != -1) {
+			prefix = "科技需求文本文件资料";
+		} else if (path.indexOf(AttachmentType.ACHIEVEMENT_MATURITY_TEXT_FILE.getCode()) != -1) {
+			prefix = "科技成果成熟度资料文本文件";
+		} else if (path.indexOf(AttachmentType.ACHIEVEMENT_TECH_PLAN.getCode()) != -1) {
+			prefix = "科技成果技术方案文件";
+		} else if (path.indexOf(AttachmentType.ACHIEVEMENT_BUSINESS_PLAN.getCode()) != -1) {
+			prefix = "科技成果商业计划书";
+		}
+
+		return prefix + suffix;
+	}
+
+	public static String getSuffix(String path) {
+		if (StringUtils.isBlank(path) || path.lastIndexOf(".") < 0) {
+			return "";
+		}
+		return path.substring(path.lastIndexOf("."));
+	}
+
+	/**
+	 * 拼接文件路径
+	 * 
+	 * @param root
+	 * @param params
+	 * @return
+	 */
+	public static String buildFilePath(String... params) {
+		StringBuilder sb = new StringBuilder();
+		if (params != null) {
+			for (String s : params) {
+				sb.append(SLASH);
+				sb.append(SLASH_PATTERN.matcher(s).replaceAll(""));
+			}
+		}
+		return sb.toString();
+	}
+
+	/**
+	 * 拼接文件名字
+	 * 
+	 * @param root
+	 * @param params
+	 * @return
+	 */
+	public static String buildFileName(String... params) {
+		return StringUtils.join(params, UNDERLINE);
+	}
+
+	// year
+	private static String subStr(String s) {
+		return "企业" + s.substring(s.lastIndexOf(UNDERLINE) + 1, s.lastIndexOf("."));
+	}
+
+	public static boolean deleteFile(String realFilePath) {
+		return new File(realFilePath).delete();
+	}
+
+	/**
+	 * 
+	 * @param response
+	 * @param fileName
+	 * @param realFilePath
+	 */
+	public static void downloadFile(HttpServletResponse response, String fileName, String realFilePath) {
+		InputStream in = null;
+		OutputStream out = null;
+		byte[] buffer = new byte[8 * 1024];
+		try {
+			File file = new File(realFilePath);
+			in = new FileInputStream(file);
+			out = response.getOutputStream();
+			// 设置文件MIME类型
+			response.setContentType("application/octet-stream");
+			fileName = java.net.URLEncoder.encode(fileName, "UTF-8");
+			response.setHeader("Content-Disposition", "attachment; filename=" + fileName);
+			response.setHeader("Content-Length", String.valueOf(file.length()));
+			for (;;) {
+				int bytes = in.read(buffer);
+				if (bytes == -1) {
+					break;
+				}
+				out.write(buffer, 0, bytes);
+			}
+		} catch (IOException e) {
+			LoggerUtils.fmtError(FileUtils.class, e, "IO错误:%s", e.getMessage());
+		} finally {
+			try {
+				if (in != null) {
+					in.close();
+				}
+			} catch (IOException e) {
+				in = null;
+				LoggerUtils.fmtError(FileUtils.class, e, "IO错误:%s", e.getMessage());
+			}
+			try {
+				if (out != null) {
+					out.close();
+				}
+			} catch (IOException e) {
+				out = null;
+				LoggerUtils.fmtError(FileUtils.class, e, "IO错误:%s", e.getMessage());
+			}
+		}
+	}
+
+}

+ 9 - 1
src/main/java/com/goafanti/demand/bo/DemandManageDetailBo.java

@@ -49,7 +49,7 @@ public class DemandManageDetailBo extends DemandManageListBo {
 
 	private String		employerContactsMailbox;
 
-	
+	private String      coverImg;
 	
 	public String getEmployerAddress() {
 		return employerAddress;
@@ -219,4 +219,12 @@ public class DemandManageDetailBo extends DemandManageListBo {
 	public void setMailbox(String mailbox) {
 		this.mailbox = mailbox;
 	}
+
+	public String getCoverImg() {
+		return coverImg;
+	}
+
+	public void setCoverImg(String coverImg) {
+		this.coverImg = coverImg;
+	}
 }

+ 12 - 1
src/main/java/com/goafanti/demand/bo/DemandManageListBo.java

@@ -15,7 +15,10 @@ public class DemandManageListBo extends DemandListBo {
 	private String	employerName;
 
 	private Integer	province;
-
+	/**
+	 * 是否在首页 0-否 1-是
+	 */
+	private Integer hot;
 	/**
 	 * 是否属于精品  0- 否 1-是
 	 */
@@ -87,4 +90,12 @@ public class DemandManageListBo extends DemandListBo {
 	public void setBoutique(Integer boutique) {
 		this.boutique = boutique;
 	}
+	@JsonFormat(shape = Shape.STRING)
+	public Integer getHot() {
+		return hot;
+	}
+
+	public void setHot(Integer hot) {
+		this.hot = hot;
+	}
 }

+ 2 - 2
src/main/java/com/goafanti/demand/service/DemandService.java

@@ -23,12 +23,12 @@ public interface DemandService {
 	Pagination<DemandManageListBo> selectUserDemandManageList(String employerName, Integer auditStatus, Integer province,
 			Integer serialNumber, String name, String keyword, Integer infoSources, Integer demandType,
 			String validityPeriodStartDate, String validityPeriodEndDate, String username, Integer status,
-			Integer releaseStatus, String releaseDateStartDate, String releaseDateEndDate, Integer pNo, Integer pSize);
+			Integer releaseStatus, String releaseDateStartDate, String releaseDateEndDate, Integer pNo, Integer pSize,Integer boutique,Integer hot);
 
 	Pagination<DemandManageListBo> selectOrgDemandManageList(String employerName, Integer auditStatus, Integer province, Integer serialNumber,
 			String name, String keyword, Integer infoSources, Integer demandType, String validityPeriodStartDate,
 			String validityPeriodEndDate, String username, Integer status, Integer releaseStatus,
-			String releaseDateStartDate, String releaseDateEndDate, Integer pNo, Integer pSize);
+			String releaseDateStartDate, String releaseDateEndDate, Integer pNo, Integer pSize,Integer boutique,Integer hot);
 
 	void saveUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords);
 

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

@@ -89,11 +89,11 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 			Integer province, Integer serialNumber, String name, String keyword, Integer infoSources,
 			Integer demandType, String validityPeriodStartDate, String validityPeriodEndDate, String username,
 			Integer status, Integer releaseStatus, String releaseDateStartDate, String releaseDateEndDate, Integer pNo,
-			Integer pSize) {
+			Integer pSize,Integer boutique,Integer hot) {
 
 		Map<String, Object> params = disposeParams(auditStatus, province, serialNumber, name, keyword, infoSources,
 				demandType, validityPeriodStartDate, validityPeriodEndDate, username, status, releaseStatus,
-				releaseDateStartDate, releaseDateEndDate);
+				releaseDateStartDate, releaseDateEndDate,boutique,hot);
 
 		if (pNo == null || pNo < 0) {
 			pNo = 1;
@@ -138,10 +138,10 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 			Integer province, Integer serialNumber, String name, String keyword, Integer infoSources,
 			Integer demandType, String validityPeriodStartDate, String validityPeriodEndDate, String username,
 			Integer status, Integer releaseStatus, String releaseDateStartDate, String releaseDateEndDate, Integer pNo,
-			Integer pSize) {
+			Integer pSize,Integer boutique,Integer hot) {
 		Map<String, Object> params = disposeParams(auditStatus, province, serialNumber, name, keyword, infoSources,
 				demandType, validityPeriodStartDate, validityPeriodEndDate, username, status, releaseStatus,
-				releaseDateStartDate, releaseDateEndDate);
+				releaseDateStartDate, releaseDateEndDate,boutique,hot);
 
 		if (pNo == null || pNo < 0) {
 			pNo = 1;
@@ -276,10 +276,11 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	@Override
 	public Pagination<DemandListBo> listDemand(Integer auditStatus, Integer serialNumber, String name, String keyword,
 			Integer demandType, String validityPeriodStartDate, String validityPeriodEndDate, Integer status,
-			Integer releaseStatus, String releaseDateStartDate, String releaseDateEndDate, Integer pNo, Integer pSize) {
+			Integer releaseStatus, String releaseDateStartDate, String releaseDateEndDate, Integer pNo, Integer pSize
+			) {
 		Map<String, Object> params = disposeParams(auditStatus, null, serialNumber, name, keyword, null, demandType,
 				validityPeriodStartDate, validityPeriodEndDate, null, status, releaseStatus, releaseDateStartDate,
-				releaseDateEndDate);
+				releaseDateEndDate,null,null);
 
 		params.put("employerId", TokenManager.getUserId());
 
@@ -482,7 +483,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,
@@ -497,7 +498,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	private Map<String, Object> disposeParams(Integer auditStatus, Integer province, Integer serialNumber, String name,
 			String keyword, Integer infoSources, Integer demandType, String validityPeriodStartDate,
 			String validityPeriodEndDate, String username, Integer status, Integer releaseStatus,
-			String releaseDateStartDate, String releaseDateEndDate) {
+			String releaseDateStartDate, String releaseDateEndDate,Integer boutique,Integer hot) {
 		Map<String, Object> params = new HashMap<>();
 		Date vStart = null;
 		Date vEnd = null;
@@ -588,7 +589,12 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		if (null != releaseStatus) {
 			params.put("releaseStatus", releaseStatus);
 		}
-
+		if (null != boutique) {
+			params.put("boutique", boutique);
+		}
+		if (null != hot) {
+			params.put("hot", hot);
+		}
 		return params;
 	}
 
@@ -743,12 +749,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());
 	}
 
 }

+ 27 - 0
src/main/java/com/goafanti/marketing/bo/MarketingManagementBo.java

@@ -0,0 +1,27 @@
+package com.goafanti.marketing.bo;
+
+import com.goafanti.common.model.MarketingManagement;
+
+public class MarketingManagementBo extends MarketingManagement{
+	private String name; /** 名字 **/
+	private String summary; /** 简介 **/
+	private String ownerType; /** 用户类型 **/
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public String getSummary() {
+		return summary;
+	}
+	public void setSummary(String summary) {
+		this.summary = summary;
+	}
+	public String getOwnerType() {
+		return ownerType;
+	}
+	public void setOwnerType(String ownerType) {
+		this.ownerType = ownerType;
+	}
+}

+ 51 - 0
src/main/java/com/goafanti/marketing/service/MarketingManagementService.java

@@ -0,0 +1,51 @@
+package com.goafanti.marketing.service;
+
+import java.util.List;
+
+import com.goafanti.common.model.MarketingManagement;
+import com.goafanti.marketing.bo.MarketingManagementBo;
+
+public interface MarketingManagementService {
+	/**
+	 * 
+	 * @param mm 保存营销活动
+	 */
+	public void save(MarketingManagement mm);
+	
+	/**
+	 * 
+	 * @param mm 更新营销活动
+	 */
+	public void update(MarketingManagement mm);
+	
+	/**
+	 * 
+	 * @param showPage 页面地址
+	 * @param category 营销类型  
+	 * @return
+	 */
+	public Integer getMarketingCount(String showPage,Integer category,Integer effective);
+
+	/**
+	 * 
+	 * @param showPage 页面地址
+	 * @param category 分类
+	 * @param productId 产品编号
+	 * @return
+	 */
+	public MarketingManagement selectMarket(String showPage,Integer category,String productId);
+	
+	/**
+	 * 取消营销活动
+	 * @param productIds
+	 */
+	public void deleteByProductId(List<String> productIds);
+	
+	/**
+	 * 查询营销活动
+	 * @param showPage 页面
+	 * @param category 分类
+	 * @return
+	 */
+	public List<MarketingManagementBo> selectMarketList(String showPage,Integer category);
+}

+ 49 - 0
src/main/java/com/goafanti/marketing/service/impl/MarketingManagementServiceImpl.java

@@ -0,0 +1,49 @@
+package com.goafanti.marketing.service.impl;
+
+import java.util.List;
+import java.util.UUID;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.common.dao.MarketingManagementMapper;
+import com.goafanti.common.model.MarketingManagement;
+import com.goafanti.marketing.bo.MarketingManagementBo;
+import com.goafanti.marketing.service.MarketingManagementService;
+
+@Service
+public class MarketingManagementServiceImpl implements MarketingManagementService {
+	@Autowired
+	MarketingManagementMapper marketingManagementMapper;
+	@Override
+	public void save(MarketingManagement mm) {
+		mm.setId(UUID.randomUUID().toString());
+		marketingManagementMapper.insert(mm);
+	}
+
+	@Override
+	public void update(MarketingManagement mmb) {
+		marketingManagementMapper.updateByPrimaryKeySelective(mmb);
+	}
+
+	@Override
+	public Integer getMarketingCount(String showPage, Integer category, Integer effective) {
+		return marketingManagementMapper.getMarketingCount(showPage, category, effective);
+	}
+
+	@Override
+	public MarketingManagement selectMarket(String showPage, Integer category, String productId) {
+		return marketingManagementMapper.selectMarket(showPage, category, productId);
+	}
+
+	@Override
+	public void deleteByProductId(List<String> productIds) {
+		marketingManagementMapper.deleteByProductId(productIds);
+	}
+
+	@Override
+	public List<MarketingManagementBo> selectMarketList(String showPage, Integer category) {
+		return marketingManagementMapper.selectMarketList(showPage, category);
+	}
+
+}

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

@@ -66,6 +66,8 @@ public class AchievementPortalDetailBo {
 	private Integer			bargainingMode;
 	
 	private String			categoryS;
+	
+	private String		ownerMobile;
 
 	public Integer getBargainingMode() {
 		return bargainingMode;
@@ -311,6 +313,14 @@ public class AchievementPortalDetailBo {
 		this.releaseDateS = releaseDateS;
 	}
 
+	public String getOwnerMobile() {
+		return ownerMobile;
+	}
+
+	public void setOwnerMobile(String ownerMobile) {
+		this.ownerMobile = ownerMobile;
+	}
+
 	
 	
 }

+ 2 - 0
src/main/java/com/goafanti/portal/controller/PortalInterestApiController.java

@@ -136,8 +136,10 @@ public class PortalInterestApiController extends CertifyApiController{
 	@RequestMapping(value = "/achievementInterest", method = RequestMethod.POST)
 	public Result achievementInterest(String id) {
 		Result res = new Result();
+		System.out.println("感兴趣的id="+id);
 
 		if (StringUtils.isBlank(id)) {
+			System.out.println("找不到成果ID");
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到成果ID", "科技成果ID"));
 			return res;
 		}

+ 1 - 0
src/main/java/com/goafanti/portal/controller/PortalOrderApiController.java

@@ -183,6 +183,7 @@ public class PortalOrderApiController extends CertifyApiController {
 		BeanUtils.copyProperties(order, achievementOrder);
 		BeanUtils.copyProperties(order, aol);
 		achievementOrderService.saveAchievementOrder(achievementOrder, aol);
+		System.out.println("已完成下单");
 		return res;
 	}
 

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

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

@@ -54,13 +54,13 @@ 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
 
-upload.path=E:/data/public/upload
-upload.private.path=E:/data/private/upload
+upload.path=F:/data/public/upload
+upload.private.path=F:/data/private/upload
 
 accessKey=LTAIqTgQLLwz252Z
 accessSecret=ICGuiUnqzaar7urw4zecVcJrJ1MHg9

+ 4 - 4
src/main/resources/props/config_test.properties

@@ -54,13 +54,13 @@ session.validate.timespan=18000000
 app.name=AFT
 template.cacheable=false
 
-static.host=//static.jishutao.com/front/1.0.43
-portal.host=//static.jishutao.com/portal/2.0.0
+static.host=//static.jishutao.com/1.0.45
+portal.host=//static.jishutao.com/portal/2.0.3
 avatar.host=//static.jishutao.com
 avatar.upload.host=//static.jishutao.com/upload
 
-upload.path=/data/public/upload
-upload.private.path=/data/private/upload
+upload.path=/data/static/public/upload
+upload.private.path=/data/static/private/upload
 
 accessKey=LTAIqTgQLLwz252Z
 accessSecret=ICGuiUnqzaar7urw4zecVcJrJ1MHg9

+ 96 - 94
src/main/resources/props/error.properties

@@ -1,94 +1,96 @@
-org.apache.shiro.authc.UnknownAccountException=\u8D26\u53F7\u6216\u5BC6\u7801\u4E0D\u5339\u914D\u3002
-org.apache.shiro.authc.IncorrectCredentialsException=\u8D26\u53F7\u6216\u5BC6\u7801\u4E0D\u5339\u914D\u3002
-org.apache.shiro.authc.LockedAccountException=\u8BE5\u8D26\u53F7\u5DF2\u51BB\u7ED3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u3002
-org.apache.shiro.authc.DisabledAccountException=\u8BE5\u8D26\u53F7\u5DF2\u51BB\u7ED3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u3002
-org.apache.shiro.authc.ExcessiveAttemptsException=\u5C1D\u8BD5\u6B21\u6570\u8FC7\u591A\uFF0C\u8D26\u53F7\u6682\u65F6\u88AB\u9501\u5B9A\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002
-org.apache.shiro.session.ExpiredSessionException=\u767B\u5F55\u4FE1\u606F\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55\u3002
-org.springframework.dao.DataIntegrityViolationException=\u670D\u52A1\u5668\u6253\u4E86\u4E2A\u76F9\u513F\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6216\u7A0D\u540E\u518D\u8BD5\u3002
-org.springframework.jdbc.BadSqlGrammarException=\u6570\u636E\u5F02\u5E38\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6216\u7A0D\u540E\u518D\u8BD5\u3002
-java.text.ParseException=\u53C2\u6570\u683C\u5F0F\u9519\u8BEF\uFF0C\u8BF7\u6838\u5BF9\u8F93\u5165\u6570\u636E\u540E\u518D\u8BD5\u3002
-java.lang.IllegalArgumentException=\u53C2\u6570\u683C\u5F0F\u9519\u8BEF\uFF0C\u8BF7\u6838\u5BF9\u8F93\u5165\u6570\u636E\u540E\u518D\u8BD5\u3002
-com.alibaba.fastjson.JSONException=\u53C2\u6570\u683C\u5F0F\u9519\u8BEF\uFF0C\u8BF7\u6838\u5BF9\u8F93\u5165\u6570\u636E\u540E\u518D\u8BD5\u3002
-
-
-NON_LOGIN=\u7528\u6237\u672A\u767B\u5F55\u3002
-
-VCODE_ERROR=\u56FE\u5F62\u9A8C\u8BC1\u7801\u8F93\u5165\u9519\u8BEF\uFF01
-
-NO_AUTH_ERROR=\u672A\u6388\u6743\u6216\u6388\u6743\u8FC7\u671F\u3002
-
-NO_CERTIFY=\u8BA4\u8BC1\u7528\u6237\u624D\u80FD\u4F7F\u7528\u8BE5\u529F\u80FD
-
-PARAM_ERROR={0}\u53C2\u6570\u9519\u8BEF
-
-PARAM_INTEGER_ERROR={0}\u53C2\u6570\u5FC5\u987B\u4E3A\u6570\u5B57\u3002
-
-PARAM_EMPTY_ERROR={0}\u5FC5\u987B\u6307\u5B9A\u3002
-
-PARAM_SIZE_ERROR={0}\u53C2\u6570\u957F\u5EA6\u4E0D\u6B63\u786E\uFF0C\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4\u3002
-
-PARAM_PATTERN_ERROR={0}\u53C2\u6570\u683C\u5F0F\u987B\u6B63\u786E\u6307\u5B9A{1}\u3002
-
-EMAIL_SIZE_ERROR=\u90AE\u7BB1\u5730\u5740\u957F\u5EA6\u9519\u8BEF\uFF01
-
-EMAIL_PATTERN_ERROR=\u90AE\u7BB1\u5730\u5740\u683C\u5F0F\u9519\u8BEF\uFF01
-
-MOBILE_SIZE_ERROR=\u624B\u673A\u53F7\u957F\u5EA6\u9519\u8BEF\uFF01
-
-MOBILE_PATTERN_ERROR=\u624B\u673A\u53F7\u683C\u5F0F\u9519\u8BEF\uFF01
-
-DUNPLICATE_KAY_ERROR={0}\u5DF2\u88AB\u4ED6\u4EBA\u6CE8\u518C\uFF01
-
-DATA_EMPTY_ERROR=\u5F53\u524D{0}\u6CA1\u6709\u6570\u636E\u3002
-
-PWD_NOT_MATCH_ERROR=\u539F\u5BC6\u7801\u8F93\u5165\u4E0D\u5339\u914D\u3002
-
-MCODE_ERROR=\u624B\u673A\u9A8C\u8BC1\u7801\u9519\u8BEF\uFF01
-
-NON_CERTIFIED=\u672A\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\uFF0C\u65E0\u6CD5\u64CD\u4F5C\uFF01
-
-FILE_NON_EXISTENT=\u6587\u4EF6\u4E0D\u5B58\u5728\uFF01
-
-RECORD_CALLBACK=\u5F53\u524D\u8BB0\u5F55\u5DF2\u9000\u5355\uFF0C\u65E0\u6CD5\u4FEE\u6539\uFF01
-
-RECORD_SETTLEMENT=\u5F53\u524D\u8BB0\u5F55\u5DF2\u7ED3\u6B3E\uFF0C\u65E0\u6CD5\u4FEE\u6539\uFF01
-
-RECORD_REJECT=\u5F53\u524D\u7533\u8BF7\u672A\u901A\u8FC7\uFF0C\u65E0\u6CD5\u4FEE\u6539\uFF0C\u8BF7\u91CD\u65B0\u7533\u8BF7\uFF01
-
-CONTRACT_PATENT_CREATED=\u5F53\u524D\u5408\u540C\u4E13\u5229\u7533\u8BF7\u5DF2\u521B\u5EFA,\u65E0\u6CD5\u91CD\u590D\u521B\u5EFA\uFF01
-
-CONTRACT_COPYRIGHT_CREATED=\u5F53\u524D\u5408\u540C\u8F6F\u8457\u7533\u8BF7\u5DF2\u521B\u5EFA,\u65E0\u6CD5\u91CD\u590D\u521B\u5EFA\uFF01
-
-CONTRACT_TECHPROJECT_CREATED=\u5F53\u524D\u5408\u540C\u79D1\u6280\u9879\u76EE\u7533\u8BF7\u5DF2\u521B\u5EFA,\u65E0\u6CD5\u91CD\u590D\u521B\u5EFA\uFF01
-
-CONTRACT_COGNIZANCE_CREATED=\u5F53\u524D\u5408\u540C\u9AD8\u4F01\u8BA4\u5B9A\u7533\u8BF7\u5DF2\u521B\u5EFA,\u65E0\u6CD5\u91CD\u590D\u521B\u5EFA\uFF01
-
-EVALUATE_ID=\u8BC4\u4F30\u62A5\u544A\u627E\u4E0D\u5230\uFF01
-EVALUATE_STEP=\u9519\u8BEF\u7684\u8BC4\u4F30\u6B65\u9AA4\uFF01
-EVALUATE_PARAM=\u8BC4\u4F30\u53C2\u6570\u9519\u8BEF\uFF01
-
-CONTRACT_YEAR_SECTION=\u5F53\u524D\u7533\u8BF7\u5E74\u4EFD\u5DF2\u4E0E\u5176\u4ED6\u5408\u540C\u7533\u8BF7\u5E74\u4EFD\u91CD\u53E0\uFF0C\u65E0\u6CD5\u63D0\u4EA4\u65B0\u7533\u8BF7\uFF01
-
-VCODE_EMPTY_ERROR=\u56FE\u50CF\u9A8C\u8BC1\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF01
-
-MCODE_FREQUENCY_ERROR=\u624B\u673A\u9A8C\u8BC1\u7801\u53D1\u9001\u9891\u7E41\uFF01
-
-NON_REGISTER=\u8BE5\u7528\u6237\u672A\u6CE8\u518C\uFF01
-
-MCODE_EMPTY_ERROR=\u624B\u673A\u9A8C\u8BC1\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF01
-
-MCODE_OVERTIME_ERROR=\u624B\u673A\u9A8C\u8BC1\u7801\u8D85\u65F6\u5931\u6548\uFF01
-
-RESET_CODE_ERROR=\u9875\u9762\u5931\u6548,\u8BF7\u91CD\u65B0\u83B7\u53D6\u9A8C\u8BC1\u7801\uFF01
-
-RESET_CODE_OVERTIME=\u9875\u9762\u8D85\u65F6\u5931\u6548,\u8BF7\u91CD\u65B0\u83B7\u53D6\u9A8C\u8BC1\u7801\uFF01
-
-IDENTITY_PAY_OVER_TIME=\u8D85\u8FC7\u6253\u6B3E\u65E5\u671F5\u65E5\uFF0C\u65E0\u6CD5\u63D0\u4EA4\u786E\u8BA4\uFF01
-
-OVER_MAX_WRONG_COUNT=\u8F93\u5165\u9519\u8BEF\u91D1\u989D\u6B21\u6570\u8FC7\u591A\uFF01
-
-WRONG_MONEY=\u8F93\u5165\u6253\u6B3E\u91D1\u989D\u9519\u8BEF\uFF0C\u60A8\u8FD8\u6709{0}\u6B21\u673A\u4F1A\uFF01
-
-M_CODE_ERROR=\u624B\u673A\u9A8C\u8BC1\u7801\u83B7\u53D6\u5F02\u5E38\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\uFF01
-
-MOBILE_SAME_ERROR=\u65B0\u624B\u673A\u53F7\u5FC5\u987B\u548C\u539F\u624B\u673A\u53F7\u4E0D\u540C\uFF01
+org.apache.shiro.authc.UnknownAccountException=\u8D26\u53F7\u6216\u5BC6\u7801\u4E0D\u5339\u914D\u3002
+org.apache.shiro.authc.IncorrectCredentialsException=\u8D26\u53F7\u6216\u5BC6\u7801\u4E0D\u5339\u914D\u3002
+org.apache.shiro.authc.LockedAccountException=\u8BE5\u8D26\u53F7\u5DF2\u51BB\u7ED3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u3002
+org.apache.shiro.authc.DisabledAccountException=\u8BE5\u8D26\u53F7\u5DF2\u51BB\u7ED3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u3002
+org.apache.shiro.authc.ExcessiveAttemptsException=\u5C1D\u8BD5\u6B21\u6570\u8FC7\u591A\uFF0C\u8D26\u53F7\u6682\u65F6\u88AB\u9501\u5B9A\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002
+org.apache.shiro.session.ExpiredSessionException=\u767B\u5F55\u4FE1\u606F\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55\u3002
+org.springframework.dao.DataIntegrityViolationException=\u670D\u52A1\u5668\u6253\u4E86\u4E2A\u76F9\u513F\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6216\u7A0D\u540E\u518D\u8BD5\u3002
+org.springframework.jdbc.BadSqlGrammarException=\u6570\u636E\u5F02\u5E38\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6216\u7A0D\u540E\u518D\u8BD5\u3002
+java.text.ParseException=\u53C2\u6570\u683C\u5F0F\u9519\u8BEF\uFF0C\u8BF7\u6838\u5BF9\u8F93\u5165\u6570\u636E\u540E\u518D\u8BD5\u3002
+java.lang.IllegalArgumentException=\u53C2\u6570\u683C\u5F0F\u9519\u8BEF\uFF0C\u8BF7\u6838\u5BF9\u8F93\u5165\u6570\u636E\u540E\u518D\u8BD5\u3002
+com.alibaba.fastjson.JSONException=\u53C2\u6570\u683C\u5F0F\u9519\u8BEF\uFF0C\u8BF7\u6838\u5BF9\u8F93\u5165\u6570\u636E\u540E\u518D\u8BD5\u3002
+
+
+NON_LOGIN=\u7528\u6237\u672A\u767B\u5F55\u3002
+
+VCODE_ERROR=\u56FE\u5F62\u9A8C\u8BC1\u7801\u8F93\u5165\u9519\u8BEF\uFF01
+
+NO_AUTH_ERROR=\u672A\u6388\u6743\u6216\u6388\u6743\u8FC7\u671F\u3002
+
+NO_CERTIFY=\u8BA4\u8BC1\u7528\u6237\u624D\u80FD\u4F7F\u7528\u8BE5\u529F\u80FD
+
+PARAM_ERROR={0}\u53C2\u6570\u9519\u8BEF
+
+PARAM_INTEGER_ERROR={0}\u53C2\u6570\u5FC5\u987B\u4E3A\u6570\u5B57\u3002
+
+PARAM_EMPTY_ERROR={0}\u5FC5\u987B\u6307\u5B9A\u3002
+
+PARAM_SIZE_ERROR={0}\u53C2\u6570\u957F\u5EA6\u4E0D\u6B63\u786E\uFF0C\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4\u3002
+
+PARAM_PATTERN_ERROR={0}\u53C2\u6570\u683C\u5F0F\u987B\u6B63\u786E\u6307\u5B9A{1}\u3002
+
+EMAIL_SIZE_ERROR=\u90AE\u7BB1\u5730\u5740\u957F\u5EA6\u9519\u8BEF\uFF01
+
+EMAIL_PATTERN_ERROR=\u90AE\u7BB1\u5730\u5740\u683C\u5F0F\u9519\u8BEF\uFF01
+
+MOBILE_SIZE_ERROR=\u624B\u673A\u53F7\u957F\u5EA6\u9519\u8BEF\uFF01
+
+MOBILE_PATTERN_ERROR=\u624B\u673A\u53F7\u683C\u5F0F\u9519\u8BEF\uFF01
+
+DUNPLICATE_KAY_ERROR={0}\u5DF2\u88AB\u4ED6\u4EBA\u6CE8\u518C\uFF01
+
+DATA_EMPTY_ERROR=\u5F53\u524D{0}\u6CA1\u6709\u6570\u636E\u3002
+
+PWD_NOT_MATCH_ERROR=\u539F\u5BC6\u7801\u8F93\u5165\u4E0D\u5339\u914D\u3002
+
+MCODE_ERROR=\u624B\u673A\u9A8C\u8BC1\u7801\u9519\u8BEF\uFF01
+
+NON_CERTIFIED=\u672A\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\uFF0C\u65E0\u6CD5\u64CD\u4F5C\uFF01
+
+FILE_NON_EXISTENT=\u6587\u4EF6\u4E0D\u5B58\u5728\uFF01
+
+RECORD_CALLBACK=\u5F53\u524D\u8BB0\u5F55\u5DF2\u9000\u5355\uFF0C\u65E0\u6CD5\u4FEE\u6539\uFF01
+
+RECORD_SETTLEMENT=\u5F53\u524D\u8BB0\u5F55\u5DF2\u7ED3\u6B3E\uFF0C\u65E0\u6CD5\u4FEE\u6539\uFF01
+
+RECORD_REJECT=\u5F53\u524D\u7533\u8BF7\u672A\u901A\u8FC7\uFF0C\u65E0\u6CD5\u4FEE\u6539\uFF0C\u8BF7\u91CD\u65B0\u7533\u8BF7\uFF01
+
+CONTRACT_PATENT_CREATED=\u5F53\u524D\u5408\u540C\u4E13\u5229\u7533\u8BF7\u5DF2\u521B\u5EFA,\u65E0\u6CD5\u91CD\u590D\u521B\u5EFA\uFF01
+
+CONTRACT_COPYRIGHT_CREATED=\u5F53\u524D\u5408\u540C\u8F6F\u8457\u7533\u8BF7\u5DF2\u521B\u5EFA,\u65E0\u6CD5\u91CD\u590D\u521B\u5EFA\uFF01
+
+CONTRACT_TECHPROJECT_CREATED=\u5F53\u524D\u5408\u540C\u79D1\u6280\u9879\u76EE\u7533\u8BF7\u5DF2\u521B\u5EFA,\u65E0\u6CD5\u91CD\u590D\u521B\u5EFA\uFF01
+
+CONTRACT_COGNIZANCE_CREATED=\u5F53\u524D\u5408\u540C\u9AD8\u4F01\u8BA4\u5B9A\u7533\u8BF7\u5DF2\u521B\u5EFA,\u65E0\u6CD5\u91CD\u590D\u521B\u5EFA\uFF01
+
+EVALUATE_ID=\u8BC4\u4F30\u62A5\u544A\u627E\u4E0D\u5230\uFF01
+EVALUATE_STEP=\u9519\u8BEF\u7684\u8BC4\u4F30\u6B65\u9AA4\uFF01
+EVALUATE_PARAM=\u8BC4\u4F30\u53C2\u6570\u9519\u8BEF\uFF01
+
+CONTRACT_YEAR_SECTION=\u5F53\u524D\u7533\u8BF7\u5E74\u4EFD\u5DF2\u4E0E\u5176\u4ED6\u5408\u540C\u7533\u8BF7\u5E74\u4EFD\u91CD\u53E0\uFF0C\u65E0\u6CD5\u63D0\u4EA4\u65B0\u7533\u8BF7\uFF01
+
+VCODE_EMPTY_ERROR=\u56FE\u50CF\u9A8C\u8BC1\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+
+MCODE_FREQUENCY_ERROR=\u624B\u673A\u9A8C\u8BC1\u7801\u53D1\u9001\u9891\u7E41\uFF01
+
+NON_REGISTER=\u8BE5\u7528\u6237\u672A\u6CE8\u518C\uFF01
+
+MCODE_EMPTY_ERROR=\u624B\u673A\u9A8C\u8BC1\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF01
+
+MCODE_OVERTIME_ERROR=\u624B\u673A\u9A8C\u8BC1\u7801\u8D85\u65F6\u5931\u6548\uFF01
+
+RESET_CODE_ERROR=\u9875\u9762\u5931\u6548,\u8BF7\u91CD\u65B0\u83B7\u53D6\u9A8C\u8BC1\u7801\uFF01
+
+RESET_CODE_OVERTIME=\u9875\u9762\u8D85\u65F6\u5931\u6548,\u8BF7\u91CD\u65B0\u83B7\u53D6\u9A8C\u8BC1\u7801\uFF01
+
+IDENTITY_PAY_OVER_TIME=\u8D85\u8FC7\u6253\u6B3E\u65E5\u671F5\u65E5\uFF0C\u65E0\u6CD5\u63D0\u4EA4\u786E\u8BA4\uFF01
+
+OVER_MAX_WRONG_COUNT=\u8F93\u5165\u9519\u8BEF\u91D1\u989D\u6B21\u6570\u8FC7\u591A\uFF01
+
+WRONG_MONEY=\u8F93\u5165\u6253\u6B3E\u91D1\u989D\u9519\u8BEF\uFF0C\u60A8\u8FD8\u6709{0}\u6B21\u673A\u4F1A\uFF01
+
+M_CODE_ERROR=\u624B\u673A\u9A8C\u8BC1\u7801\u83B7\u53D6\u5F02\u5E38\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\uFF01
+
+MOBILE_SAME_ERROR=\u65B0\u624B\u673A\u53F7\u5FC5\u987B\u548C\u539F\u624B\u673A\u53F7\u4E0D\u540C\uFF01
+
+MARKET_BOOTH_MAX = \u8425\u9500\u6D3B\u52A8\u5C55\u4F4D\u5DF2\u6EE1{0}\u4E2A

文件差异内容过多而无法显示
+ 414 - 325
src/main/webapp/WEB-INF/views/common.html


+ 60 - 107
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>
@@ -74,8 +74,7 @@
 	</div>
 	<div id="product">
 		<div class="caption">
-			精品成果<a
-				th:href="${basePath + '/portal/technologyTrading/achievement.html'}">MORE+</a>
+			精品成果<a th:href="${basePath + '/portal/technologyTrading/achievement.html'}">MORE+</a>
 		</div>
 		<div class="content">
 			<div class="con_hover">
@@ -83,69 +82,64 @@
 					alt="" />
 					<p>详情</p>
 				</a>
-			</div>
-			<div class="cont cont_top1">
-				<a
-					th:href="${basePath + '/portal/technologyTrading/achievementDetail?id=66b56b38-4e12-4089-892f-12f43d15387d&type=1'}">
+			</div>			
+			<div class="cont cont_top1" th:if="${#lists.size(achievementList) ge 1}">
+				<a th:href="@{/portal/technologyTrading/achievementDetail(id=${achievementList[0].productId},type=${achievementList[0].ownerType})}">
 					<div class="img">
-						<img th:src="${portalHost+'/img/index_one.png'}" alt="" /> <img
-							th:src="${portalHost+'/img/product1.jpg'}" alt="" />
+						<img th:src="${portalHost+'/img/index_one.png'}" alt="" /> 
+						<img th:src="${avatarUploadHost+achievementList[0].coverImg}" alt="" />
 					</div>
 					<div class="text">
-						<h2>军民两用无人飞行器系统</h2>
-						<p>军民两用无人飞行器系统包括TX-03、TX-05两个系列,其中TX-03系列属于小型全电无人飞行器</p>
+						<h2 th:text="${achievementList[0].name}"></h2>
+						<p th:text="${achievementList[0].summary}"></p>
 					</div>
 				</a>
 			</div>
-			<div class="cont cont_bottom1">
-				<a
-					th:href="${basePath + '/portal/technologyTrading/achievementDetail?id=03120e15-6eb2-4066-9d04-ca59278fba8d&type=1'}">
+			<div class="cont cont_top1" th:if="${#lists.size(achievementList) ge 2}">
+				<a th:href="@{/portal/technologyTrading/achievementDetail(id=${achievementList[1].productId},type=${achievementList[1].ownerType})}">
 					<div class="img">
-						<img th:src="${portalHost+'/img/index_two.png'}" alt="" /> <img
-							th:src="${portalHost+'/img/product2.jpg'}" alt="" />
+						<img th:src="${portalHost+'/img/index_two.png'}" alt="" /> 
+						<img th:src="${avatarUploadHost+achievementList[1].coverImg}" alt="" />
 					</div>
 					<div class="text">
-						<h2>新型炭纳米管-石墨烯交联网络高导热薄膜</h2>
-						<p>新型碳纳米管-石墨烯交联网络高导热薄膜由石墨烯片层堆积而成,在石墨烯片层之间原位生长碳纳米管</p>
+						<h2 th:text="${achievementList[1].name}"></h2>
+						<p th:text="${achievementList[1].summary}"></p>
 					</div>
 				</a>
 			</div>
-			<div class="cont cont_top2">
-				<a
-					th:href="${basePath + '/portal/technologyTrading/achievementDetail?id=73e9d01d-fc19-4585-a6e3-9ae4c9c274c6&type=1'}">
+			<div class="cont cont_top1" th:if="${#lists.size(achievementList) ge 3}">
+				<a th:href="@{/portal/technologyTrading/achievementDetail(id=${achievementList[2].productId},type=${achievementList[2].ownerType})}">
 					<div class="img">
-						<img th:src="${portalHost+'/img/index_three.png'}" alt="" /> <img
-							th:src="${portalHost+'/img/product3.jpg'}" alt="" />
+						<img th:src="${portalHost+'/img/index_three.png'}" alt="" /> 
+						<img th:src="${avatarUploadHost+achievementList[2].coverImg}" alt="" />
 					</div>
 					<div class="text">
-						<h2>基于原位氧化吸附热敏染料废水处理技术</h2>
-						<p>1、反应在常温、常压、开放体系中进行,条件温和,占地面积小,运行可靠,操作维护简单,投资和运行成本均较低</p>
+						<h2 th:text="${achievementList[2].name}"></h2>
+						<p th:text="${achievementList[2].summary}"></p>
 					</div>
 				</a>
 			</div>
-			<div class="cont cont_bottom2">
-				<a
-					th:href="${basePath + '/portal/technologyTrading/achievementDetail?id=4ce4132f-3749-46da-843b-d4448c78a65b&type=1'}">
+			<div class="cont cont_top1" th:if="${#lists.size(achievementList) ge 4}">
+				<a th:href="@{/portal/technologyTrading/achievementDetail(id=${achievementList[3].productId},type=${achievementList[3].ownerType})}">
 					<div class="img">
-						<img th:src="${portalHost+'/img/index_four.png'}" alt="" /> <img
-							th:src="${portalHost+'/img/product4.jpg'}" alt="" />
+						<img th:src="${portalHost+'/img/index_four.png'}" alt="" /> 
+						<img th:src="${avatarUploadHost+achievementList[3].coverImg}" alt="" />
 					</div>
 					<div class="text">
-						<h2>智能网联驾驶技术</h2>
-						<p>自1990年开展地面无人驾驶车辆技术研究,并联合各大汽车企业开展了自动驾驶汽车技术研发与应用</p>
+						<h2 th:text="${achievementList[3].name}"></h2>
+						<p th:text="${achievementList[3].summary}"></p>
 					</div>
 				</a>
 			</div>
-			<div class="cont cont_top3">
-				<a
-					th:href="${basePath + '/portal/technologyTrading/achievementDetail?id=3ffb74be-fb8c-48df-9e29-31cc721ec44e&type=1'}">
+			<div class="cont cont_top1" th:if="${#lists.size(achievementList) ge 5}">
+				<a th:href="@{/portal/technologyTrading/achievementDetail(id=${achievementList[4].productId},type=${achievementList[4].ownerType})}">
 					<div class="img">
-						<img th:src="${portalHost+'/img/index_five.png'}" alt="" /> <img
-							th:src="${portalHost+'/img/product5.jpg'}" alt="" />
+						<img th:src="${portalHost+'/img/index_five.png'}" alt="" /> 
+						<img th:src="${avatarUploadHost+achievementList[4].coverImg}" alt="" />
 					</div>
 					<div class="text">
-						<h2>MR-PET高端医学影像装备的关键技术与关键部</h2>
-						<p>正电子发射断层成像(Positron Emission Tomography,以下简称PET)是一种非侵入性的造影方法</p>
+						<h2 th:text="${achievementList[4].name}"></h2>
+						<p th:text="${achievementList[4].summary}"></p>
 					</div>
 				</a>
 			</div>
@@ -153,56 +147,52 @@
 	</div>
 	<div id="policy">
 		<div class="captions">
-			智&nbsp;&nbsp;&nbsp;&nbsp;政  <a
-				th:href="${basePath + '/portal/thinkTank/policyList.html'}">MORE+</a>
+			智&nbsp;&nbsp;&nbsp;&nbsp;政  
+			<a th:href="${basePath + '/portal/thinkTank/policyList.html'}">MORE+</a>
 		</div>
 		<div class="pol_cont">
-			<div class="pol_left">
+			<div class="pol_left" th:if="${#lists.size(jtdt) ge 1}">
 				<img th:src="${portalHost+'/img/policy.jpg'}" alt="" />
 				<div class="pol_left_cont">
-					<h3>解读习近平总书记在中央财经领导小组第十六次会议上关于知识产权工作的重要论述</h3>
-					<p>“要调动拥有知识产权的自然人和法人的积极性和主动性,提升产权意识,自觉运用法律武器依法维权。</p>
+					<h3 th:text="${jtdt[0].title}"></h3>
+					<p th:text="${jtdt[0].summary}"></p>
 					<div class="pol_bottom">
 						<div class="more rf">
-							<a
-								th:href="${basePath + '/portal/news/newsDetail?id=116557327490236416'}">MORE+</a>
+							<a th:href="@{/portal/news/newsDetail(id=${jtdt[0].id})}">MORE+</a>
 						</div>
-						<div class="data">2017-09-18</div>
+						<div class="data" th:text=${jtdt[0].createTimeFormattedDate}></div>
 					</div>
 				</div>
 			</div>
-			<div class="pol_right">
+			<div class="pol_right" th:if="${#lists.size(jtdt) ge 2}">
 				<div class="pol_right_big">
-					<h3>国务院知识产权局印发《“十三五”国家知识产权保护和运用规划重点任务分工方案》</h3>
-					<p>中央组织部、中央编办、中央综治办、中央网信办,国务院知识产权战略实施工作部际联席会议各成员单位,民政部、食品药品监管总局</p>
+					<h3 th:text="${jtdt[1].title}"></h3>
+					<p th:text="${jtdt[1].summary}"></p>
 					<div class="pol_bottom">
 						<div class="more rf">
-							<a
-								th:href="${basePath + '/portal/news/newsDetail?id=116558483981484032'}">MORE+</a>
+							<a th:href="@{/portal/news/newsDetail(id=${jtdt[1].id})}">MORE+</a>
 						</div>
-						<div class="data">2017-09-18</div>
+						<div class="data" th:text=${jtdt[1].createTimeFormattedDate}></div>
 					</div>
 				</div>
-				<div class="pol_right_sm">
-					<h3>科技部发布国家重点研发计划智能机器人等重点专项2017年度项目申报指南</h3>
-					<p>各省、自治区、直辖市及计划单列市科技厅(委、局),新疆生产建设兵团科技局,国务院各有关部门科技主管司局,各有关单位</p>
+				<div class="pol_right_sm" th:if="${#lists.size(jtdt) ge 3}">
+					<h3 th:text="${jtdt[2].title}"></h3>
+					<p th:text="${jtdt[2].summary}"></p>
 					<div class="pol_bottom">
 						<div class="more rf">
-							<a
-								th:href="${basePath + '/portal/news/newsDetail?id=116557895017316352'}">MORE+</a>
+							<a th:href="@{/portal/news/newsDetail(id=${jtdt[2].id})}">MORE+</a>
 						</div>
-						<div class="data">2017-09-18</div>
+						<div class="data" th:text=${jtdt[2].createTimeFormattedDate}></div>
 					</div>
 				</div>
-				<div class="pol_right_sm pol_act">
-					<h3>开展湖南省2017年高新技术企业认定工作的通知</h3>
-					<p>申报条件:(一)在中国境内(不含港、澳、台地区)注册的企业,近三年内通过自主研发、受让、受赠、并购等方式</p>
+				<div class="pol_right_sm pol_act" th:if="${#lists.size(jtdt) ge 4}">
+					<h3 th:text="${jtdt[3].title}"></h3>
+					<p th:text="${jtdt[3].summary}"></p>
 					<div class="pol_bottom">
 						<div class="more rf">
-							<a
-								th:href="${basePath + '/portal/news/newsDetail?id=116548420894081024'}">MORE+</a>
+							<a th:href="@{/portal/news/newsDetail(id=${jtdt[3].id})}">MORE+</a>
 						</div>
-						<div class="data">2017-09-18</div>
+						<div class="data" th:text=${jtdt[3].createTimeFormattedDate}></div>
 					</div>
 				</div>
 			</div>
@@ -211,52 +201,15 @@
 	<div class="need_main">
 		<div id="need">
 			<div class="caption">精品需求</div>
-			<span class="more"><a
-				th:href="${basePath + '/portal/technologyTrading/demand.html'}">MORE+</a></span>
+			<span class="more"><a th:href="${basePath + '/portal/technologyTrading/demand.html'}">MORE+</a></span>
 			<div class="carousel">
 				<span class="need_prev"><</span>
 				<div class="need_imgs">
 					<ul>
-						<li><a
-							th:href="${basePath + '/portal/technologyTrading/demandDetail?id=cdee3d8f-affe-45b0-9fd2-542cb2ed16fa&type=1'}">
-								<img th:src="${portalHost+'/img/need_img1.jpg'}" alt="" />
-								<p>新型纳米涂料技术</p>
-								<div class="need_black">
-									<img th:src="${portalHost+'/img/search_txt.png'}" alt="" />
-									<p>详情</p>
-								</div>
-						</a></li>
-						<li><a
-							th:href="${basePath + '/portal/technologyTrading/demandDetail?id=b17c5768-327d-4d90-8557-e4f21af050b0&type=1'}">
-								<img th:src="${portalHost+'/img/need_img2.jpg'}" alt="" />
-								<p>汽车空调的辅助制冷装置</p>
-								<div class="need_black">
-									<img th:src="${portalHost+'/img/search_txt.png'}" alt="" />
-									<p>详情</p>
-								</div>
-						</a></li>
-						<li><a
-							th:href="${basePath + '/portal/technologyTrading/demandDetail?id=e6b9869a-15aa-437a-afdd-0c289acd8cbf&type=1'}">
-								<img th:src="${portalHost+'/img/need_img1.jpg'}" alt="" />
-								<p>高性能铅炭电池</p>
-								<div class="need_black">
-									<img th:src="${portalHost+'/img/search_txt.png'}" alt="" />
-									<p>详情</p>
-								</div>
-						</a></li>
-						<li><a
-							th:href="${basePath + '/portal/technologyTrading/demandDetail?id=9b815c37-9748-4224-9770-07df8f35a6d9&type=1'}">
-								<img th:src="${portalHost+'/img/need_img2.jpg'}" alt="" />
-								<p>ABS板材改性工程塑料的配方及研究</p>
-								<div class="need_black">
-									<img th:src="${portalHost+'/img/search_txt.png'}" alt="" />
-									<p>详情</p>
-								</div>
-						</a></li>
-						<li><a
-							th:href="${basePath + '/portal/technologyTrading/demandDetail?id=5335f8d9-0e4d-4263-8d99-8faf92de5f1d&type=1'}">
-								<img th:src="${portalHost+'/img/need_img3.jpg'}" alt="" />
-								<p>机械领域新型产品或技术</p>
+						<li th:each="item:${demandList}"><a
+							th:href="@{/portal/technologyTrading/demandDetail(id=${item.productId},type=${item.ownerType})}">
+								<img th:src="${avatarUploadHost + item.coverImg}" alt="" />
+								<p th:text="${item.name}"></p>
 								<div class="need_black">
 									<img th:src="${portalHost+'/img/search_txt.png'}" alt="" />
 									<p>详情</p>

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

@@ -56,6 +56,7 @@
 	</div>
 	<footer>
 		<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>

+ 3 - 3
src/main/webapp/WEB-INF/views/portal/service/highTechCognizance.html

@@ -107,19 +107,19 @@
 				<div class="rotate_two active">
 					<div class="two" value="0" rota="90">
 						<span></span>
-						<p>高新认定申报流程</p>
+						<p>申报流程</p>
 					</div>
 				</div>
 				<div class="rotate_three">
 					<div class="three" value="1" rota="110">
 						<span></span>
-						<p>高新认定需要的时间</p>
+						<p>申报时间</p>
 					</div>
 				</div>
 				<div class="rotate_four" id="rotate_four">
 					<div class="four" value="2" rota="130">
 						<span></span>
-						<p>高新技术企业认定评分</p>
+						<p>认定评分</p>
 					</div>
 				</div>
 			</div>

+ 1 - 9
src/main/webapp/WEB-INF/views/portal/service/propertyRight.html

@@ -80,14 +80,11 @@
   				<ul>
 	  				<li>
 	  					<img th:src="${portalHost+'/img/property_090.jpg'}" alt="" />
-	  					<p>保护产品创新和方法创新。授权时间需1-2年,保护时间20年。</p>
 	  				</li>
 	  				<li>
 	  					<img th:src="${portalHost+'/img/property_091.jpg'}" alt="" />
-	  					<p>保护产品结构形状微创新等。授权时间需3-6个月,保护时间10年。</p>
 	  				<li>
 	  					<img th:src="${portalHost+'/img/property_092.jpg'}" alt="" />
-	  					<p>保护产品的外形和包装。授权时间3-6个月,保护时间10年。</p>
 	  				</li>
   				</ul>
   			</div>
@@ -166,14 +163,9 @@
   					</li>
   					<li>
   						<h6>一站式服务</h6>
-  						<p>专利申请、授权、下证、缴费提醒全程提醒</p>
+  						<p>专利申请、授权、下证、缴费提醒全过程服务</p>
   						<time>- <span>03</span> -</time>
   					</li>
-  					<li>
-  						<h6>钻石售后</h6>
-  						<p>专利申请、授权、下证、缴费提醒全程提醒</p>
-  						<time>-<span>04</span>-</time>
-  					</li>
   				</ul>
   			</div>
   		</div>

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

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

@@ -129,8 +129,8 @@
 						<li>
 							<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"/>元
+								<span>-</span>
+								<input type="number" id="maxprice" placeholder="最大价格" maxlength="6" min="0"/>
 								<button>确定</button>
 							</div>
 						</li>
@@ -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>

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

@@ -57,7 +57,15 @@
 							<p th:text="${achievementdetail.transferModeS}?${achievementdetail.transferModeS}:面议"></p>
 						</div>
 						<!-- <span><img th:src="${portalHost + '/img/detail_img5.png'}"alt="" /> <span  >8</span> </span> -->
-						<div class="detail_btn">我要咨询</div>
+						<div class="detail_btn" onclick="_MEIQIA('showPanel')">我要咨询
+							
+						</div>
+						<div class="detail_btn_" >立即购买
+							<input type="hidden" th:val="${achievementdetail.id}" id="Id_" />
+							<input type="hidden" th:typ="${achievementdetail.ownerType}" id="ownerType_" />
+							<input type="hidden" th:isLogin="${!isLogin}" id="isLogin" />
+						</div>
+						
 					</div>
 					<div class="fine" >
 						<div class="fine_title">精品专利</div>
@@ -157,7 +165,10 @@
 		</ul>
 		<span class="index_orange"></span>
 	</div>
-	<div th:replace="common::copyright"></div>
+	<footer>
+		<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"

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

@@ -0,0 +1,136 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:th="http://www.thymeleaf.org"
+	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head th:replace="common::header(~{::title},~{::link})">
+<title>订单页--我的技术和科技服务交易平台</title>
+<link th:href="${portalHost +'/vendors.css'}" rel="stylesheet">
+<link
+	th:href="${portalHost + '/technologyTrading/achievementOrder.css'}"
+	rel="stylesheet">
+</head>
+<body>
+	<header>
+		<div th:replace="common::nav('technologyTrading','achievement')"></div>
+	</header>
+	<!--主体内容区域开始-->
+	<div id="all_achievement">
+		<div class="detail">
+			<div id="order_title">订单确认</div>
+			<div id="order_cont">
+				<div class="order_cont">
+					<div class="order_left"
+						th:each="achievementdetail:${achievementdetail}">
+						<div>
+							<h4>产品名称:</h4>
+							<p th:text="${achievementdetail.name}"></p>
+						</div>
+						<div>
+							<h4>产品类型:</h4>
+							<p th:text="${achievementdetail.categoryS}?${achievementdetail.categoryS}:暂无分类信息">发明专利</p>
+						</div>
+						<div>
+							<h4>交易方式:</h4>
+							<p th:text="${achievementdetail.transferModeS}?${achievementdetail.transferModeS}:暂无"></p>
+						</div>
+						<div>
+							<h4>技术持有人:</h4>
+							<p th:text="${achievementdetail.ownerName}?${achievementdetail.ownerName}:陈灿"></p>
+						</div>
+						<div>
+							<h4>技术购买人:</h4>
+							<p th:text="${userData != null}?${userData.nickname}:暂无"></p>
+						</div>
+					</div>
+					<div class="order_right">
+						<div class="order_right_p">
+							<h4>交易金额:</h4>
+							<p th:text="${achievementdetail.transferPrice}?${achievementdetail.transferPrice}:暂无"></p>
+							<span onclick="_MEIQIA('showPanel')">立即议价</span>
+						</div>
+						<div>
+							<h4>电话:</h4>
+							<p th:text="${achievementdetail.ownerMobile}?${achievementdetail.ownerMobile}:073184121803"></p>
+						</div>
+						<div>
+							<h4 >电话:</h4>
+							<p th:text="${userData != null}?${userData.mobile}:暂无"></p>
+						</div>
+					</div>
+				</div>
+				<div class="order_button">
+					<div th:val="${achievementdetail.id}" id='id_'>加入订单</div>
+					<div>去支付</div>
+				</div>
+				<div class="order_text">加入订单,技术所有人很快就会联系你呦~,技淘祝您交易成功!</div>
+			</div>
+			<div id="order_flow">
+				<h3>交易流程</h3>
+				<div>
+					<img th:src="${portalHost+'/img/order_2.png'}" alt="" />
+				</div>
+			</div>
+			<div class="detail_bottom">
+				<div class="line">猜你喜欢</div>
+				<div class="main_introduce">
+					<ul>
+						<li th:each="reachievementlist:${reachievementlist}"><img
+							th:src="${portalHost+'/img/detail_img4.jpg'}" alt="" />
+							<div class="list_text">
+								<p>
+									行业:<span
+										th:text="${reachievementlist.fieldAS}?${reachievementlist.fieldAS}:暂无分类信息"></span>
+								</p>
+								<p>
+									名称:<span
+										th:text="${reachievementlist.name}?${reachievementlist.name}:未知"></span>
+								</p>
+								<p>
+									类型:<span
+										th:text="${reachievementlist.ownerTypeS}?${reachievementlist.ownerTypeS}:个人所有"></span>
+								</p>
+								<p>
+									交易方式:<span
+										th:text="${reachievementlist.transferModeS}?${reachievementlist.transferModeS}:暂无"></span>
+								</p>
+								<a href="#">了解详情</a>
+							</div></li>
+					</ul>
+				</div>
+			</div>
+		</div>
+	</div>
+	<!--主体内容区域结束-->
+	<div class="pub_fix">
+		<span class="index_blur"></span>
+		<ul class="ret_top">
+			<li><a href=""> <img
+					th:src="${portalHost + '/img/index_fix1.png'}" alt="" />
+					<p>发布需求</p>
+			</a></li>
+			<li><a href=""><img
+					th:src="${portalHost + '/img/index_fix2.png'}" alt="" />
+					<p>发布技术</p> </a></li>
+			<li><a onclick="_MEIQIA('showPanel')"> <img
+					th:src="${portalHost + '/img/index_fix3.png'}" alt="" />
+					<p>联系客服</p>
+			</a></li>
+			<li><a href="" class="pendent_box"> <img
+					th:src="${portalHost + '/img/index_fix4.png'}" alt="" />
+					<p>返回顶部</p>
+			</a></li>
+		</ul>
+		<span class="index_orange"></span>
+	</div>
+	<footer>
+		<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 + '/technologyTrading/achievementOrder.js'}"></script>
+	</div>
+</body>
+
+</html>

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

@@ -104,8 +104,8 @@
 						<li>
 							<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"/>元
+								<span>-</span>
+								<input type="number" id="maxprice" placeholder="最大价格" maxlength="6" min="0"/>
 								<button>确定</button>
 							</div>
 						</li>
@@ -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>

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

@@ -52,8 +52,14 @@
 						<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>
+							<input type="hidden" th:val="${demand.id}">                     
+                    	</div>
+	                    <div class="detail_btn">
+	                       <a href="javascript:;" onclick="_MEIQIA('showPanel')">我要咨询</a><a href="javascript:;" id="purchase">立即购买</a>
+	                    </div>
+
 					</div>
 					<div class="fine">
 						<div class="fine_title">精品需求</div>
@@ -65,9 +71,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 +113,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 +122,8 @@
 									<li></li>
 									<li></li>
 								</ol>
-							</div></li>
+							</div> -->
+							</li>
 					</ul>
 				</div>
 			</div>
@@ -127,6 +131,7 @@
 	</div>
 	<footer>
 		<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>

+ 136 - 0
src/main/webapp/WEB-INF/views/portal/technologyTrading/demandOrder.html

@@ -0,0 +1,136 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:th="http://www.thymeleaf.org"
+	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head th:replace="common::header(~{::title},~{::link})">
+<title>订单页--我的技术和科技服务交易平台</title>
+<link th:href="${portalHost +'/vendors.css'}" rel="stylesheet">
+<link
+	th:href="${portalHost + '/technologyTrading/achievementOrder.css'}"
+	rel="stylesheet">
+</head>
+<body>
+	<header>
+		<div th:replace="common::nav('technologyTrading','achievement')"></div>
+	</header>
+	<!--主体内容区域开始-->
+	<div id="all_achievement">
+		<div class="detail">
+			<div id="order_title">订单确认</div>
+			<div id="order_cont">
+				<div class="order_cont">
+					<div class="order_left"
+						th:each="demand:${demand}">
+						<div>
+							<h4>产品名称:</h4>
+							<p th:text="${demand.name}"></p>
+						</div>
+						<div>
+							<h4>产品类型:</h4>
+							<p th:text="${demand.categoryS}?${demand.categoryS}:暂无分类信息">发明专利</p>
+						</div>
+						<div>
+							<h4>交易方式:</h4>
+							<p th:text="${demand.transferModeS}?${demand.transferModeS}:暂无"></p>
+						</div>
+						<div>
+							<h4>技术持有人:</h4>
+							<p th:text="${demand.ownerName}?${demand.ownerName}:陈灿"></p>
+						</div>
+						<div>
+							<h4>技术购买人:</h4>
+							<p th:text="${userData != null}?${userData.nickname}:暂无"></p>
+						</div>
+					</div>
+					<div class="order_right">
+						<div class="order_right_p">
+							<h4>交易金额:</h4>
+							<p th:text="${demand.transferPrice}?${demand.transferPrice}:暂无"></p>
+							<span onclick="_MEIQIA('showPanel')">立即议价</span>
+						</div>
+						<div>
+							<h4>电话:</h4>
+							<p th:text="${demand.ownerMobile}?${demand.ownerMobile}:073184121803"></p>
+						</div>
+						<div>
+							<h4 >电话:</h4>
+							<p th:text="${userData != null}?${userData.mobile}:暂无"></p>
+						</div>
+					</div>
+				</div>
+				<div class="order_button">
+					<div>加入订单</div>
+					<div>去支付</div>
+				</div>
+				<div class="order_text">加入订单,技术所有人很快就会联系你呦~,技淘祝您交易成功!</div>
+			</div>
+			<div id="order_flow">
+				<h3>交易流程</h3>
+				<div>
+					<img th:src="${portalHost+'/img/order_2.png'}" alt="" />
+				</div>
+			</div>
+			<div class="detail_bottom">
+				<div class="line">猜你喜欢</div>
+				<div class="main_introduce">
+					<ul>
+						<li th:each="reachievementlist:${reachievementlist}"><img
+							th:src="${portalHost+'/img/detail_img4.jpg'}" alt="" />
+							<div class="list_text">
+								<p>
+									行业:<span
+										th:text="${reachievementlist.fieldAS}?${reachievementlist.fieldAS}:暂无分类信息"></span>
+								</p>
+								<p>
+									名称:<span
+										th:text="${reachievementlist.name}?${reachievementlist.name}:未知"></span>
+								</p>
+								<p>
+									类型:<span
+										th:text="${reachievementlist.ownerTypeS}?${reachievementlist.ownerTypeS}:个人所有"></span>
+								</p>
+								<p>
+									交易方式:<span
+										th:text="${reachievementlist.transferModeS}?${reachievementlist.transferModeS}:暂无"></span>
+								</p>
+								<a href="#">了解详情</a>
+							</div></li>
+					</ul>
+				</div>
+			</div>
+		</div>
+	</div>
+	<!--主体内容区域结束-->
+	<div class="pub_fix">
+		<span class="index_blur"></span>
+		<ul class="ret_top">
+			<li><a href=""> <img
+					th:src="${portalHost + '/img/index_fix1.png'}" alt="" />
+					<p>发布需求</p>
+			</a></li>
+			<li><a href=""><img
+					th:src="${portalHost + '/img/index_fix2.png'}" alt="" />
+					<p>发布技术</p> </a></li>
+			<li><a onclick="_MEIQIA('showPanel')"> <img
+					th:src="${portalHost + '/img/index_fix3.png'}" alt="" />
+					<p>联系客服</p>
+			</a></li>
+			<li><a href="" class="pendent_box"> <img
+					th:src="${portalHost + '/img/index_fix4.png'}" alt="" />
+					<p>返回顶部</p>
+			</a></li>
+		</ul>
+		<span class="index_orange"></span>
+	</div>
+	<footer>
+		<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 + '/technologyTrading/achievementOrder.js'}"></script>
+	</div>
+</body>
+
+</html>

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