瀏覽代碼

科技需求

liliang4869 7 年之前
父節點
當前提交
44203eaabd

+ 0 - 1
.settings/org.eclipse.core.resources.prefs

@@ -1,4 +1,3 @@
 eclipse.preferences.version=1
 encoding//src/main/java=UTF-8
-encoding//src/test/java=utf8
 encoding/<project>=UTF-8

+ 107 - 28
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -4,6 +4,7 @@ import java.util.List;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
+import javax.validation.constraints.Min;
 
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -13,8 +14,11 @@ import org.springframework.web.servlet.ModelAndView;
 import com.goafanti.achievement.service.AchievementService;
 import com.goafanti.banners.enums.BannersType;
 import com.goafanti.banners.service.BannersService;
+import com.goafanti.common.bo.fieldGlossoryBo;
 import com.goafanti.common.model.Banners;
+import com.goafanti.common.utils.LimitLengthUtil;
 import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.demand.bo.DemandListBo;
 import com.goafanti.demand.service.DemandService;
 import com.goafanti.user.service.OrganizationIdentityService;
 import com.goafanti.user.service.UserIdentityService;
@@ -81,7 +85,7 @@ public class WebpageController extends BaseController {
 	@RequestMapping(value = "/user/logout", method = RequestMethod.GET)
 	public String userLogout(HttpServletRequest request, ModelAndView modelview) {
 		TokenManager.logout();
-		//return userLogin(request, modelview);
+		// return userLogin(request, modelview);
 		return "redirect:/portal/index";
 	}
 
@@ -127,7 +131,6 @@ public class WebpageController extends BaseController {
 	public String adminAchievement(HttpServletRequest request, ModelAndView modelview) {
 		return "/admin/achievement";
 	}
-	
 
 	@RequestMapping(value = "/admin/set", method = RequestMethod.GET)
 	public String adminSet(HttpServletRequest request, ModelAndView modelview) {
@@ -139,7 +142,7 @@ public class WebpageController extends BaseController {
 		modelview.setViewName("/admin/userManage");
 		return modelview;
 	}
-	
+
 	@RequestMapping(value = "/admin/customer", method = RequestMethod.GET)
 	public ModelAndView adminCustomer(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/admin/customer");
@@ -170,19 +173,18 @@ public class WebpageController extends BaseController {
 		return modelview;
 	}
 
-
 	@RequestMapping(value = "/admin/servicesManage/copyright", method = RequestMethod.GET)
 	public ModelAndView adminServicesManageCopyright(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/admin/servicesManage/copyright");
 		return modelview;
 	}
-	
+
 	@RequestMapping(value = "/admin/servicesManage/projectOrder", method = RequestMethod.GET)
-	public ModelAndView adminServiceManageProjectOrder(HttpServletRequest request, ModelAndView modelview){
+	public ModelAndView adminServiceManageProjectOrder(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/admin/servicesManage/projectOrder");
 		return modelview;
 	}
-	
+
 	@RequestMapping(value = "/admin/index", method = RequestMethod.GET)
 	public ModelAndView adminHome(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/admin/index");
@@ -200,19 +202,18 @@ public class WebpageController extends BaseController {
 		modelview.setViewName("/admin/userOrder");
 		return modelview;
 	}
-	
+
 	@RequestMapping(value = "/admin/order", method = RequestMethod.GET)
-	public ModelAndView adminOrder(HttpServletRequest request, ModelAndView modelview){
+	public ModelAndView adminOrder(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/admin/order");
 		return modelview;
 	}
 
 	@RequestMapping(value = "/admin/operate", method = RequestMethod.GET)
-	public ModelAndView adminOperate(HttpServletRequest request, ModelAndView modelview){
+	public ModelAndView adminOperate(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/admin/operate");
 		return modelview;
 	}
-	
 
 	@RequestMapping(value = "/portal/technologyTrading/achievement", method = RequestMethod.GET)
 	public ModelAndView portalSearchAchievement(HttpServletRequest request, ModelAndView modelview) {
@@ -297,9 +298,9 @@ public class WebpageController extends BaseController {
 	public ModelAndView portalTechnologyTradingIndex(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/portal/technologyTrading/index");
 		handleBanners(modelview, BannersType.JI_SHU_JIAO_YI);
-		List<NewsPortalList> newsPortalList=newsService.portalNewsPolicy();		
+		List<NewsPortalList> newsPortalList = newsService.portalNewsPolicy();
 		modelview.addObject("newsPortalList", newsPortalList);
-		List<NewsPortalList> portalNewsQuestion=newsService.portalNewsQuestion();		
+		List<NewsPortalList> portalNewsQuestion = newsService.portalNewsQuestion();
 		modelview.addObject("portalNewsQuestion", portalNewsQuestion);
 		return modelview;
 	}
@@ -345,50 +346,54 @@ public class WebpageController extends BaseController {
 		modelview.setViewName("/portal/member");
 		return modelview;
 	}
-	
+
 	/**
-	 *  技术评估
+	 * 技术评估
+	 * 
 	 * @param request
 	 * @param modelview
 	 * @return
 	 */
-	@RequestMapping(value="/portal/technologyTrading/assessMent")
-	public ModelAndView assessMent(HttpServletRequest request, ModelAndView modelview){
+	@RequestMapping(value = "/portal/technologyTrading/assessMent")
+	public ModelAndView assessMent(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/portal/technologyTrading/assessMent");
 		modelview.addObject("zcfg", newsService.findIndexNewsList(0, NewsType.KJZX.getCode(), 4));
 		return modelview;
 	}
-	
+
 	/**
-	 *  关于我们
+	 * 关于我们
+	 * 
 	 * @param request
 	 * @param modelview
 	 * @return
 	 */
-	@RequestMapping(value="/portal/aboutUs" ,method = RequestMethod.GET)
-	public ModelAndView aboutUs(HttpServletRequest request, ModelAndView modelview){
+	@RequestMapping(value = "/portal/aboutUs", method = RequestMethod.GET)
+	public ModelAndView aboutUs(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/portal/aboutUs");
 		return modelview;
 	}
-	
+
 	/**
 	 * 联系我们
+	 * 
 	 * @param request
 	 * @param modelview
 	 * @return
 	 */
-	@RequestMapping(value="/portal/contactUs"  ,method = RequestMethod.GET)
-	public ModelAndView contactUs(HttpServletRequest request, ModelAndView modelview){
+	@RequestMapping(value = "/portal/contactUs", method = RequestMethod.GET)
+	public ModelAndView contactUs(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/portal/contactUs");
 		return modelview;
 	}
+
 	private void handleBanners(ModelAndView modelview, BannersType bannersType) {
 		List<Banners> banners = bannersService.findPortalBanners(bannersType.getKey());
 		if (!banners.isEmpty()) {
 			modelview.addObject("banners", banners);
 		}
-	} 
-	
+	}
+
 	/**
 	 * 服务-推荐
 	 * 
@@ -401,7 +406,81 @@ public class WebpageController extends BaseController {
 		modelview.setViewName("/portal/service/recommended");
 		return modelview;
 	}
+
+	/*
+	 * 技淘3.0-科技需求页
+	 * @param request
+	 * @param modelview
+	 * @return 
+	 * 
+	 * */
+	@RequestMapping(value = "/portal/demand")
+	public ModelAndView demand(HttpServletRequest request, ModelAndView modelview) {
+		modelview.setViewName("/portal/technologyTrading/demand");
+		//行业
+		List<fieldGlossoryBo> industryList = userIdentityService.industryList();
+		modelview.addObject("industryList", industryList);
+		
+		//最新需求
+		List<DemandListBo> recentDemandList=demandService.recentDemand();
+		LimitLengthUtil.limiteDemandCompanyAndName(recentDemandList, 18, 18);
+		modelview.addObject("recentDemandList",recentDemandList);
+//		
+//		//加急需求
+		List<DemandListBo> urgentDemand=demandService.getUrgentDemand();
+		List<DemandListBo> urgentDemand2=urgentDemand.subList(0, Math.min(2, urgentDemand.size()));
+		List<DemandListBo> urgentDemand3=urgentDemand.subList( Math.min(2, urgentDemand.size()),  Math.min(5, urgentDemand.size()));
+		System.out.print("u2:"+urgentDemand2.size()+" u3:"+urgentDemand3.size());
+		LimitLengthUtil.limiteDemandLength(urgentDemand2,10,30);
+		LimitLengthUtil.limiteDemandLength(urgentDemand3,10,30);
+		modelview.addObject("urgentDemand2",urgentDemand2);
+		modelview.addObject("urgentDemand3",urgentDemand3);
+		
+		//热点需求
+		List<DemandListBo> hotDemand=demandService.getHotDemand();
+		List<DemandListBo> hotDemand2=hotDemand.subList(0, Math.min(2, hotDemand.size()));
+		List<DemandListBo> hotDemand3=hotDemand.subList( Math.min(2, hotDemand.size()),  Math.min(5, hotDemand.size()));
+		System.out.print("u2:"+hotDemand2.size()+" u3:"+hotDemand3.size());
+		LimitLengthUtil.limiteDemandLength(hotDemand2,10,30);
+		LimitLengthUtil.limiteDemandLength(hotDemand3,10,30);
+		modelview.addObject("hotDemand2",hotDemand2);
+		modelview.addObject("hotDemand3",hotDemand3);
+		
+		
+		//企业技术需求
+		List<DemandListBo> companyDemand=demandService.companyDemand();
+		int minSize=companyDemand.size()>8?8:companyDemand.size();
+		List <DemandListBo>eightMaxCompanyDemand=companyDemand.subList(0,minSize);
+		for(DemandListBo demandListBo:eightMaxCompanyDemand) {
+			if(demandListBo.getPictureUrl()==null || !demandListBo.getPictureUrl().contains("."))demandListBo.setPictureUrl(null);
+			else demandListBo.setPictureUrl(demandListBo.getPictureUrl().split(",")[0]);
+		}
+		modelview.addObject("companyDemandList",eightMaxCompanyDemand);
+		
+		//地区产业需求  最多4个
+		List<DemandListBo> areaDemand=demandService.areaDemand();
+		List <DemandListBo>fourMaxareaDemand=areaDemand.subList(0,Math.min(4, areaDemand.size()));
+		for(DemandListBo demandListBo:fourMaxareaDemand) {
+			if(demandListBo.getPictureUrl()==null || !demandListBo.getPictureUrl().contains("."))demandListBo.setPictureUrl(null);
+			else demandListBo.setPictureUrl(demandListBo.getPictureUrl().split(",")[0]);
+		}
+		LimitLengthUtil.limiteDemandLength(fourMaxareaDemand,10,208);
+		modelview.addObject("areaDemandList",fourMaxareaDemand);
+		
+		//产学研需求 最多9个
+		List<DemandListBo> proLearnStudyDemand=demandService.proLearnStudyDemand();
+		List <DemandListBo>nightMaxProLearnStudyDemand=proLearnStudyDemand.subList(0,Math.min(4, proLearnStudyDemand.size()));
+		for(DemandListBo demandListBo:nightMaxProLearnStudyDemand) {
+			if(demandListBo.getPictureUrl()==null || !demandListBo.getPictureUrl().contains("."))demandListBo.setPictureUrl(null);
+			else demandListBo.setPictureUrl(demandListBo.getPictureUrl().split(",")[0]);
+		}
+		LimitLengthUtil.limiteDemandLength(nightMaxProLearnStudyDemand,10,208);
+		modelview.addObject("proLearnStudyDemandList",nightMaxProLearnStudyDemand);
+		
+		
+		return modelview;
+	}
 	
-	
-	
+
+
 }

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

@@ -1,68 +1,81 @@
-package com.goafanti.common.dao;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.ibatis.annotations.Param;
-
-import com.goafanti.common.model.Demand;
-import com.goafanti.demand.bo.DemandInterestBo;
-import com.goafanti.demand.bo.DemandListBo;
-import com.goafanti.demand.bo.DemandManageDetailBo;
-import com.goafanti.demand.bo.DemandRecommended;
-import com.goafanti.portal.bo.DemandPortalDetailBo;
-import com.goafanti.portal.bo.DemandPortalSimilarListBo;
-import com.goafanti.portal.bo.DemandSearchDetailBo;
-
-public interface DemandMapper {
-	int deleteByPrimaryKey(String id);
-
-	int insert(Demand record);
-
-	int insertSelective(Demand record);
-
-	Demand selectByPrimaryKey(String id);
-
-	int updateByPrimaryKeySelective(Demand record);
-
-	int updateByPrimaryKey(Demand record);
-
-	DemandManageDetailBo selectUserDemandDetail(String id);
-
-	int batchDeleteByPrimaryKey(List<String> id);
-
-	DemandManageDetailBo selectOrgDemandDetail(String id);
-
-	int updateReleaseDate(String id);
-
-	void insertBatch(List<Demand> demandList);
-
-	DemandSearchDetailBo selectDemandSearchDetail(String uid, String id);
-
-	Integer findDemandNumByUid(String uid);
-
-	DemandPortalDetailBo findOrgPortalDemandDetail(@Param("id")String id, @Param("uid")String uid);
-
-	DemandPortalDetailBo findUserPortalDemandDetail(@Param("id")String id, @Param("uid")String uid);
-
-	List<DemandPortalSimilarListBo> findByIndustryCategoryA(@Param("industryCategoryA") Integer industryCategoryA,
-			@Param("id") String id);
-
-	int updateEmployerId(String id);
-	
-	ArrayList<DemandListBo> selectDemandList (Integer boutique);
-	
-	List<DemandListBo> selectCsutomerLike(String uid);
-		
-	int countInterest(String demandId);
-
-	List<DemandInterestBo> demandInterest(String uid);
-
-	Demand selectDemandDetail(String id);
-
-	DemandListBo selectAppByPrimaryKey(String id);
-
-	List<DemandRecommended> getAppHomeRecommended();
-
-	Demand selectDemandFollow(String id);
+package com.goafanti.common.dao;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+
+import com.goafanti.common.model.Demand;
+import com.goafanti.demand.bo.DemandInterestBo;
+import com.goafanti.demand.bo.DemandListBo;
+import com.goafanti.demand.bo.DemandManageDetailBo;
+import com.goafanti.demand.bo.DemandRecommended;
+import com.goafanti.portal.bo.DemandPortalDetailBo;
+import com.goafanti.portal.bo.DemandPortalSimilarListBo;
+import com.goafanti.portal.bo.DemandSearchDetailBo;
+
+public interface DemandMapper {
+	int deleteByPrimaryKey(String id);
+
+	int insert(Demand record);
+
+	int insertSelective(Demand record);
+
+	Demand selectByPrimaryKey(String id);
+
+	int updateByPrimaryKeySelective(Demand record);
+
+	int updateByPrimaryKey(Demand record);
+
+	DemandManageDetailBo selectUserDemandDetail(String id);
+
+	int batchDeleteByPrimaryKey(List<String> id);
+
+	DemandManageDetailBo selectOrgDemandDetail(String id);
+
+	int updateReleaseDate(String id);
+
+	void insertBatch(List<Demand> demandList);
+
+	DemandSearchDetailBo selectDemandSearchDetail(String uid, String id);
+
+	Integer findDemandNumByUid(String uid);
+
+	DemandPortalDetailBo findOrgPortalDemandDetail(@Param("id")String id, @Param("uid")String uid);
+
+	DemandPortalDetailBo findUserPortalDemandDetail(@Param("id")String id, @Param("uid")String uid);
+
+	List<DemandPortalSimilarListBo> findByIndustryCategoryA(@Param("industryCategoryA") Integer industryCategoryA,
+			@Param("id") String id);
+
+	int updateEmployerId(String id);
+	
+	ArrayList<DemandListBo> selectDemandList (Integer boutique);
+	
+	List<DemandListBo> selectCsutomerLike(String uid);
+		
+	int countInterest(String demandId);
+
+	List<DemandInterestBo> demandInterest(String uid);
+
+	Demand selectDemandDetail(String id);
+
+	DemandListBo selectAppByPrimaryKey(String id);
+
+	List<DemandRecommended> getAppHomeRecommended();
+
+	Demand selectDemandFollow(String id);
+	
+	List<DemandListBo> selectRecentDemand();
+	
+	List<DemandListBo> selectCompanyDemand();
+	
+	List<DemandListBo> getUrgentDemand();
+	
+	List<DemandListBo> getHotDemand();
+	
+	List<DemandListBo> getAreaDemand();
+	
+	List<DemandListBo> 	getProLearnStudyDemand();
+
 }

文件差異過大導致無法顯示
+ 2157 - 2131
src/main/java/com/goafanti/common/mapper/DemandMapper.xml


+ 88 - 0
src/main/java/com/goafanti/common/utils/LimitLengthUtil.java

@@ -0,0 +1,88 @@
+package com.goafanti.common.utils;
+
+import java.util.List;
+
+import com.goafanti.demand.bo.DemandListBo;
+
+public class LimitLengthUtil {
+	
+	//科技需求首页
+	public static void limiteDemandLength(List<DemandListBo> list,int titleLength,int descripLength) {
+		for(DemandListBo demandListBo:list) {
+			demandListBo.setName(limitLengthAndAddPoints(demandListBo.getName(),titleLength ));
+			demandListBo.setProblemDes(limitLengthAndAddPoints(demandListBo.getProblemDes(), descripLength));
+		}
+	}
+	public static void limiteDemandCompanyAndName(List<DemandListBo> list,int titleLength,int descripLength) {
+		for(DemandListBo demandListBo:list) {
+			demandListBo.setName(limitLengthAndAddPoints(demandListBo.getName(),titleLength ));
+			demandListBo.setEmployerName(limitLengthAndAddPoints(toConceal(demandListBo.getEmployerName()), descripLength));
+		}
+	}
+
+	public static String limitLengthAndAddPoints(String s,int l) {
+		
+		if(s!=null) {
+			if(s.length()>l) {
+				String reString=s.substring(0, l);
+				StringBuilder stringBuilder=new StringBuilder(reString);
+				stringBuilder.append("...");
+				return stringBuilder.toString();
+				
+			}
+			else return s;
+			
+		}
+		return s;
+	}
+	
+	//脱敏
+	private static final int SIZE = 8;
+    private static final String SYMBOL = "*";
+
+    public static String toConceal(String value) {
+        if (null == value || "".equals(value)) {
+            return value;
+        }
+        int len = value.length();
+        int pamaone = len / 2;
+        int pamatwo = pamaone - 1;
+        int pamathree = len % 2;
+        StringBuilder stringBuilder = new StringBuilder();
+        if (len <= 2) {
+            if (pamathree == 1) {
+                return SYMBOL;
+            }
+            stringBuilder.append(SYMBOL);
+            stringBuilder.append(value.charAt(len - 1));
+        } else {
+            if (pamatwo <= 0) {
+                stringBuilder.append(value.substring(0, 1));
+                stringBuilder.append(SYMBOL);
+                stringBuilder.append(value.substring(len - 1, len));
+
+            } else if (pamatwo >= SIZE / 2 && SIZE + 1 != len) {
+                int pamafive = (len - SIZE) / 2;
+                stringBuilder.append(value.substring(0, pamafive));
+                for (int i = 0; i < SIZE; i++) {
+                    stringBuilder.append(SYMBOL);
+                }
+                if ((pamathree == 0 && SIZE / 2 == 0) || (pamathree != 0 && SIZE % 2 != 0)) {
+                    stringBuilder.append(value.substring(len - pamafive, len));
+                } else {
+                    stringBuilder.append(value.substring(len - (pamafive + 1), len));
+                }
+            } else {
+                int pamafour = len - 2;
+                stringBuilder.append(value.substring(0, 1));
+                for (int i = 0; i < pamafour; i++) {
+                    stringBuilder.append(SYMBOL);
+                }
+                stringBuilder.append(value.substring(len - 1, len));
+            }
+        }
+        return stringBuilder.toString();
+
+    }
+
+}

+ 504 - 469
src/main/java/com/goafanti/demand/bo/DemandListBo.java

@@ -1,469 +1,504 @@
-package com.goafanti.demand.bo;
-
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
-
-import org.apache.commons.lang3.time.DateFormatUtils;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.annotation.JsonFormat.Shape;
-import com.goafanti.common.constant.AFTConstants;
-import com.goafanti.common.utils.StringUtils;
-
-public class DemandListBo {
-
-	private String	id;
-
-	/**
-	 * 编号
-	 */
-	private Integer	serialNumber;
-
-	/**
-	 * 数据类别(0-个人需求,1-单位需求)
-	 */
-	private Integer	dataCategory;
-
-	/**
-	 * 名称
-	 */
-	private String	name;
-
-	/**
-	 * 关键词
-	 */
-	private String	keyword;
-
-	/**
-	 * 发布时间
-	 */
-	private Date	releaseDate;
-
-	/**
-	 * 需求类型 
-	 */
-	private Integer	demandType;
-	private String	demandTypeS;
-	
-	private BigDecimal budgetCost;
-
-	private Date	validityPeriod;
-
-	private Integer	status;
-	
-	private Integer fixedbudget;
-	
-	private Integer		industryCategoryA;
-
-	private Integer		industryCategoryB;
-	
-	private Integer		industryCategoryC;
-	
-	private String      problemDes;
-
-	private String		pictureUrl;
-	private String		industryCategory1;
-	
-	private String		industryCategory2;
-	
-	private Integer 	boutique;
-	
-
-	private String		industryCategory3;
-	
-	private String 	interest;
-	
-	/**
-	 * 是否发布(0-未发布,1-发布)
-	 */
-	private Integer	releaseStatus;
-
-	private String	employerId;
-	
-	private String  employerAddress;
-
-	/**
-	 * 审核状态
-	 */
-	private Integer	auditStatus;
-
-	/**
-	 * 关注数量
-	 */
-	private String countInterest;
-	/**
-	 *  
-	 */
-	private Integer  urgentDays;
-	private BigDecimal urgentMoney;
-
-	
-	private Date createTime;
-	
-	private String remark;
-	/**
-	 * 环信ID
-	 */
-	private String easemobName;
-	/**
-	 * 接单数
-	 */
-	private String orderCount;
-	
-	private String orderIntentionCount; 
-	
-	private String		industryCategoryAS;
-	
-	private String contacts;
-	private String contactMobile;
-	
-
-	@JsonFormat(shape = Shape.STRING)
-	public String getIndustryCategory1() {
-		return industryCategory1;
-	}
-	
-	public void setIndustryCategory1(String industryCategory1) {
-		this.industryCategory1 = industryCategory1;
-	}
-	
-	public String getIndustryCategory2() {
-		return industryCategory2;
-	}
-	
-	public void setIndustryCategory2(String industryCategory2) {
-		this.industryCategory2 = industryCategory2;
-	}
-	
-	public String getIndustryCategory3() {
-		return industryCategory3;
-	}
-	
-	public void setIndustryCategory3(String industryCategory3) {
-		this.industryCategory3 = industryCategory3;
-	}
-	public Integer getAuditStatus() {
-		return auditStatus;
-	}
-
-	public void setAuditStatus(Integer auditStatus) {
-		this.auditStatus = auditStatus;
-	}
-
-	public String getEmployerId() {
-		return employerId;
-	}
-
-	public void setEmployerId(String employerId) {
-		this.employerId = employerId;
-	}
-
-	public String getId() {
-		return id;
-	}
-
-	public void setId(String id) {
-		this.id = id;
-	}
-
-	public Integer getSerialNumber() {
-		return serialNumber;
-	}
-
-	public void setSerialNumber(Integer serialNumber) {
-		this.serialNumber = serialNumber;
-	}
-
-	public Integer getDataCategory() {
-		return dataCategory;
-	}
-
-	public void setDataCategory(Integer dataCategory) {
-		this.dataCategory = dataCategory;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getKeyword() {
-		return keyword;
-	}
-
-	public void setKeyword(String keyword) {
-		this.keyword = keyword;
-	}
-
-	@JsonFormat(shape = Shape.STRING)
-	public Integer getDemandType() {
-		return demandType;
-	}
-
-	public void setDemandType(Integer demandType) {
-		this.demandType = demandType;
-	}
-
-	public Date getValidityPeriod() {
-		return validityPeriod;
-	}
-
-	public void setValidityPeriod(Date validityPeriod) {
-		this.validityPeriod = validityPeriod;
-	}
-
-	@JsonFormat(shape = Shape.STRING)
-	public Integer getStatus() {
-		return status;
-	}
-
-	public void setStatus(Integer status) {
-		this.status = status;
-	}
-
-	public Integer getReleaseStatus() {
-		return releaseStatus;
-	}
-
-	public void setReleaseStatus(Integer releaseStatus) {
-		this.releaseStatus = releaseStatus;
-	}
-
-	public Date getReleaseDate() {
-		return releaseDate;
-	}
-
-	public void setReleaseDate(Date releaseDate) {
-		this.releaseDate = releaseDate;
-	}
-
-	public String getValidityPeriodFormattedDate() {
-		if (this.validityPeriod == null) {
-			return null;
-		} else {
-			return DateFormatUtils.format(this.getValidityPeriod(), AFTConstants.YYYYMMDDHHMMSS);
-		}
-	}
-
-	public void setValidityPeriodFormattedDate(String validityPeriodFormattedDate) {
-
-	}
-
-	public String getReleaseDateFormattedDate() {
-		if (this.releaseDate == null) {
-			return null;
-		} else {
-			return DateFormatUtils.format(this.getReleaseDate(), AFTConstants.YYYYMMDDHHMMSS);
-		}
-	}
-
-	public void setReleaseDateFormattedDate(String releaseDateFormattedDate) {
-
-	}
-
-	public Integer getFixedbudget() {
-		return fixedbudget;
-	}
-
-	public void setFixedbudget(Integer fixedbudget) {
-		this.fixedbudget = fixedbudget;
-	}
-
-	public Integer getIndustryCategoryA() {
-		return industryCategoryA;
-	}
-
-	public void setIndustryCategoryA(Integer industryCategoryA) {
-		this.industryCategoryA = industryCategoryA;
-	}
-
-	public Integer getIndustryCategoryB() {
-		return industryCategoryB;
-	}
-
-	public void setIndustryCategoryB(Integer industryCategoryB) {
-		this.industryCategoryB = industryCategoryB;
-	}
-
-	public String getPictureUrl() {
-		return pictureUrl;
-	}
-
-	public void setPictureUrl(String pictureUrl) {
-		this.pictureUrl = pictureUrl;
-	}
-	
-	public List<String> getPictureUrls() {
-		List<String> list=new ArrayList<String>();
-		if (this.pictureUrl == null) {
-			return list;
-		} else {
-			String []s=pictureUrl.split(",");
-			 list = Arrays.asList(s);  
-			return list;
-		}
-	}
-
-	public String getDemandTypeS() {
-		return demandTypeS;
-	}
-
-	public void setDemandTypeS(String demandTypeS) {
-		this.demandTypeS = demandTypeS;
-	}
-
-
-	public String getCountInterest() {
-		if (StringUtils.isBlank(countInterest)) countInterest = "0";
-		return String.valueOf(Integer.valueOf(countInterest)+20);
-	}
-
-	public void setCountInterest(String countInterest) {
-		this.countInterest = countInterest;
-	}
-
-	public Integer getUrgentDays() {
-		return urgentDays;
-	}
-
-	public void setUrgentDays(Integer urgentDays) {
-		this.urgentDays = urgentDays;
-	}
-
-	public BigDecimal getUrgentMoney() {
-		return urgentMoney;
-	}
-
-	public void setUrgentMoney(BigDecimal urgentMoney) {
-		this.urgentMoney = urgentMoney;
-	}
-
-	public String getEmployerAddress() {
-		if (StringUtils.isEmpty(employerAddress)) {
-			return "湖南长沙";
-		}
-		return employerAddress;
-	}
-
-	public void setEmployerAddress(String employerAddress) {
-		this.employerAddress = employerAddress;
-	}
-
-	public String getProblemDes() {
-		return problemDes;
-	}
-
-	public void setProblemDes(String problemDes) {
-		this.problemDes = problemDes;
-	}
-
-	public Integer getIndustryCategoryC() {
-		return industryCategoryC;
-	}
-
-	public void setIndustryCategoryC(Integer industryCategoryC) {
-		this.industryCategoryC = industryCategoryC;
-	}
-	public Date getCreateTime() {
-		return createTime;
-	}
-
-	public void setCreateTime(Date createTime) {
-		this.createTime = createTime;
-	}
-	public String getCreateTimeFormattedDate() {
-		if (this.createTime == null) {
-			return null;
-		} else {
-			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
-		}
-	}
-
-	public String getRemark() {
-		return remark;
-	}
-
-	public void setRemark(String remark) {
-		this.remark = remark;
-
-	}
-
-	public Integer getBoutique() {
-		return boutique;
-	}
-
-	public void setBoutique(Integer boutique) {
-		this.boutique = boutique;
-	}
-
-	public BigDecimal getBudgetCost() {
-		return budgetCost;
-	}
-
-	public void setBudgetCost(BigDecimal budgetCost) {
-		this.budgetCost = budgetCost;
-	}
-
-	public String getInterest() {
-		return interest;
-	}
-
-	public void setInterest(String interest) {
-		this.interest = interest;
-	}
-
-	public String getEasemobName() {
-		return easemobName;
-	}
-
-	public void setEasemobName(String easemobName) {
-		this.easemobName = easemobName;
-	}
-
-	public String getOrderCount() {
-		return orderCount;
-	}
-
-	public void setOrderCount(String orderCount) {
-		this.orderCount = orderCount;
-	}
-
-	public String getOrderIntentionCount() {
-		return orderIntentionCount;
-	}
-
-	public void setOrderIntentionCount(String orderIntentionCount) {
-		this.orderIntentionCount = orderIntentionCount;
-	}
-
-	public String getIndustryCategoryAS() {
-		return industryCategoryAS;
-	}
-
-	public void setIndustryCategoryAS(String industryCategoryAS) {
-		this.industryCategoryAS = industryCategoryAS;
-	}
-
-	public String getContacts() {
-		return contacts;
-	}
-
-	public void setContacts(String contacts) {
-		this.contacts = contacts;
-	}
-
-	public String getContactMobile() {
-		return contactMobile;
-	}
-
-	public void setContactMobile(String contactMobile) {
-		this.contactMobile = contactMobile;
-	}
-
-}
+package com.goafanti.demand.bo;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonFormat.Shape;
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.utils.StringUtils;
+
+public class DemandListBo {
+
+	private String	id;
+
+	/**
+	 * 编号
+	 */
+	private Integer	serialNumber;
+
+	/**
+	 * 数据类别(0-个人需求,1-单位需求)
+	 */
+	private Integer	dataCategory;
+
+	/**
+	 * 名称
+	 */
+	private String	name;
+
+	/**
+	 * 关键词
+	 */
+	private String	keyword;
+
+	/**
+	 * 发布时间
+	 */
+	private Date	releaseDate;
+
+	/**
+	 * 需求类型 
+	 */
+	private Integer	demandType;
+	private String	demandTypeS;
+	
+	private BigDecimal budgetCost;
+
+	private Date	validityPeriod;
+
+	private Integer	status;
+	
+	private Integer fixedbudget;
+	
+	private Integer		industryCategoryA;
+
+	private Integer		industryCategoryB;
+	
+	private Integer		industryCategoryC;
+	
+	private String      problemDes;
+
+	private String		pictureUrl;
+	private String		industryCategory1;
+	
+	private String		industryCategory2;
+	
+	private Integer 	boutique;
+	
+
+	private String		industryCategory3;
+	
+	private String 	interest;
+	
+	/**
+	 * 是否发布(0-未发布,1-发布)
+	 */
+	private Integer	releaseStatus;
+
+	private String	employerId;
+	
+	private String  employerAddress;
+
+	/**
+	 * 审核状态
+	 */
+	private Integer	auditStatus;
+
+	/**
+	 * 关注数量
+	 */
+	private String countInterest;
+	/**
+	 *  
+	 */
+	private Integer  urgentDays;
+	private BigDecimal urgentMoney;
+
+	
+	private Date createTime;
+	
+	private String remark;
+	/**
+	 * 环信ID
+	 */
+	private String easemobName;
+	/**
+	 * 接单数
+	 */
+	private String orderCount;
+	
+	private String orderIntentionCount; 
+	
+	private String		industryCategoryAS;
+	
+	private String contacts;
+	private String contactMobile;
+	private String employerName;
+	private Integer researchType;
+	private BigDecimal fundForPersonnel;
+	private BigDecimal fundForCrowd;
+	
+	public Integer getResearchType() {
+		return researchType;
+	}
+
+	public void setResearchType(Integer researchType) {
+		this.researchType = researchType;
+	}
+
+	public BigDecimal getFundForPersonnel() {
+		return fundForPersonnel;
+	}
+
+	public void setFundForPersonnel(BigDecimal fundForpersonnel) {
+		this.fundForPersonnel = fundForpersonnel;
+	}
+
+	public BigDecimal getFundForCrowd() {
+		return fundForCrowd;
+	}
+
+	public void setFundForCrowd(BigDecimal fundForCrowd) {
+		this.fundForCrowd = fundForCrowd;
+	}
+
+	public String getEmployerName() {
+		return employerName;
+	}
+
+	public void setEmployerName(String employerName) {
+		this.employerName = employerName;
+	}
+
+	@JsonFormat(shape = Shape.STRING)
+	public String getIndustryCategory1() {
+		return industryCategory1;
+	}
+	
+	public void setIndustryCategory1(String industryCategory1) {
+		this.industryCategory1 = industryCategory1;
+	}
+	
+	public String getIndustryCategory2() {
+		return industryCategory2;
+	}
+	
+	public void setIndustryCategory2(String industryCategory2) {
+		this.industryCategory2 = industryCategory2;
+	}
+	
+	public String getIndustryCategory3() {
+		return industryCategory3;
+	}
+	
+	public void setIndustryCategory3(String industryCategory3) {
+		this.industryCategory3 = industryCategory3;
+	}
+	public Integer getAuditStatus() {
+		return auditStatus;
+	}
+
+	public void setAuditStatus(Integer auditStatus) {
+		this.auditStatus = auditStatus;
+	}
+
+	public String getEmployerId() {
+		return employerId;
+	}
+
+	public void setEmployerId(String employerId) {
+		this.employerId = employerId;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public Integer getSerialNumber() {
+		return serialNumber;
+	}
+
+	public void setSerialNumber(Integer serialNumber) {
+		this.serialNumber = serialNumber;
+	}
+
+	public Integer getDataCategory() {
+		return dataCategory;
+	}
+
+	public void setDataCategory(Integer dataCategory) {
+		this.dataCategory = dataCategory;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getKeyword() {
+		return keyword;
+	}
+
+	public void setKeyword(String keyword) {
+		this.keyword = keyword;
+	}
+
+	@JsonFormat(shape = Shape.STRING)
+	public Integer getDemandType() {
+		return demandType;
+	}
+
+	public void setDemandType(Integer demandType) {
+		this.demandType = demandType;
+	}
+
+	public Date getValidityPeriod() {
+		return validityPeriod;
+	}
+
+	public void setValidityPeriod(Date validityPeriod) {
+		this.validityPeriod = validityPeriod;
+	}
+
+	@JsonFormat(shape = Shape.STRING)
+	public Integer getStatus() {
+		return status;
+	}
+
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+
+	public Integer getReleaseStatus() {
+		return releaseStatus;
+	}
+
+	public void setReleaseStatus(Integer releaseStatus) {
+		this.releaseStatus = releaseStatus;
+	}
+
+	public Date getReleaseDate() {
+		return releaseDate;
+	}
+
+	public void setReleaseDate(Date releaseDate) {
+		this.releaseDate = releaseDate;
+	}
+
+	public String getValidityPeriodFormattedDate() {
+		if (this.validityPeriod == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getValidityPeriod(), AFTConstants.YYYYMMDDHHMMSS);
+		}
+	}
+
+	public void setValidityPeriodFormattedDate(String validityPeriodFormattedDate) {
+
+	}
+
+	public String getReleaseDateFormattedDate() {
+		if (this.releaseDate == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getReleaseDate(), AFTConstants.YYYYMMDDHHMMSS);
+		}
+	}
+
+	public void setReleaseDateFormattedDate(String releaseDateFormattedDate) {
+
+	}
+
+	public Integer getFixedbudget() {
+		return fixedbudget;
+	}
+
+	public void setFixedbudget(Integer fixedbudget) {
+		this.fixedbudget = fixedbudget;
+	}
+
+	public Integer getIndustryCategoryA() {
+		return industryCategoryA;
+	}
+
+	public void setIndustryCategoryA(Integer industryCategoryA) {
+		this.industryCategoryA = industryCategoryA;
+	}
+
+	public Integer getIndustryCategoryB() {
+		return industryCategoryB;
+	}
+
+	public void setIndustryCategoryB(Integer industryCategoryB) {
+		this.industryCategoryB = industryCategoryB;
+	}
+
+	public String getPictureUrl() {
+		return pictureUrl;
+	}
+
+	public void setPictureUrl(String pictureUrl) {
+		this.pictureUrl = pictureUrl;
+	}
+	
+	public List<String> getPictureUrls() {
+		List<String> list=new ArrayList<String>();
+		if (this.pictureUrl == null) {
+			return list;
+		} else {
+			String []s=pictureUrl.split(",");
+			 list = Arrays.asList(s);  
+			return list;
+		}
+	}
+
+	public String getDemandTypeS() {
+		return demandTypeS;
+	}
+
+	public void setDemandTypeS(String demandTypeS) {
+		this.demandTypeS = demandTypeS;
+	}
+
+
+	public String getCountInterest() {
+		if (StringUtils.isBlank(countInterest)) countInterest = "0";
+		return String.valueOf(Integer.valueOf(countInterest)+20);
+	}
+
+	public void setCountInterest(String countInterest) {
+		this.countInterest = countInterest;
+	}
+
+	public Integer getUrgentDays() {
+		return urgentDays;
+	}
+
+	public void setUrgentDays(Integer urgentDays) {
+		this.urgentDays = urgentDays;
+	}
+
+	public BigDecimal getUrgentMoney() {
+		return urgentMoney;
+	}
+
+	public void setUrgentMoney(BigDecimal urgentMoney) {
+		this.urgentMoney = urgentMoney;
+	}
+
+	public String getEmployerAddress() {
+		if (StringUtils.isEmpty(employerAddress)) {
+			return "湖南长沙";
+		}
+		return employerAddress;
+	}
+
+	public void setEmployerAddress(String employerAddress) {
+		this.employerAddress = employerAddress;
+	}
+
+	public String getProblemDes() {
+		return problemDes;
+	}
+
+	public void setProblemDes(String problemDes) {
+		this.problemDes = problemDes;
+	}
+
+	public Integer getIndustryCategoryC() {
+		return industryCategoryC;
+	}
+
+	public void setIndustryCategoryC(Integer industryCategoryC) {
+		this.industryCategoryC = industryCategoryC;
+	}
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+	public String getCreateTimeFormattedDate() {
+		if (this.createTime == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
+		}
+	}
+
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+
+	}
+
+	public Integer getBoutique() {
+		return boutique;
+	}
+
+	public void setBoutique(Integer boutique) {
+		this.boutique = boutique;
+	}
+
+	public BigDecimal getBudgetCost() {
+		return budgetCost;
+	}
+
+	public void setBudgetCost(BigDecimal budgetCost) {
+		this.budgetCost = budgetCost;
+	}
+
+	public String getInterest() {
+		return interest;
+	}
+
+	public void setInterest(String interest) {
+		this.interest = interest;
+	}
+
+	public String getEasemobName() {
+		return easemobName;
+	}
+
+	public void setEasemobName(String easemobName) {
+		this.easemobName = easemobName;
+	}
+
+	public String getOrderCount() {
+		return orderCount;
+	}
+
+	public void setOrderCount(String orderCount) {
+		this.orderCount = orderCount;
+	}
+
+	public String getOrderIntentionCount() {
+		return orderIntentionCount;
+	}
+
+	public void setOrderIntentionCount(String orderIntentionCount) {
+		this.orderIntentionCount = orderIntentionCount;
+	}
+
+	public String getIndustryCategoryAS() {
+		return industryCategoryAS;
+	}
+
+	public void setIndustryCategoryAS(String industryCategoryAS) {
+		this.industryCategoryAS = industryCategoryAS;
+	}
+
+	public String getContacts() {
+		return contacts;
+	}
+
+	public void setContacts(String contacts) {
+		this.contacts = contacts;
+	}
+
+	public String getContactMobile() {
+		return contactMobile;
+	}
+
+	public void setContactMobile(String contactMobile) {
+		this.contactMobile = contactMobile;
+	}
+
+}

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

@@ -1,112 +1,126 @@
-package com.goafanti.demand.service;
-
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.List;
-
-import com.goafanti.achievement.bo.AchievementDemandListBo;
-import com.goafanti.common.model.Demand;
-import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.demand.bo.DemandImportBo;
-import com.goafanti.demand.bo.DemandListBo;
-import com.goafanti.demand.bo.DemandManageDetailBo;
-import com.goafanti.demand.bo.DemandManageListBo;
-import com.goafanti.demand.bo.DemandPartnerListBo;
-import com.goafanti.demand.bo.ObjectInterestListBo;
-import com.goafanti.portal.bo.BoutiqueListBo;
-import com.goafanti.portal.bo.DemandPortalDetailBo;
-import com.goafanti.portal.bo.DemandPortalSimilarListBo;
-import com.goafanti.portal.bo.DemandSearchDetailBo;
-import com.goafanti.portal.bo.DemandSearchListBo;
-
-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,String createDateStartDate, String createDateEndDate, Integer pNo, Integer pSize,Integer boutique,Integer hot);
-
-	Pagination<DemandManageListBo> selectOrgDemandManageList(Integer dataCategory,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 createDateStartDate, String createDateEndDate, Integer pNo, Integer pSize,Integer boutique,Integer hot,String techBrokerId,String recordPerson);
-
-	void saveUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords);
-
-	int updateUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords, Integer switchSign);
-
-	DemandManageDetailBo selectUserDemandDetail(String id);
-
-	int deleteByPrimaryKey(List<String> asList);
-
-	DemandManageDetailBo selectOrgDemandDetail(String id);
-
-	Demand selectByPrimaryKey(String id);
-
-	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,String createDateStartDate, String createDateEndDate, Integer pNo, Integer pSize);
-
-	int updateReleaseStatus(Demand d);
-
-	int updateAuditDemand(Demand d, String techBroderId, Integer auditStatus);
-
-	void saveDemand(Demand d, String validityPeriodFormattedDate, String keywords[]);
-
-	List<AchievementDemandListBo> selectAchievementDemandListByDemandId(String id);
-
-	void insertImport(List<DemandImportBo> data);
-
-	Pagination<DemandSearchListBo> listDemandSearchList(String url,Integer sign, String keyword, Integer industryCategoryA,
-			Integer industryCategoryB, Integer demandType, BigDecimal budgetCostLower, BigDecimal budgetCostUpper,
-			Integer pNo, Integer pSize,Integer dateSort);
-
-	DemandSearchDetailBo selectDemandSearchDetail(String uid, String id);
-
-	int updateMatchAchievement(Demand d);
-
-	Pagination<DemandPartnerListBo> lisePartnerDemand(String employerId, Integer pNo, Integer pSize);
-
-	DemandPortalDetailBo findUserPortalDemandDetail(String id);
-
-	DemandPortalDetailBo findOrgPortalDemandDetail(String id);
-
-	List<DemandPortalSimilarListBo> findByIndustryCategoryA(Integer industryCategoryA, String id);
-
-	int updateByPrimaryKeySelective(Demand d);
-
-	DemandListBo selectDemandDetail( String id);
-
-	/** 精品需求 **/
-	Pagination<BoutiqueListBo> boutiqueSearchList(Integer industryCategoryA,Integer pNo, Integer pSize);
-	
-	/** 查询需求 **/
-	ArrayList<DemandListBo> selectDemandList(Integer boutique);
-	
-	/**猜你喜欢**/
-	List<DemandListBo> selectCsutomerLike();
-
-	Pagination<DemandSearchListBo> listAppDemand(Integer auditStatus, Integer serialNumber, String name, String keyword, Integer demandType,Integer industryCategoryA,
-			String validityPeriodStartDate, String validityPeriodEndDate, Integer status, Integer releaseStatus,
-			String releaseDateStartDate, String releaseDateEndDate,String employerId, Integer pNo, Integer pSize);
-
-	Pagination<ObjectInterestListBo> selectinterest(Integer type,Integer pageNo, Integer pageSize);
-
-	Pagination<DemandSearchListBo> listMyDemand(Integer pNo, Integer pSize);
-
-
-	int saveAppUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords);
-
-
-	Pagination<DemandManageListBo> selectMyDemandManageList(Integer dataCategory,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 createDateStartDate, String createDateEndDate, Integer pNo, Integer pSize,Integer boutique,Integer hot,String techBrokerId);
-	
-	Pagination<DemandManageListBo> selectManageDemandManageList(Integer dataCategory,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 createDateStartDate, String createDateEndDate, Integer pNo, Integer pSize,Integer boutique,Integer hot,String techBrokerId,String recordPerson);
-
-	Demand DemandFollowDetails(String id);
+package com.goafanti.demand.service;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.goafanti.achievement.bo.AchievementDemandListBo;
+import com.goafanti.common.model.Demand;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.demand.bo.DemandImportBo;
+import com.goafanti.demand.bo.DemandListBo;
+import com.goafanti.demand.bo.DemandManageDetailBo;
+import com.goafanti.demand.bo.DemandManageListBo;
+import com.goafanti.demand.bo.DemandPartnerListBo;
+import com.goafanti.demand.bo.ObjectInterestListBo;
+import com.goafanti.portal.bo.BoutiqueListBo;
+import com.goafanti.portal.bo.DemandPortalDetailBo;
+import com.goafanti.portal.bo.DemandPortalSimilarListBo;
+import com.goafanti.portal.bo.DemandSearchDetailBo;
+import com.goafanti.portal.bo.DemandSearchListBo;
+
+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,String createDateStartDate, String createDateEndDate, Integer pNo, Integer pSize,Integer boutique,Integer hot);
+
+	Pagination<DemandManageListBo> selectOrgDemandManageList(Integer dataCategory,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 createDateStartDate, String createDateEndDate, Integer pNo, Integer pSize,Integer boutique,Integer hot,String techBrokerId,String recordPerson);
+
+	void saveUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords);
+
+	int updateUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords, Integer switchSign);
+
+	DemandManageDetailBo selectUserDemandDetail(String id);
+
+	int deleteByPrimaryKey(List<String> asList);
+
+	DemandManageDetailBo selectOrgDemandDetail(String id);
+
+	Demand selectByPrimaryKey(String id);
+
+	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,String createDateStartDate, String createDateEndDate, Integer pNo, Integer pSize);
+
+	int updateReleaseStatus(Demand d);
+
+	int updateAuditDemand(Demand d, String techBroderId, Integer auditStatus);
+
+	void saveDemand(Demand d, String validityPeriodFormattedDate, String keywords[]);
+
+	List<AchievementDemandListBo> selectAchievementDemandListByDemandId(String id);
+
+	void insertImport(List<DemandImportBo> data);
+
+	Pagination<DemandSearchListBo> listDemandSearchList(String url,Integer sign, String keyword, Integer industryCategoryA,
+			Integer industryCategoryB, Integer demandType, BigDecimal budgetCostLower, BigDecimal budgetCostUpper,
+			Integer pNo, Integer pSize,Integer dateSort);
+
+	DemandSearchDetailBo selectDemandSearchDetail(String uid, String id);
+
+	int updateMatchAchievement(Demand d);
+
+	Pagination<DemandPartnerListBo> lisePartnerDemand(String employerId, Integer pNo, Integer pSize);
+
+	DemandPortalDetailBo findUserPortalDemandDetail(String id);
+
+	DemandPortalDetailBo findOrgPortalDemandDetail(String id);
+
+	List<DemandPortalSimilarListBo> findByIndustryCategoryA(Integer industryCategoryA, String id);
+
+	int updateByPrimaryKeySelective(Demand d);
+
+	DemandListBo selectDemandDetail( String id);
+
+	/** 精品需求 **/
+	Pagination<BoutiqueListBo> boutiqueSearchList(Integer industryCategoryA,Integer pNo, Integer pSize);
+	
+	/** 查询需求 **/
+	ArrayList<DemandListBo> selectDemandList(Integer boutique);
+	
+	/**猜你喜欢**/
+	List<DemandListBo> selectCsutomerLike();
+
+	Pagination<DemandSearchListBo> listAppDemand(Integer auditStatus, Integer serialNumber, String name, String keyword, Integer demandType,Integer industryCategoryA,
+			String validityPeriodStartDate, String validityPeriodEndDate, Integer status, Integer releaseStatus,
+			String releaseDateStartDate, String releaseDateEndDate,String employerId, Integer pNo, Integer pSize);
+
+	Pagination<ObjectInterestListBo> selectinterest(Integer type,Integer pageNo, Integer pageSize);
+
+	Pagination<DemandSearchListBo> listMyDemand(Integer pNo, Integer pSize);
+
+
+	int saveAppUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords);
+
+
+	Pagination<DemandManageListBo> selectMyDemandManageList(Integer dataCategory,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 createDateStartDate, String createDateEndDate, Integer pNo, Integer pSize,Integer boutique,Integer hot,String techBrokerId);
+	
+	Pagination<DemandManageListBo> selectManageDemandManageList(Integer dataCategory,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 createDateStartDate, String createDateEndDate, Integer pNo, Integer pSize,Integer boutique,Integer hot,String techBrokerId,String recordPerson);
+
+	Demand DemandFollowDetails(String id);
+	
+	List<DemandListBo> recentDemand();
+	
+	List<DemandListBo> companyDemand();
+	
+	List<DemandListBo> getUrgentDemand();
+	
+	List<DemandListBo> getHotDemand();
+	
+
+	List<DemandListBo> areaDemand();
+	
+	List<DemandListBo> proLearnStudyDemand();
+	
 }

+ 45 - 0
src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java

@@ -80,6 +80,9 @@ import com.goafanti.portal.bo.DemandSearchListBo;
 
 @Service
 public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements DemandService {
+	
+
+
 	@Autowired
 	private DemandMapper					demandMapper;
 	@Autowired
@@ -1107,5 +1110,47 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		return demandMapper.selectDemandFollow(id);
 	}
 		
+	@Override
+	public List<DemandListBo> recentDemand() {
+		// TODO Auto-generated method stub
+		return demandMapper.selectRecentDemand();
+	}
+	
+
+	@Override
+	public List<DemandListBo> companyDemand() {
+		// TODO Auto-generated method stub
+		return demandMapper.selectCompanyDemand();
+	}
+
+	@Override
+	public List<DemandListBo> getUrgentDemand() {
+		// TODO Auto-generated method stub
+		return demandMapper.getUrgentDemand();
+	}
+
+	@Override
+	public List<DemandListBo> getHotDemand() {
+		// TODO Auto-generated method stub
+		return demandMapper.getHotDemand();
+	}
+
+	@Override
+	public List<DemandListBo> areaDemand() {
+		// TODO Auto-generated method stub
+		return demandMapper.getAreaDemand();
+	}
+
+	@Override
+	public List<DemandListBo> proLearnStudyDemand() {
+		// TODO Auto-generated method stub
+		return demandMapper.getProLearnStudyDemand();
+	}
+	
+	
+	
+	
+	
+	
 	
 }

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

@@ -1,78 +1,78 @@
-#Driver
-jdbc.driverClassName=com.mysql.jdbc.Driver
-#\u6570\u636e\u5e93\u94fe\u63a5\uff0c
-jdbc.url=jdbc:mysql://192.168.1.213:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
-#\u5e10\u53f7
-jdbc.username=dev
-#\u5bc6\u7801
-jdbc.password=123456
-#\u68c0\u6d4b\u6570\u636e\u5e93\u94fe\u63a5\u662f\u5426\u6709\u6548\uff0c\u5fc5\u987b\u914d\u7f6e
-jdbc.validationQuery=SELECT 'x'
-#\u521d\u59cb\u8fde\u63a5\u6570
-jdbc.initialSize=3
-#\u6700\u5927\u8fde\u63a5\u6c60\u6570\u91cf
-jdbc.maxActive=20
-#\u53bb\u6389\uff0c\u914d\u7f6e\u6587\u4ef6\u5bf9\u5e94\u53bb\u6389
-#jdbc.maxIdle=20
-#\u914d\u7f6e0,\u5f53\u7ebf\u7a0b\u6c60\u6570\u91cf\u4e0d\u8db3\uff0c\u81ea\u52a8\u8865\u5145\u3002
-jdbc.minIdle=0
-#\u83b7\u53d6\u94fe\u63a5\u8d85\u65f6\u65f6\u95f4\u4e3a1\u5206\u949f\uff0c\u5355\u4f4d\u4e3a\u6beb\u79d2\u3002
-jdbc.maxWait=120000
-#\u83b7\u53d6\u94fe\u63a5\u7684\u65f6\u5019\uff0c\u4e0d\u6821\u9a8c\u662f\u5426\u53ef\u7528\uff0c\u5f00\u542f\u4f1a\u6709\u635f\u6027\u80fd\u3002
-jdbc.testOnBorrow=false
-#\u5f52\u8fd8\u94fe\u63a5\u5230\u8fde\u63a5\u6c60\u7684\u65f6\u5019\u6821\u9a8c\u94fe\u63a5\u662f\u5426\u53ef\u7528\u3002
-jdbc.testOnReturn=false
-#\u6b64\u9879\u914d\u7f6e\u4e3atrue\u5373\u53ef\uff0c\u4e0d\u5f71\u54cd\u6027\u80fd\uff0c\u5e76\u4e14\u4fdd\u8bc1\u5b89\u5168\u6027\u3002\u610f\u4e49\u4e3a\uff1a\u7533\u8bf7\u8fde\u63a5\u7684\u65f6\u5019\u68c0\u6d4b\uff0c\u5982\u679c\u7a7a\u95f2\u65f6\u95f4\u5927\u4e8etimeBetweenEvictionRunsMillis\uff0c\u6267\u884cvalidationQuery\u68c0\u6d4b\u8fde\u63a5\u662f\u5426\u6709\u6548\u3002
-jdbc.testWhileIdle=true
-#1.Destroy\u7ebf\u7a0b\u4f1a\u68c0\u6d4b\u8fde\u63a5\u7684\u95f4\u9694\u65f6\u95f4
-#2.testWhileIdle\u7684\u5224\u65ad\u4f9d\u636e
-jdbc.timeBetweenEvictionRunsMillis=60000
-#\u4e00\u4e2a\u94fe\u63a5\u751f\u5b58\u7684\u65f6\u95f4\uff08\u4e4b\u524d\u7684\u503c\uff1a25200000\uff0c\u8fd9\u4e2a\u65f6\u95f4\u6709\u70b9BT\uff0c\u8fd9\u4e2a\u7ed3\u679c\u4e0d\u77e5\u9053\u662f\u600e\u4e48\u6765\u7684\uff0c\u6362\u7b97\u540e\u7684\u7ed3\u679c\u662f\uff1a25200000/1000/60/60 = 7\u4e2a\u5c0f\u65f6\uff09
-jdbc.minEvictableIdleTimeMillis=300000
-#\u94fe\u63a5\u4f7f\u7528\u8d85\u8fc7\u65f6\u95f4\u9650\u5236\u662f\u5426\u56de\u6536
-jdbc.removeAbandoned=true
-#\u8d85\u8fc7\u65f6\u95f4\u9650\u5236\u65f6\u95f4\uff08\u5355\u4f4d\u79d2\uff09\uff0c\u76ee\u524d\u4e3a5\u5206\u949f\uff0c\u5982\u679c\u6709\u4e1a\u52a1\u5904\u7406\u65f6\u95f4\u8d85\u8fc75\u5206\u949f\uff0c\u53ef\u4ee5\u9002\u5f53\u8c03\u6574\u3002
-jdbc.removeAbandonedTimeout=300
-#\u94fe\u63a5\u56de\u6536\u7684\u65f6\u5019\u63a7\u5236\u53f0\u6253\u5370\u4fe1\u606f\uff0c\u6d4b\u8bd5\u73af\u5883\u53ef\u4ee5\u52a0\u4e0atrue\uff0c\u7ebf\u4e0a\u73af\u5883false\u3002\u4f1a\u5f71\u54cd\u6027\u80fd\u3002
-jdbc.logAbandoned=true
-#\u7edf\u8ba1\u76d1\u63a7
-jdbc.filters=stat
-
-logging.level.com.goafanti=DEBUG
-
-jedis.host=127.0.0.1
-jedis.port=6379
-jedis.timeout=5000
-jedis.password=aft123456
-
-pwd.hash_algorithm_name=md5
-pwd.hash_iterations=2
-
-session.timeout=12000000
-session.validate.timespan=18000000
-
-app.name=AFT
-template.cacheable=false
-
-static.host=//sclient.jishutao.com/client/1.0.50
-portal.host=//sportal.jishutao.com/portal/2.0.6
-avatar.host=//sclient.jishutao.com
-avatar.upload.host=//sclient.jishutao.com/upload
-
-upload.path=F:/jitao/public/upload
-upload.private.path=F:/jitao/private/upload
-
-accessKey=LTAIqTgQLLwz252Z
-accessSecret=ICGuiUnqzaar7urw4zecVcJrJ1MHg9
-aesSecretKey=aft1234567890123
-
-mobileCodeTemplate=SMS_37845022
-patentTemplate=SMS_72005286
-
-easemob.client.url=https://a1.easemob.com/1117170814115609/jitao
-easemob.client.id=YXA6RUDGkIDSEeemq9_4PWzcNA
-easemob.client.secret=YXA61NHE0renI5N8gEgizoI5ivM9SYE
-
-jiguang.appKey=dbcea43366e038073452a04e
-jiguang.masterSecret=59792298288e4f635c737def
+#Driver
+jdbc.driverClassName=com.mysql.jdbc.Driver
+#\u6570\u636e\u5e93\u94fe\u63a5\uff0c
+jdbc.url=jdbc:mysql://192.168.1.213:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+#\u5e10\u53f7
+jdbc.username=dev
+#\u5bc6\u7801
+jdbc.password=123456
+#\u68c0\u6d4b\u6570\u636e\u5e93\u94fe\u63a5\u662f\u5426\u6709\u6548\uff0c\u5fc5\u987b\u914d\u7f6e
+jdbc.validationQuery=SELECT 'x'
+#\u521d\u59cb\u8fde\u63a5\u6570
+jdbc.initialSize=3
+#\u6700\u5927\u8fde\u63a5\u6c60\u6570\u91cf
+jdbc.maxActive=20
+#\u53bb\u6389\uff0c\u914d\u7f6e\u6587\u4ef6\u5bf9\u5e94\u53bb\u6389
+#jdbc.maxIdle=20
+#\u914d\u7f6e0,\u5f53\u7ebf\u7a0b\u6c60\u6570\u91cf\u4e0d\u8db3\uff0c\u81ea\u52a8\u8865\u5145\u3002
+jdbc.minIdle=0
+#\u83b7\u53d6\u94fe\u63a5\u8d85\u65f6\u65f6\u95f4\u4e3a1\u5206\u949f\uff0c\u5355\u4f4d\u4e3a\u6beb\u79d2\u3002
+jdbc.maxWait=120000
+#\u83b7\u53d6\u94fe\u63a5\u7684\u65f6\u5019\uff0c\u4e0d\u6821\u9a8c\u662f\u5426\u53ef\u7528\uff0c\u5f00\u542f\u4f1a\u6709\u635f\u6027\u80fd\u3002
+jdbc.testOnBorrow=false
+#\u5f52\u8fd8\u94fe\u63a5\u5230\u8fde\u63a5\u6c60\u7684\u65f6\u5019\u6821\u9a8c\u94fe\u63a5\u662f\u5426\u53ef\u7528\u3002
+jdbc.testOnReturn=false
+#\u6b64\u9879\u914d\u7f6e\u4e3atrue\u5373\u53ef\uff0c\u4e0d\u5f71\u54cd\u6027\u80fd\uff0c\u5e76\u4e14\u4fdd\u8bc1\u5b89\u5168\u6027\u3002\u610f\u4e49\u4e3a\uff1a\u7533\u8bf7\u8fde\u63a5\u7684\u65f6\u5019\u68c0\u6d4b\uff0c\u5982\u679c\u7a7a\u95f2\u65f6\u95f4\u5927\u4e8etimeBetweenEvictionRunsMillis\uff0c\u6267\u884cvalidationQuery\u68c0\u6d4b\u8fde\u63a5\u662f\u5426\u6709\u6548\u3002
+jdbc.testWhileIdle=true
+#1.Destroy\u7ebf\u7a0b\u4f1a\u68c0\u6d4b\u8fde\u63a5\u7684\u95f4\u9694\u65f6\u95f4
+#2.testWhileIdle\u7684\u5224\u65ad\u4f9d\u636e
+jdbc.timeBetweenEvictionRunsMillis=60000
+#\u4e00\u4e2a\u94fe\u63a5\u751f\u5b58\u7684\u65f6\u95f4\uff08\u4e4b\u524d\u7684\u503c\uff1a25200000\uff0c\u8fd9\u4e2a\u65f6\u95f4\u6709\u70b9BT\uff0c\u8fd9\u4e2a\u7ed3\u679c\u4e0d\u77e5\u9053\u662f\u600e\u4e48\u6765\u7684\uff0c\u6362\u7b97\u540e\u7684\u7ed3\u679c\u662f\uff1a25200000/1000/60/60 = 7\u4e2a\u5c0f\u65f6\uff09
+jdbc.minEvictableIdleTimeMillis=300000
+#\u94fe\u63a5\u4f7f\u7528\u8d85\u8fc7\u65f6\u95f4\u9650\u5236\u662f\u5426\u56de\u6536
+jdbc.removeAbandoned=true
+#\u8d85\u8fc7\u65f6\u95f4\u9650\u5236\u65f6\u95f4\uff08\u5355\u4f4d\u79d2\uff09\uff0c\u76ee\u524d\u4e3a5\u5206\u949f\uff0c\u5982\u679c\u6709\u4e1a\u52a1\u5904\u7406\u65f6\u95f4\u8d85\u8fc75\u5206\u949f\uff0c\u53ef\u4ee5\u9002\u5f53\u8c03\u6574\u3002
+jdbc.removeAbandonedTimeout=300
+#\u94fe\u63a5\u56de\u6536\u7684\u65f6\u5019\u63a7\u5236\u53f0\u6253\u5370\u4fe1\u606f\uff0c\u6d4b\u8bd5\u73af\u5883\u53ef\u4ee5\u52a0\u4e0atrue\uff0c\u7ebf\u4e0a\u73af\u5883false\u3002\u4f1a\u5f71\u54cd\u6027\u80fd\u3002
+jdbc.logAbandoned=true
+#\u7edf\u8ba1\u76d1\u63a7
+jdbc.filters=stat
+
+logging.level.com.goafanti=DEBUG
+
+jedis.host=192.168.1.213
+jedis.port=6379
+jedis.timeout=5000
+jedis.password=aft123456
+
+pwd.hash_algorithm_name=md5
+pwd.hash_iterations=2
+
+session.timeout=12000000
+session.validate.timespan=18000000
+
+app.name=AFT
+template.cacheable=false
+
+static.host=//sclient.jishutao.com/client/1.0.50
+portal.host=//sportal.jishutao.com/portal/2.0.6
+avatar.host=//sclient.jishutao.com
+avatar.upload.host=//sclient.jishutao.com/upload
+
+upload.path=F:/jitao/public/upload
+upload.private.path=F:/jitao/private/upload
+
+accessKey=LTAIqTgQLLwz252Z
+accessSecret=ICGuiUnqzaar7urw4zecVcJrJ1MHg9
+aesSecretKey=aft1234567890123
+
+mobileCodeTemplate=SMS_37845022
+patentTemplate=SMS_72005286
+
+easemob.client.url=https://a1.easemob.com/1117170814115609/jitao
+easemob.client.id=YXA6RUDGkIDSEeemq9_4PWzcNA
+easemob.client.secret=YXA61NHE0renI5N8gEgizoI5ivM9SYE
+
+jiguang.appKey=dbcea43366e038073452a04e
+jiguang.masterSecret=59792298288e4f635c737def
 jiguang.pushUrl=https://api.jpush.cn/v3/push

文件差異過大導致無法顯示
+ 879 - 164
src/main/webapp/WEB-INF/views/portal/technologyTrading/demand.html


+ 127 - 127
src/main/webapp/WEB-INF/web.xml

@@ -1,127 +1,127 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee  
-                             http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
-	version="3.1">
-
-	<display-name>AFT</display-name>
-
-	<!-- The definition of the Root Spring Container shared by all Servlets 
-		and Filters -->
-	<context-param>
-		<param-name>spring.profiles.active</param-name>
-		<param-value>${profiles.activation}</param-value>
-	</context-param>
-
-	<!-- Creates the Spring Container shared by all Servlets and Filters -->
-	<listener>
-		<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
-	</listener>
-	
-	<filter>
-		<filter-name>CorsFilter</filter-name>
-		<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
-		<async-supported>true</async-supported>
-	</filter>
-	<filter-mapping>
-		<filter-name>CorsFilter</filter-name>
-		<url-pattern>/*</url-pattern>
-	</filter-mapping>
-	<filter>
-		<filter-name>encodingFilter</filter-name>
-		<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
-		<async-supported>true</async-supported>
-		<init-param>
-			<param-name>encoding</param-name>
-			<param-value>UTF-8</param-value>
-		</init-param>
-		<init-param>
-			<param-name>forceEncoding</param-name>
-			<param-value>false</param-value>
-		</init-param>
-	</filter>
-	<filter-mapping>
-		<filter-name>encodingFilter</filter-name>
-		<url-pattern>/*</url-pattern>
-	</filter-mapping>
-	<filter>
-		<filter-name>shiroFilter</filter-name>
-		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
-		<async-supported>true</async-supported>
-		<init-param>
-			<param-name>targetFilterLifecycle</param-name>
-			<param-value>true</param-value>
-		</init-param>
-	</filter>
-	<filter-mapping>
-		<filter-name>shiroFilter</filter-name>
-		<url-pattern>/*</url-pattern>
-	</filter-mapping>
-	<!-- Resolve PUT Request Parameters -->
-	<filter>
-		<filter-name>HttpMethodFilter</filter-name>
-		<filter-class>org.springframework.web.filter.HttpPutFormContentFilter</filter-class>
-		<async-supported>true</async-supported>
-	</filter>
-	<filter-mapping>
-		<filter-name>HttpMethodFilter</filter-name>
-		<servlet-name>aft</servlet-name>
-	</filter-mapping>
-	<!-- Processes application requests -->
-	<servlet>
-		<servlet-name>aft</servlet-name>
-		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
-		<init-param>
-			<param-name>contextConfigLocation</param-name>
-			<param-value>classpath:applicationContext.xml</param-value>
-		</init-param>
-		<load-on-startup>1</load-on-startup>
-		<async-supported>true</async-supported>
-	</servlet>
-	
-	<!-- <servlet>
-		<servlet-name>DruidStatView</servlet-name>
-		<servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>
-		<init-param>
-			
-			<param-name>resetEnable</param-name>
-			<param-value>true</param-value>
-		</init-param>
-		<init-param>
-			
-			<param-name>loginUsername</param-name>
-			<param-value>druid</param-value>
-		</init-param>
-		<init-param>
-			
-			<param-name>loginPassword</param-name>
-			<param-value>aft@2016</param-value>
-		</init-param>
-	</servlet>
-	<servlet-mapping>
-		<servlet-name>DruidStatView</servlet-name>
-		<url-pattern>/druid/*</url-pattern>
-	</servlet-mapping> -->
-	<!-- url -->
-	<servlet-mapping>
-		<servlet-name>aft</servlet-name>
-		<url-pattern>/</url-pattern>
-	</servlet-mapping>
-	<error-page>
-		<error-code>400</error-code>
-		<location>/WEB-INF/views/error.jsp</location>
-	</error-page>
-	<error-page>
-		<error-code>403</error-code>
-		<location>/WEB-INF/views/error.jsp</location>
-	</error-page>
-	<error-page>
-		<error-code>404</error-code>
-		<location>/WEB-INF/views/error.jsp</location>
-	</error-page>
-	<error-page>
-		<error-code>500</error-code>
-		<location>/WEB-INF/views/error.jsp</location>
-	</error-page>
-	
-</web-app>
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee  
+                             http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
+	version="3.1">
+
+	<display-name>AFT</display-name>
+
+	<!-- The definition of the Root Spring Container shared by all Servlets 
+		and Filters -->
+	<context-param>
+		<param-name>spring.profiles.active</param-name>
+		<param-value>${profiles.activation}</param-value>
+	</context-param>
+
+	<!-- Creates the Spring Container shared by all Servlets and Filters -->
+	<listener>
+		<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
+	</listener>
+	
+	<filter>
+		<filter-name>CorsFilter</filter-name>
+		<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
+		<async-supported>true</async-supported>
+	</filter>
+	<filter-mapping>
+		<filter-name>CorsFilter</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+	<filter>
+		<filter-name>encodingFilter</filter-name>
+		<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
+		<async-supported>true</async-supported>
+		<init-param>
+			<param-name>encoding</param-name>
+			<param-value>UTF-8</param-value>
+		</init-param>
+		<init-param>
+			<param-name>forceEncoding</param-name>
+			<param-value>false</param-value>
+		</init-param>
+	</filter>
+	<filter-mapping>
+		<filter-name>encodingFilter</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+	<filter>
+		<filter-name>shiroFilter</filter-name>
+		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+		<async-supported>true</async-supported>
+		<init-param>
+			<param-name>targetFilterLifecycle</param-name>
+			<param-value>true</param-value>
+		</init-param>
+	</filter>
+	<filter-mapping>
+		<filter-name>shiroFilter</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+	<!-- Resolve PUT Request Parameters -->
+	<filter>
+		<filter-name>HttpMethodFilter</filter-name>
+		<filter-class>org.springframework.web.filter.HttpPutFormContentFilter</filter-class>
+		<async-supported>true</async-supported>
+	</filter>
+	<filter-mapping>
+		<filter-name>HttpMethodFilter</filter-name>
+		<servlet-name>aft</servlet-name>
+	</filter-mapping>
+	<!-- Processes application requests -->
+	<servlet>
+		<servlet-name>aft</servlet-name>
+		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+		<init-param>
+			<param-name>contextConfigLocation</param-name>
+			<param-value>classpath:applicationContext.xml</param-value>
+		</init-param>
+		<load-on-startup>1</load-on-startup>
+		<async-supported>true</async-supported>
+	</servlet>
+	
+	<!-- <servlet>
+		<servlet-name>DruidStatView</servlet-name>
+		<servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>
+		<init-param>
+			
+			<param-name>resetEnable</param-name>
+			<param-value>true</param-value>
+		</init-param>
+		<init-param>
+			
+			<param-name>loginUsername</param-name>
+			<param-value>druid</param-value>
+		</init-param>
+		<init-param>
+			
+			<param-name>loginPassword</param-name>
+			<param-value>aft@2016</param-value>
+		</init-param>
+	</servlet>
+	<servlet-mapping>
+		<servlet-name>DruidStatView</servlet-name>
+		<url-pattern>/druid/*</url-pattern>
+	</servlet-mapping> -->
+	<!-- url -->
+	<servlet-mapping>
+		<servlet-name>aft</servlet-name>
+		<url-pattern>/</url-pattern>
+	</servlet-mapping>
+	<error-page>
+		<error-code>400</error-code>
+		<location>/WEB-INF/views/error.jsp</location>
+	</error-page>
+	<error-page>
+		<error-code>403</error-code>
+		<location>/WEB-INF/views/error.jsp</location>
+	</error-page>
+	<error-page>
+		<error-code>404</error-code>
+		<location>/WEB-INF/views/error.jsp</location>
+	</error-page>
+	<error-page>
+		<error-code>500</error-code>
+		<location>/WEB-INF/views/error.jsp</location>
+	</error-page>
+	
+</web-app>