wanghui лет назад: 7
Родитель
Сommit
0dda5aa1b9
22 измененных файлов с 541 добавлено и 2310 удалено
  1. 0 4
      src/main/java/com/goafanti/app/controller/AppUserController.java
  2. 0 26
      src/main/java/com/goafanti/common/constant/AFTConstants.java
  3. 54 12
      src/main/java/com/goafanti/common/constant/PageConstants.java
  4. 2 0
      src/main/java/com/goafanti/common/dao/BranchInformationMapper.java
  5. 2 7
      src/main/java/com/goafanti/common/dao/DemandMapper.java
  6. 2 2
      src/main/java/com/goafanti/common/dao/UserMapper.java
  7. 1 1
      src/main/java/com/goafanti/common/enums/DemandAuditStatus.java
  8. 7 0
      src/main/java/com/goafanti/common/mapper/BranchInformationMapper.xml
  9. 7 1124
      src/main/java/com/goafanti/common/mapper/DemandMapper.xml
  10. 1 1
      src/main/java/com/goafanti/common/mapper/UserMapper.xml
  11. 120 281
      src/main/java/com/goafanti/demand/bo/InputDemand.java
  12. 6 72
      src/main/java/com/goafanti/demand/controller/AdminDemandApiController.java
  13. 18 23
      src/main/java/com/goafanti/demand/controller/UserDemandApiController.java
  14. 2 46
      src/main/java/com/goafanti/demand/service/DemandService.java
  15. 0 3
      src/main/java/com/goafanti/demand/service/impl/DemandPublishServiceImpl.java
  16. 80 337
      src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java
  17. 0 240
      src/main/java/com/goafanti/portal/controller/PortalSearchController.java
  18. 150 0
      src/main/java/com/goafanti/user/bo/UserBaseBo.java
  19. 37 123
      src/main/java/com/goafanti/user/bo/UserPageHomeBo.java
  20. 33 0
      src/main/java/com/goafanti/user/controller/UserApiController.java
  21. 3 0
      src/main/java/com/goafanti/user/service/UserService.java
  22. 16 8
      src/main/java/com/goafanti/user/service/impl/UserServiceImpl.java

+ 0 - 4
src/main/java/com/goafanti/app/controller/AppUserController.java

@@ -78,8 +78,6 @@ public class AppUserController extends BaseApiController {
 	@Resource
 	@Resource
 	private FieldGlossoryService fieldGlossoryService;
 	private FieldGlossoryService fieldGlossoryService;
 	
 	
-	
-	
 	@RequestMapping(value = "/uploadImg",method = RequestMethod.POST)
 	@RequestMapping(value = "/uploadImg",method = RequestMethod.POST)
 	public Result uploadAvatar(HttpServletRequest req){
 	public Result uploadAvatar(HttpServletRequest req){
 		Result res = new Result();
 		Result res = new Result();
@@ -337,7 +335,6 @@ public class AppUserController extends BaseApiController {
 	/**
 	/**
      * 新增成果
      * 新增成果
      */
      */
-    
 	@RequestMapping(value = "/appAddAchievement", method = RequestMethod.POST)
 	@RequestMapping(value = "/appAddAchievement", method = RequestMethod.POST)
     private Result appAddAchievement(@Valid InputAchievement ia, BindingResult bindingResult,
     private Result appAddAchievement(@Valid InputAchievement ia, BindingResult bindingResult,
             String keyword1,String keyword2,String keyword3) {
             String keyword1,String keyword2,String keyword3) {
@@ -353,7 +350,6 @@ public class AppUserController extends BaseApiController {
         	keyword.add(keyword3);
         	keyword.add(keyword3);
 		}
 		}
         String[] keywords=(String[])keyword.toArray(new String[keyword.size()]);
         String[] keywords=(String[])keyword.toArray(new String[keyword.size()]);
-        System.out.println(StringUtils.join(keywords,","));
         ia.setKeyword(StringUtils.join(keywords,","));
         ia.setKeyword(StringUtils.join(keywords,","));
         if (bindingResult.hasErrors()) {
         if (bindingResult.hasErrors()) {
             res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
             res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),

+ 0 - 26
src/main/java/com/goafanti/common/constant/AFTConstants.java

@@ -90,32 +90,6 @@ public class AFTConstants {
 	public static final Integer	USER_STATUS_CANCEL					= 1;
 	public static final Integer	USER_STATUS_CANCEL					= 1;
 
 
 	public static final Integer	USER_STATUS_LOCKING					= 2;
 	public static final Integer	USER_STATUS_LOCKING					= 2;
-
-	public static final String	USER_TRANSFER_TO_PUBLIC				= "转为公共客户";
-
-	public static final String	USER_DELETE							= "删除客户";
-
-	public static final String	USER_RECEIVE						= "领取";
-
-	public static final String	USER_TRANSFER_TO_OTHER				= "转交客户给制定人";
-
-	/**组织类型-公司*/
-	public static final String	ORGANIZATION_TYPE_COMPANY			= "0";
-	/**组织类型-部门*/
-	public static final String	ORGANIZATION_TYPE_DEPARTMENT		= "1";
-	/**组织类型-团队*/
-	public static final String	ORGANIZATION_TYPE_TEAM				= "2";
-
-	public static final String	DAILY								= "daily";
-	public static final String	WEEKLY								= "weekly";
-	public static final String	MONTHLY								= "monthly";
-	public static final String	QUARTERLY							= "quarterly";
-	public static final String	ANNUALLY							= "annually";
-
-	/** 转公共客户拜访时限 **/
-	public static final long USER_FOLLOW_LIMIT_MS					= 24*3600*1000*30L;
-	/** 转公公共客户签单时限 **/
-	public static final long USER_SIGN_LIMIT_MS						= 24*3600*1000*270L;
 	
 	
 	public static final Integer USER_STATUS = 1;
 	public static final Integer USER_STATUS = 1;
 }
 }

+ 54 - 12
src/main/java/com/goafanti/common/constant/PageConstants.java

@@ -1,18 +1,60 @@
 package com.goafanti.common.constant;
 package com.goafanti.common.constant;
 
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.goafanti.common.utils.StringUtils;
+
 public class PageConstants {
 public class PageConstants {
-	public static final String DEMAND_AUDIT_URL = "/admin/demand.html#techDemandAudit"; //需求审核
-	
-	public static final String DEMAND_PUBLISH_URL = "/admin/demand.html#techDemandPublish"; //需求发布
-	
-	public static final String ACHIEVEMENT_AUDIT_URL = "/admin/achievement.html#techAchievementAudit"; //成果审核
-	
-	public static final String ACHIEVEMENT_PUBLISH_URL = "/admin/achievement.html#techAchievementPublish"; //成果发布
-	
-	public static final String MY_SERVICE_ORDER = "/admin/order.html#myService"; //我的科技服务订单
-	
-	public static final String MY_SETTLEMENT_ORDER = "/admin/order.html#mySettlement"; //我的结算订单
+	static final Map<String,String> WEB_DEMAND_PAGES = new HashMap<String, String>();
+	static final Map<String,String> APP_DEMAND_PAGES = new HashMap<String, String>();
+	static final Map<String,String> WEB_ACHIEVEMENT_PAGES = new HashMap<String, String>();
+	static final Map<String,String> APP_ACHIEVEMENT_PAGES = new HashMap<String, String>();
+	public static final int WEB_PLATFORM = 0;
+	public static final int APP_PLATFORM = 1;
+	public static final String DEFAULT_DOMAIN = "jishutao.com";
+	public static final int DEFAULT_TOP_NUMBER = 9999999;
+	public static final int DEFAULT_SHOW_NUMBER = 9999999;
+	static{
+		WEB_DEMAND_PAGES.put("web_index", "网站首页");
+		WEB_DEMAND_PAGES.put("web_demand_main", "网站需求页主页");
+		WEB_DEMAND_PAGES.put("web_demand_list", "网站需求列表页");
+		APP_DEMAND_PAGES.put("app_index", "APP首页");
+		APP_DEMAND_PAGES.put("app_demand_main", "APP需求页主页");
+		APP_DEMAND_PAGES.put("app_demand_list", "APP需求列表页");	
+		WEB_ACHIEVEMENT_PAGES.put("web_index", "网站首页");
+		WEB_ACHIEVEMENT_PAGES.put("web_achievement_main", "网站成果主页");
+		WEB_ACHIEVEMENT_PAGES.put("web_achievement_list", "网站成果列表页");
+		APP_ACHIEVEMENT_PAGES.put("app_index", "网站首页");
+		APP_ACHIEVEMENT_PAGES.put("app_achievement_main", "APP成果主页");
+		APP_ACHIEVEMENT_PAGES.put("app_achievement_list", "APP成果列表页");
+	}
+
+	public static boolean containPage(String page,Map<String,String> matchPages){
+		if(StringUtils.isBlank(page)) return false;
+		return matchPages.keySet().contains(page);
+	}
 	
 	
-	public static final String MY_SERVICE_PROJECT = "/admin/servicesManage/projectOrder.html#projectManage"; //项目管理
+	public static void putDemand(String[] pages,List<String> webPages,List<String> appPages){
+		if(pages == null || pages.length <= 0) return;
+		for(String page : pages){
+			if(containPage(page,WEB_DEMAND_PAGES)){
+				webPages.add(page);
+			}else if(containPage(page,APP_DEMAND_PAGES)){
+				appPages.add(page);
+			}
+		}
+	}
 	
 	
+	public static void putAchievement(String[] pages,List<String> webPages,List<String> appPages){
+		if(pages == null || pages.length <= 0) return;
+		for(String page : pages){
+			if(containPage(page,WEB_ACHIEVEMENT_PAGES)){
+				webPages.add(page);
+			}else if(containPage(page,APP_ACHIEVEMENT_PAGES)){
+				appPages.add(page);
+			}
+		}
+	}
 }
 }

+ 2 - 0
src/main/java/com/goafanti/common/dao/BranchInformationMapper.java

@@ -77,4 +77,6 @@ public interface BranchInformationMapper {
 	int updateByPrimaryKey(BranchInformation record);
 	int updateByPrimaryKey(BranchInformation record);
 
 
 	List<BranchInformation> listBranchInformation();
 	List<BranchInformation> listBranchInformation();
+	
+	BranchInformation selectByDomain(String domainName);
 }
 }

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

@@ -6,7 +6,6 @@ import java.util.List;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
 
 
 import com.goafanti.common.model.Demand;
 import com.goafanti.common.model.Demand;
-import com.goafanti.demand.bo.DemandInterestBo;
 import com.goafanti.demand.bo.DemandListBo;
 import com.goafanti.demand.bo.DemandListBo;
 import com.goafanti.demand.bo.DemandManageDetailBo;
 import com.goafanti.demand.bo.DemandManageDetailBo;
 import com.goafanti.demand.bo.DemandRecommended;
 import com.goafanti.demand.bo.DemandRecommended;
@@ -51,13 +50,9 @@ public interface DemandMapper {
 	int updateEmployerId(String id);
 	int updateEmployerId(String id);
 	
 	
 	ArrayList<DemandListBo> selectDemandList (Integer boutique);
 	ArrayList<DemandListBo> selectDemandList (Integer boutique);
-	
-	List<DemandListBo> selectCsutomerLike(String uid);
-		
-	int countInterest(String demandId);
-
-	List<DemandInterestBo> demandInterest(String uid);
 
 
+	int countInterest(String demandId);
+	
 	Demand selectDemandDetail(String id);
 	Demand selectDemandDetail(String id);
 
 
 	DemandListBo selectAppByPrimaryKey(String id);
 	DemandListBo selectAppByPrimaryKey(String id);

+ 2 - 2
src/main/java/com/goafanti/common/dao/UserMapper.java

@@ -8,8 +8,8 @@ import com.goafanti.app.bo.UserBasicInfo;
 import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.OrganizationContactBook;
 import com.goafanti.common.model.OrganizationContactBook;
 import com.goafanti.common.model.User;
 import com.goafanti.common.model.User;
+import com.goafanti.user.bo.UserBaseBo;
 import com.goafanti.user.bo.UserDownLoadBo;
 import com.goafanti.user.bo.UserDownLoadBo;
-import com.goafanti.user.bo.UserPageHomeBo;
 import com.goafanti.common.model.UserExample;
 import com.goafanti.common.model.UserExample;
 
 
 public interface UserMapper {
 public interface UserMapper {
@@ -79,7 +79,7 @@ public interface UserMapper {
 	 */
 	 */
 	int updateByPrimaryKey(User record);
 	int updateByPrimaryKey(User record);
 
 
-	UserPageHomeBo selectUserPageHomeBoByUserId(String uid);
+	UserBaseBo selectUserBaseByUserId(String uid);
 
 
 	UserDownLoadBo selectUserDownLoadBoByUserId(String id);
 	UserDownLoadBo selectUserDownLoadBoByUserId(String id);
 
 

+ 1 - 1
src/main/java/com/goafanti/common/enums/DemandAuditStatus.java

@@ -6,7 +6,7 @@ import java.util.Map;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
 
 
 public enum DemandAuditStatus {
 public enum DemandAuditStatus {
-	CREATE(0, "未提交审核草稿"),
+	CREATE(0, "草稿"),
 	SUBMIT(1, "提交审核"),
 	SUBMIT(1, "提交审核"),
 	INAUDIT(2, "审核中"),
 	INAUDIT(2, "审核中"),
 	AUDITED(3,"审核通过"),
 	AUDITED(3,"审核通过"),

+ 7 - 0
src/main/java/com/goafanti/common/mapper/BranchInformationMapper.xml

@@ -321,4 +321,11 @@
    id, platform_name as platformName, app_name as appName, platform_url platformUrl, domain_name as domainName, icp, server
    id, platform_name as platformName, app_name as appName, platform_url platformUrl, domain_name as domainName, icp, server
    from branch_information
    from branch_information
    </select>
    </select>
+   
+   <select id="selectByDomain" parameterType="java.lang.String" resultMap="BaseResultMap">
+   	select 
+    <include refid="Base_Column_List" />
+    from branch_information
+    where domain_name = #{domainName,jdbcType=VARCHAR}
+   </select>
 </mapper>
 </mapper>

Разница между файлами не показана из-за своего большого размера
+ 7 - 1124
src/main/java/com/goafanti/common/mapper/DemandMapper.xml


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

@@ -695,7 +695,7 @@
 	    and source = 0
 	    and source = 0
   </select>
   </select>
   
   
-  <select id="selectUserPageHomeBoByUserId" parameterType="java.lang.String" resultMap="UserPageHomeBo">
+  <select id="selectUserBaseByUserId" parameterType="java.lang.String" resultMap="UserPageHomeBo">
   	select 
   	select 
   		id,
   		id,
   		number,
   		number,

+ 120 - 281
src/main/java/com/goafanti/demand/bo/InputDemand.java

@@ -10,28 +10,28 @@ import javax.validation.constraints.Size;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.constant.ErrorConstants;
 
 
 public class InputDemand {
 public class InputDemand {
-
+	
+	@Size(min = 0, max = 128, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String		name;
+	
 	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String		id;
 	private String		id;
-
+	
+	@Max(value = 99999999, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	private Integer		serialNumber;
+	
 	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private Integer		dataCategory;
 	private Integer		dataCategory;
 
 
-	@Max(value = 99999999, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Max(value = 9, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
-	private Integer		serialNumber;
-
-	@Size(min = 0, max = 128, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String		name;
-
+	private Integer		demandType;
+	
 	@Size(min = 0, max = 45, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	@Size(min = 0, max = 45, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String		keyword;
 	private String		keyword;
 
 
-	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
-	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
-	private Integer		infoSources;
-
 	@Max(value = 999, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Max(value = 999, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private Integer		industryCategoryA;
 	private Integer		industryCategoryA;
@@ -43,119 +43,69 @@ public class InputDemand {
 	@Max(value = 999, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Max(value = 999, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private Integer		industryCategoryC;
 	private Integer		industryCategoryC;
-
-	@Max(value = 9, message = "{" + ErrorConstants.PARAM_ERROR + "}")
-	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
-	private Integer		demandType;
-
-	@Size(min = 0, max = 512, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String		problemDes;
-
-	@Size(min = 0, max = 256, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String		technicalRequirements;
-
-	@Size(min = 0, max = 1000, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String		pictureUrl;
-
-	@Size(min = 0, max = 255, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String		textFileUrl;
-
-	@Size(min = 0, max = 255, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String		videoUrl;
-
+	
 	@Max(value = (long) 999999.99, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Max(value = (long) 999999.99, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
-	private BigDecimal	fixedBudget;
-
-	@Size(min = 0, max = 12, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String		fixedCycle;
-
-	@Max(value = 99999, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	private BigDecimal	budgetCost;
+	
+	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
-	private Integer		peopleNumber;
+	private Integer isHot;
 
 
-	@Size(min = 0, max = 200, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String		fixedScheme;
-
-	@Max(value = (long) 999999.99, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
-	private BigDecimal	costEscrow;
-
-	@Max(value = (long) 999999.99, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	private Integer isUrgent;
+	
+	@Max(value = 10, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
-	private BigDecimal	budgetCost;
-
-	private Date		validityPeriod;
-
-	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String		employerId;
-
-	@Size(min = 0, max = 45, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String		employerName;
-
-	@Size(min = 0, max = 128, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String		employerAddress;
-
-	@Size(min = 0, max = 16, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String		employerContacts;
-
-	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String		employerContactsMobile;
-
-	@Size(min = 0, max = 255, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String		employerContactsMailbox;
-
-	@Max(value = 2, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	private Integer researchType;
+	
+	@Size(min = 0, max = 11, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String urgentDays;
+	
+	@Max(value = (long) 999999.99, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
-	private Integer		status;
-
+	private BigDecimal urgentMoney;
+	
 	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private Integer		releaseStatus;
 	private Integer		releaseStatus;
-
+	
 	private Date		releaseDate;
 	private Date		releaseDate;
-
-	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String		principalId;
-
+	
 	@Max(value = 4, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Max(value = 4, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private Integer		auditStatus;
 	private Integer		auditStatus;
-
-	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String		techBrokerId;
-
-	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
-	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
-	private Integer boutique;
 	
 	
-	@Size(min = 0, max = 500, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String remark;
+	@Size(min = 0, max = 128, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String auditInfo;
 	
 	
-	@Size(min = 0, max = 11, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String urgentDays;
+	@Max(value = 2, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	private Integer		status;
 	
 	
-	private BigDecimal urgentMoney;
+	@Size(min = 0, max = 512, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String		problemDes;
 	
 	
-	@Size(min = 0, max = 256, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String contacts; 
-	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String contactMobile;
+	@Size(min = 0, max = 1000, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String		pictureUrl;
 	
 	
-	public String getContactMobile() {
-		return contactMobile;
-	}
+	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String		employerId;
 
 
-	public void setContactMobile(String contactMobile) {
-		this.contactMobile = contactMobile;
-	}
+	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String		techBrokerId;
 
 
-	public String getRemark() {
-		return remark;
+	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	private Integer		infoSources;
+
+	public String getName() {
+		return name;
 	}
 	}
 
 
-	public void setRemark(String remark) {
-		this.remark = remark;
+	public void setName(String name) {
+		this.name = name;
 	}
 	}
 
 
 	public String getId() {
 	public String getId() {
@@ -166,6 +116,14 @@ public class InputDemand {
 		this.id = id;
 		this.id = id;
 	}
 	}
 
 
+	public Integer getSerialNumber() {
+		return serialNumber;
+	}
+
+	public void setSerialNumber(Integer serialNumber) {
+		this.serialNumber = serialNumber;
+	}
+
 	public Integer getDataCategory() {
 	public Integer getDataCategory() {
 		return dataCategory;
 		return dataCategory;
 	}
 	}
@@ -174,12 +132,12 @@ public class InputDemand {
 		this.dataCategory = dataCategory;
 		this.dataCategory = dataCategory;
 	}
 	}
 
 
-	public String getName() {
-		return name;
+	public Integer getDemandType() {
+		return demandType;
 	}
 	}
 
 
-	public void setName(String name) {
-		this.name = name;
+	public void setDemandType(Integer demandType) {
+		this.demandType = demandType;
 	}
 	}
 
 
 	public String getKeyword() {
 	public String getKeyword() {
@@ -190,14 +148,6 @@ public class InputDemand {
 		this.keyword = keyword;
 		this.keyword = keyword;
 	}
 	}
 
 
-	public Integer getInfoSources() {
-		return infoSources;
-	}
-
-	public void setInfoSources(Integer infoSources) {
-		this.infoSources = infoSources;
-	}
-
 	public Integer getIndustryCategoryA() {
 	public Integer getIndustryCategoryA() {
 		return industryCategoryA;
 		return industryCategoryA;
 	}
 	}
@@ -222,94 +172,6 @@ public class InputDemand {
 		this.industryCategoryC = industryCategoryC;
 		this.industryCategoryC = industryCategoryC;
 	}
 	}
 
 
-	public Integer getDemandType() {
-		return demandType;
-	}
-
-	public void setDemandType(Integer demandType) {
-		this.demandType = demandType;
-	}
-
-	public String getProblemDes() {
-		return problemDes;
-	}
-
-	public void setProblemDes(String problemDes) {
-		this.problemDes = problemDes;
-	}
-
-	public String getTechnicalRequirements() {
-		return technicalRequirements;
-	}
-
-	public void setTechnicalRequirements(String technicalRequirements) {
-		this.technicalRequirements = technicalRequirements;
-	}
-
-	public String getPictureUrl() {
-		return pictureUrl;
-	}
-
-	public void setPictureUrl(String pictureUrl) {
-		this.pictureUrl = pictureUrl;
-	}
-
-	public String getTextFileUrl() {
-		return textFileUrl;
-	}
-
-	public void setTextFileUrl(String textFileUrl) {
-		this.textFileUrl = textFileUrl;
-	}
-
-	public String getVideoUrl() {
-		return videoUrl;
-	}
-
-	public void setVideoUrl(String videoUrl) {
-		this.videoUrl = videoUrl;
-	}
-
-	public BigDecimal getFixedBudget() {
-		return fixedBudget;
-	}
-
-	public void setFixedBudget(BigDecimal fixedBudget) {
-		this.fixedBudget = fixedBudget;
-	}
-
-	public String getFixedCycle() {
-		return fixedCycle;
-	}
-
-	public void setFixedCycle(String fixedCycle) {
-		this.fixedCycle = fixedCycle;
-	}
-
-	public Integer getPeopleNumber() {
-		return peopleNumber;
-	}
-
-	public void setPeopleNumber(Integer peopleNumber) {
-		this.peopleNumber = peopleNumber;
-	}
-
-	public String getFixedScheme() {
-		return fixedScheme;
-	}
-
-	public void setFixedScheme(String fixedScheme) {
-		this.fixedScheme = fixedScheme;
-	}
-
-	public BigDecimal getCostEscrow() {
-		return costEscrow;
-	}
-
-	public void setCostEscrow(BigDecimal costEscrow) {
-		this.costEscrow = costEscrow;
-	}
-
 	public BigDecimal getBudgetCost() {
 	public BigDecimal getBudgetCost() {
 		return budgetCost;
 		return budgetCost;
 	}
 	}
@@ -318,116 +180,108 @@ public class InputDemand {
 		this.budgetCost = budgetCost;
 		this.budgetCost = budgetCost;
 	}
 	}
 
 
-	public Date getValidityPeriod() {
-		return validityPeriod;
+	public Integer getIsHot() {
+		return isHot;
 	}
 	}
 
 
-	public void setValidityPeriod(Date validityPeriod) {
-		this.validityPeriod = validityPeriod;
+	public void setIsHot(Integer isHot) {
+		this.isHot = isHot;
 	}
 	}
 
 
-	public String getEmployerId() {
-		return employerId;
+	public Integer getIsUrgent() {
+		return isUrgent;
 	}
 	}
 
 
-	public void setEmployerId(String employerId) {
-		this.employerId = employerId;
-	}
-
-	public String getEmployerName() {
-		return employerName;
+	public void setIsUrgent(Integer isUrgent) {
+		this.isUrgent = isUrgent;
 	}
 	}
 
 
-	public void setEmployerName(String employerName) {
-		this.employerName = employerName;
+	public Integer getResearchType() {
+		return researchType;
 	}
 	}
 
 
-	public String getEmployerAddress() {
-		return employerAddress;
+	public void setResearchType(Integer researchType) {
+		this.researchType = researchType;
 	}
 	}
 
 
-	public void setEmployerAddress(String employerAddress) {
-		this.employerAddress = employerAddress;
-	}
-
-	public String getEmployerContacts() {
-		return employerContacts;
+	public String getUrgentDays() {
+		return urgentDays;
 	}
 	}
 
 
-	public void setEmployerContacts(String employerContacts) {
-		this.employerContacts = employerContacts;
+	public void setUrgentDays(String urgentDays) {
+		this.urgentDays = urgentDays;
 	}
 	}
 
 
-	public String getEmployerContactsMobile() {
-		return employerContactsMobile;
+	public BigDecimal getUrgentMoney() {
+		return urgentMoney;
 	}
 	}
 
 
-	public void setEmployerContactsMobile(String employerContactsMobile) {
-		this.employerContactsMobile = employerContactsMobile;
+	public void setUrgentMoney(BigDecimal urgentMoney) {
+		this.urgentMoney = urgentMoney;
 	}
 	}
 
 
-	public String getEmployerContactsMailbox() {
-		return employerContactsMailbox;
+	public Integer getReleaseStatus() {
+		return releaseStatus;
 	}
 	}
 
 
-	public void setEmployerContactsMailbox(String employerContactsMailbox) {
-		this.employerContactsMailbox = employerContactsMailbox;
+	public void setReleaseStatus(Integer releaseStatus) {
+		this.releaseStatus = releaseStatus;
 	}
 	}
 
 
-	public String getContacts() {
-		return contacts;
+	public Date getReleaseDate() {
+		return releaseDate;
 	}
 	}
 
 
-	public void setContacts(String contacts) {
-		this.contacts = contacts;
+	public void setReleaseDate(Date releaseDate) {
+		this.releaseDate = releaseDate;
 	}
 	}
 
 
-	public Integer getStatus() {
-		return status;
+	public Integer getAuditStatus() {
+		return auditStatus;
 	}
 	}
 
 
-	public void setStatus(Integer status) {
-		this.status = status;
+	public void setAuditStatus(Integer auditStatus) {
+		this.auditStatus = auditStatus;
 	}
 	}
 
 
-	public Integer getReleaseStatus() {
-		return releaseStatus;
+	public String getAuditInfo() {
+		return auditInfo;
 	}
 	}
 
 
-	public void setReleaseStatus(Integer releaseStatus) {
-		this.releaseStatus = releaseStatus;
+	public void setAuditInfo(String auditInfo) {
+		this.auditInfo = auditInfo;
 	}
 	}
 
 
-	public Date getReleaseDate() {
-		return releaseDate;
+	public Integer getStatus() {
+		return status;
 	}
 	}
 
 
-	public void setReleaseDate(Date releaseDate) {
-		this.releaseDate = releaseDate;
+	public void setStatus(Integer status) {
+		this.status = status;
 	}
 	}
 
 
-	public String getPrincipalId() {
-		return principalId;
+	public String getProblemDes() {
+		return problemDes;
 	}
 	}
 
 
-	public void setPrincipalId(String principalId) {
-		this.principalId = principalId;
+	public void setProblemDes(String problemDes) {
+		this.problemDes = problemDes;
 	}
 	}
 
 
-	public Integer getSerialNumber() {
-		return serialNumber;
+	public String getPictureUrl() {
+		return pictureUrl;
 	}
 	}
 
 
-	public void setSerialNumber(Integer serialNumber) {
-		this.serialNumber = serialNumber;
+	public void setPictureUrl(String pictureUrl) {
+		this.pictureUrl = pictureUrl;
 	}
 	}
 
 
-	public Integer getAuditStatus() {
-		return auditStatus;
+	public String getEmployerId() {
+		return employerId;
 	}
 	}
 
 
-	public void setAuditStatus(Integer auditStatus) {
-		this.auditStatus = auditStatus;
+	public void setEmployerId(String employerId) {
+		this.employerId = employerId;
 	}
 	}
 
 
 	public String getTechBrokerId() {
 	public String getTechBrokerId() {
@@ -438,27 +292,12 @@ public class InputDemand {
 		this.techBrokerId = techBrokerId;
 		this.techBrokerId = techBrokerId;
 	}
 	}
 
 
-	public Integer getBoutique() {
-		return boutique;
-	}
-
-	public void setBoutique(Integer boutique) {
-		this.boutique = boutique;
-	}
-
-	public String getUrgentDays() {
-		return urgentDays;
-	}
-
-	public void setUrgentDays(String urgentDays) {
-		this.urgentDays = urgentDays;
+	public Integer getInfoSources() {
+		return infoSources;
 	}
 	}
 
 
-	public BigDecimal getUrgentMoney() {
-		return urgentMoney;
+	public void setInfoSources(Integer infoSources) {
+		this.infoSources = infoSources;
 	}
 	}
 
 
-	public void setUrgentMoney(BigDecimal urgentMoney) {
-		this.urgentMoney = urgentMoney;
-	}
 }
 }

+ 6 - 72
src/main/java/com/goafanti/demand/controller/AdminDemandApiController.java

@@ -19,7 +19,6 @@ import com.goafanti.common.model.DemandFollow;
 import com.goafanti.common.model.DemandFollowDetail;
 import com.goafanti.common.model.DemandFollowDetail;
 import com.goafanti.common.model.DemandPublish;
 import com.goafanti.common.model.DemandPublish;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.common.utils.StringUtils;
-import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.demand.service.DemandFollowService;
 import com.goafanti.demand.service.DemandFollowService;
 import com.goafanti.demand.service.DemandOrderService;
 import com.goafanti.demand.service.DemandOrderService;
 import com.goafanti.demand.service.DemandPublishPageService;
 import com.goafanti.demand.service.DemandPublishPageService;
@@ -104,23 +103,9 @@ public class AdminDemandApiController extends CertifyApiController {
 	 * 个人用户--需求列表
 	 * 个人用户--需求列表
 	 */
 	 */
 	@RequestMapping(value = "/userList", method = RequestMethod.GET)
 	@RequestMapping(value = "/userList", method = RequestMethod.GET)
-	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 createDateStartDate, String createDateEndDate, String pageNo, String pageSize,Integer boutique,Integer hot) {
+	public Result userList(String pageNo, String pageSize) {
 		Result res = new Result();
 		Result res = new Result();
-		Integer pNo = 1;
-		Integer pSize = 10;
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize = Integer.parseInt(pageSize);
-		}
-
-		if (StringUtils.isNumeric(pageNo)) {
-			pNo = Integer.parseInt(pageNo);
-		}
-		res.setData(demandService.selectUserDemandManageList(employerName, auditStatus, province, serialNumber, name, keyword,
-				infoSources, demandType, validityPeriodStartDate, validityPeriodEndDate, username, status,
-				releaseStatus, releaseDateStartDate, releaseDateEndDate, createDateStartDate,  createDateEndDate, pNo, pSize,boutique,hot));
+		//res.setData(null); TODO
 		return res;
 		return res;
 	}
 	}
 
 
@@ -128,23 +113,9 @@ public class AdminDemandApiController extends CertifyApiController {
 	 * 组织用户--需求列表(个人组织合并)
 	 * 组织用户--需求列表(个人组织合并)
 	 */
 	 */
 	@RequestMapping(value = "/orgList", method = RequestMethod.GET)
 	@RequestMapping(value = "/orgList", method = RequestMethod.GET)
-	public Result orgList(Integer dataCategory,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 createDateStartDate, String createDateEndDate, String pageNo, String pageSize,Integer boutique,Integer hot,String recordPerson) {
+	public Result orgList(String pageNo, String pageSize) {
 		Result res = new Result();
 		Result res = new Result();
-		Integer pNo = 1;
-		Integer pSize = 10;
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize = Integer.parseInt(pageSize);
-		}
-
-		if (StringUtils.isNumeric(pageNo)) {
-			pNo = Integer.parseInt(pageNo);
-		}
-		res.setData(demandService.selectOrgDemandManageList(dataCategory,employerName, auditStatus, province, serialNumber, name, keyword,
-				infoSources, demandType, validityPeriodStartDate, validityPeriodEndDate, unitName, status,
-				releaseStatus, releaseDateStartDate, releaseDateEndDate, createDateStartDate,  createDateEndDate, pNo, pSize,boutique,hot,TokenManager.getAdminId(),recordPerson));
+		//res.setData(null); TODO
 		return res;
 		return res;
 	}
 	}
 
 
@@ -296,50 +267,13 @@ public class AdminDemandApiController extends CertifyApiController {
 	 * 我的需求列表
 	 * 我的需求列表
 	 */
 	 */
 	@RequestMapping(value = "/myList", method = RequestMethod.GET)
 	@RequestMapping(value = "/myList", method = RequestMethod.GET)
-	public Result myList(Integer dataCategory,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 createDateStartDate, String createDateEndDate, String pageNo, String pageSize,Integer boutique,Integer hot) {
+	public Result myList(String pageNo, String pageSize) {
 		Result res = new Result();
 		Result res = new Result();
-		Integer pNo = 1;
-		Integer pSize = 10;
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize = Integer.parseInt(pageSize);
-		}
-
-		if (StringUtils.isNumeric(pageNo)) {
-			pNo = Integer.parseInt(pageNo);
-		}
-		res.setData(demandService.selectMyDemandManageList(dataCategory,employerName, auditStatus, province, serialNumber, name, keyword,
-				infoSources, demandType, validityPeriodStartDate, validityPeriodEndDate, unitName, status,
-				releaseStatus, releaseDateStartDate, releaseDateEndDate, createDateStartDate,  createDateEndDate, pNo, pSize,boutique,hot,TokenManager.getAdminId()));
+		// res.setData(null) todo;
 		return res;
 		return res;
 	}
 	}
 	
 	
 	/**
 	/**
-	 * 科技需管理求列表
-	 */
-	@RequestMapping(value = "/manageList", method = RequestMethod.GET)
-	public Result manageList(Integer dataCategory,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 createDateStartDate, String createDateEndDate, String pageNo, String pageSize,Integer boutique,Integer hot,String recordPerson) {
-		Result res = new Result();
-		Integer pNo = 1;
-		Integer pSize = 10;
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize = Integer.parseInt(pageSize);
-		}
-
-		if (StringUtils.isNumeric(pageNo)) {
-			pNo = Integer.parseInt(pageNo);
-		}
-		res.setData(demandService.selectManageDemandManageList(dataCategory,employerName, auditStatus, province, serialNumber, name, keyword,
-				infoSources, demandType, validityPeriodStartDate, validityPeriodEndDate, unitName, status,
-				releaseStatus, releaseDateStartDate, releaseDateEndDate, createDateStartDate,  createDateEndDate, pNo, pSize,boutique,hot,TokenManager.getAdminId(),recordPerson));
-		return res;
-	}
-	/**
      * 需求发布
      * 需求发布
      */
      */
     @RequestMapping(value = "/addDemandPublish", method = RequestMethod.POST)
     @RequestMapping(value = "/addDemandPublish", method = RequestMethod.POST)

+ 18 - 23
src/main/java/com/goafanti/demand/controller/UserDemandApiController.java

@@ -1,5 +1,6 @@
 package com.goafanti.demand.controller;
 package com.goafanti.demand.controller;
 
 
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Arrays;
 import java.util.List;
 import java.util.List;
 
 
@@ -19,6 +20,7 @@ import com.goafanti.admin.service.AftFileService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.constant.PageConstants;
 import com.goafanti.common.controller.CertifyApiController;
 import com.goafanti.common.controller.CertifyApiController;
 import com.goafanti.common.enums.AttachmentType;
 import com.goafanti.common.enums.AttachmentType;
 import com.goafanti.common.enums.DemandAuditStatus;
 import com.goafanti.common.enums.DemandAuditStatus;
@@ -82,22 +84,9 @@ public class UserDemandApiController extends CertifyApiController {
 	 * 用户需求列表
 	 * 用户需求列表
 	 */
 	 */
 	@RequestMapping(value = "/list", method = RequestMethod.GET)
 	@RequestMapping(value = "/list", method = RequestMethod.GET)
-	public Result list(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, String pageNo, String pageSize) {
+	public Result list(String pageNo, String pageSize) {
 		Result res = new Result();
 		Result res = new Result();
-		Integer pNo = 1;
-		Integer pSize = 10;
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize = Integer.parseInt(pageSize);
-		}
-
-		if (StringUtils.isNumeric(pageNo)) {
-			pNo = Integer.parseInt(pageNo);
-		}
-		res.setData(demandService.listDemand(auditStatus, serialNumber, name, keyword, demandType,
-				validityPeriodStartDate, validityPeriodEndDate, status, releaseStatus, releaseDateStartDate,
-				releaseDateEndDate,createDateStartDate,  createDateEndDate, pNo, pSize));
+		// res.setData(); TODO
 		return res;
 		return res;
 	}
 	}
 
 
@@ -107,6 +96,7 @@ public class UserDemandApiController extends CertifyApiController {
 	@RequestMapping(value = "/apply", method = RequestMethod.POST)
 	@RequestMapping(value = "/apply", method = RequestMethod.POST)
 	public Result userApply(@Valid InputDemand demand, BindingResult bindingResult,
 	public Result userApply(@Valid InputDemand demand, BindingResult bindingResult,
 			@RequestParam(name = "keywords[]", required = false) String[] keywords,
 			@RequestParam(name = "keywords[]", required = false) String[] keywords,
+			@RequestParam(value = "publishPages[]", required = false)String[] publishPages,
 			String validityPeriodFormattedDate) {
 			String validityPeriodFormattedDate) {
 		Result res = new Result();
 		Result res = new Result();
 		if (bindingResult.hasErrors()) {
 		if (bindingResult.hasErrors()) {
@@ -114,15 +104,20 @@ public class UserDemandApiController extends CertifyApiController {
 					DemandFields.getFieldDesc(bindingResult.getFieldError().getField())));
 					DemandFields.getFieldDesc(bindingResult.getFieldError().getField())));
 			return res;
 			return res;
 		}
 		}
-		res = disposeDemand(res, demand, keywords);
+		res = disposeDemand(res, demand, keywords,publishPages);
 		if (!res.getError().isEmpty()) {
 		if (!res.getError().isEmpty()) {
 			return res;
 			return res;
 		}
 		}
-
 		Demand d = new Demand();
 		Demand d = new Demand();
 		BeanUtils.copyProperties(demand, d);
 		BeanUtils.copyProperties(demand, d);
 		d.setEmployerId(TokenManager.getUserId());
 		d.setEmployerId(TokenManager.getUserId());
-		demandService.saveDemand(d, validityPeriodFormattedDate, keywords);
+		List<String> webPages = new ArrayList<String>();
+		List<String> appPages = new ArrayList<String>();
+		PageConstants.putDemand(publishPages, webPages, appPages);
+		if(webPages.size()==0 && appPages.size() == 0){
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "页面参数错误"));
+		}
+		demandService.saveDemand(d, validityPeriodFormattedDate, keywords,webPages, appPages);
 		return res;
 		return res;
 	}
 	}
 
 
@@ -153,7 +148,6 @@ public class UserDemandApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到需求ID", "需求ID"));
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到需求ID", "需求ID"));
 			return res;
 			return res;
 		}
 		}
-
 		res.setData(demandService.selectUserDemandDetail(id));
 		res.setData(demandService.selectUserDemandDetail(id));
 		return res;
 		return res;
 	}
 	}
@@ -164,6 +158,7 @@ public class UserDemandApiController extends CertifyApiController {
 	@RequestMapping(value = "/update", method = RequestMethod.POST)
 	@RequestMapping(value = "/update", method = RequestMethod.POST)
 	public Result updateUser(@Valid InputDemand demand, BindingResult bindingResult,
 	public Result updateUser(@Valid InputDemand demand, BindingResult bindingResult,
 			@RequestParam(name = "keywords[]", required = false) String[] keywords,
 			@RequestParam(name = "keywords[]", required = false) String[] keywords,
+			@RequestParam(value = "publishPages[]", required = false)  String[] publishPages,
 			String validityPeriodFormattedDate) {
 			String validityPeriodFormattedDate) {
 		Result res = new Result();
 		Result res = new Result();
 		if (bindingResult.hasErrors()) {
 		if (bindingResult.hasErrors()) {
@@ -184,7 +179,7 @@ public class UserDemandApiController extends CertifyApiController {
 			return res;
 			return res;
 		}
 		}
 
 
-		res = disposeDemand(res, demand, keywords);
+		res = disposeDemand(res, demand, keywords,publishPages);
 		if (!res.getError().isEmpty()) {
 		if (!res.getError().isEmpty()) {
 			return res;
 			return res;
 		}
 		}
@@ -296,7 +291,7 @@ public class UserDemandApiController extends CertifyApiController {
 		return res;
 		return res;
 	}
 	}
 
 
-	private Result disposeDemand(Result res, InputDemand demand, String[] keywords) {
+	private Result disposeDemand(Result res, InputDemand demand, String[] keywords,String[] publishPages) {
 		if (StringUtils.isBlank(demand.getName())) {
 		if (StringUtils.isBlank(demand.getName())) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到需求名称", "需求名称"));
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到需求名称", "需求名称"));
 			return res;
 			return res;
@@ -308,7 +303,7 @@ public class UserDemandApiController extends CertifyApiController {
 			return res;
 			return res;
 		}
 		}
 
 
-		if (StringUtils.isBlank(demand.getKeyword())) {
+		/*if (StringUtils.isBlank(demand.getKeyword())) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到关键词", "关键词"));
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到关键词", "关键词"));
 			return res;
 			return res;
 		}
 		}
@@ -316,7 +311,7 @@ public class UserDemandApiController extends CertifyApiController {
 		if (null == keywords || keywords.length < 1) {
 		if (null == keywords || keywords.length < 1) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到关键词", "关键词"));
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到关键词", "关键词"));
 			return res;
 			return res;
-		}
+		}*/
 
 
 		if (null == demand.getIndustryCategoryA()) {
 		if (null == demand.getIndustryCategoryA()) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到行业类别", "行业类别"));
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到行业类别", "行业类别"));

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

@@ -1,7 +1,5 @@
 package com.goafanti.demand.service;
 package com.goafanti.demand.service;
 
 
-import java.math.BigDecimal;
-import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
 
 
 import com.goafanti.achievement.bo.AchievementDemandListBo;
 import com.goafanti.achievement.bo.AchievementDemandListBo;
@@ -10,10 +8,8 @@ import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.demand.bo.DemandImportBo;
 import com.goafanti.demand.bo.DemandImportBo;
 import com.goafanti.demand.bo.DemandListBo;
 import com.goafanti.demand.bo.DemandListBo;
 import com.goafanti.demand.bo.DemandManageDetailBo;
 import com.goafanti.demand.bo.DemandManageDetailBo;
-import com.goafanti.demand.bo.DemandManageListBo;
 import com.goafanti.demand.bo.DemandPartnerListBo;
 import com.goafanti.demand.bo.DemandPartnerListBo;
 import com.goafanti.demand.bo.ObjectInterestListBo;
 import com.goafanti.demand.bo.ObjectInterestListBo;
-import com.goafanti.portal.bo.BoutiqueListBo;
 import com.goafanti.portal.bo.DemandPortalDetailBo;
 import com.goafanti.portal.bo.DemandPortalDetailBo;
 import com.goafanti.portal.bo.DemandPortalSimilarListBo;
 import com.goafanti.portal.bo.DemandPortalSimilarListBo;
 import com.goafanti.portal.bo.DemandSearchDetailBo;
 import com.goafanti.portal.bo.DemandSearchDetailBo;
@@ -21,16 +17,6 @@ import com.goafanti.portal.bo.DemandSearchListBo;
 
 
 public interface DemandService {
 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);
 	void saveUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords);
 
 
 	int updateUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords, Integer switchSign);
 	int updateUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords, Integer switchSign);
@@ -43,24 +29,16 @@ public interface DemandService {
 
 
 	Demand selectByPrimaryKey(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 updateReleaseStatus(Demand d);
 
 
 	int updateAuditDemand(Demand d, String techBroderId, Integer auditStatus);
 	int updateAuditDemand(Demand d, String techBroderId, Integer auditStatus);
 
 
-	void saveDemand(Demand d, String validityPeriodFormattedDate, String keywords[]);
+	void saveDemand(Demand d, String validityPeriodFormattedDate, String keywords[],List<String> webPages, List<String> appPages);
 
 
 	List<AchievementDemandListBo> selectAchievementDemandListByDemandId(String id);
 	List<AchievementDemandListBo> selectAchievementDemandListByDemandId(String id);
 
 
 	void insertImport(List<DemandImportBo> data);
 	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);
 	DemandSearchDetailBo selectDemandSearchDetail(String uid, String id);
 
 
 	int updateMatchAchievement(Demand d);
 	int updateMatchAchievement(Demand d);
@@ -74,18 +52,9 @@ public interface DemandService {
 	List<DemandPortalSimilarListBo> findByIndustryCategoryA(Integer industryCategoryA, String id);
 	List<DemandPortalSimilarListBo> findByIndustryCategoryA(Integer industryCategoryA, String id);
 
 
 	int updateByPrimaryKeySelective(Demand d);
 	int updateByPrimaryKeySelective(Demand d);
-
-	DemandListBo selectDemandDetail( String id);
-
-	/** 精品需求 **/
-	Pagination<BoutiqueListBo> boutiqueSearchList(Integer industryCategoryA,Integer pNo, Integer pSize);
 	
 	
-	/** 查询需求 **/
-	ArrayList<DemandListBo> selectDemandList(Integer boutique);
+	DemandListBo selectDemandDetail( String id);
 	
 	
-	/**猜你喜欢**/
-	List<DemandListBo> selectCsutomerLike();
-
 	Pagination<DemandSearchListBo> listAppDemand(Integer auditStatus, Integer serialNumber, String name, String keyword, Integer demandType,Integer industryCategoryA,
 	Pagination<DemandSearchListBo> listAppDemand(Integer auditStatus, Integer serialNumber, String name, String keyword, Integer demandType,Integer industryCategoryA,
 			String validityPeriodStartDate, String validityPeriodEndDate, Integer status, Integer releaseStatus,
 			String validityPeriodStartDate, String validityPeriodEndDate, Integer status, Integer releaseStatus,
 			String releaseDateStartDate, String releaseDateEndDate,String employerId, Integer pNo, Integer pSize);
 			String releaseDateStartDate, String releaseDateEndDate,String employerId, Integer pNo, Integer pSize);
@@ -94,20 +63,8 @@ public interface DemandService {
 
 
 	Pagination<DemandSearchListBo> listMyDemand(Integer pNo, Integer pSize);
 	Pagination<DemandSearchListBo> listMyDemand(Integer pNo, Integer pSize);
 
 
-
 	int saveAppUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords);
 	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);
 	Demand DemandFollowDetails(String id);
 	
 	
 	List<DemandListBo> recentDemand();
 	List<DemandListBo> recentDemand();
@@ -118,7 +75,6 @@ public interface DemandService {
 	
 	
 	List<DemandListBo> getHotDemand();
 	List<DemandListBo> getHotDemand();
 	
 	
-
 	List<DemandListBo> areaDemand();
 	List<DemandListBo> areaDemand();
 	
 	
 	List<DemandListBo> proLearnStudyDemand();
 	List<DemandListBo> proLearnStudyDemand();

+ 0 - 3
src/main/java/com/goafanti/demand/service/impl/DemandPublishServiceImpl.java

@@ -37,9 +37,6 @@ public class DemandPublishServiceImpl extends BaseMybatisDao<DemandPublishMapper
 				continue;
 				continue;
 			}
 			}
 			d.setId(UUID.randomUUID().toString());
 			d.setId(UUID.randomUUID().toString());
-			if (null!=TokenManager.getAdminId()) {
-				d.setPublisher(TokenManager.getAdminId());
-			}
 			if (null==d.getShowNumber()) {
 			if (null==d.getShowNumber()) {
 				d.setShowNumber(9999999);
 				d.setShowNumber(9999999);
 			}
 			}

+ 80 - 337
src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java

@@ -1,6 +1,5 @@
 package com.goafanti.demand.service.impl;
 package com.goafanti.demand.service.impl;
 
 
-import java.math.BigDecimal;
 import java.text.ParseException;
 import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Calendar;
@@ -19,16 +18,18 @@ import org.springframework.stereotype.Service;
 import com.goafanti.achievement.bo.AchievementDemandListBo;
 import com.goafanti.achievement.bo.AchievementDemandListBo;
 
 
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.constant.PageConstants;
 import com.goafanti.common.dao.AchievementDemandCountMapper;
 import com.goafanti.common.dao.AchievementDemandCountMapper;
 import com.goafanti.common.dao.AchievementDemandMapper;
 import com.goafanti.common.dao.AchievementDemandMapper;
 
 
 import com.goafanti.common.dao.AchievementKeywordMapper;
 import com.goafanti.common.dao.AchievementKeywordMapper;
 import com.goafanti.common.dao.AchievementMapper;
 import com.goafanti.common.dao.AchievementMapper;
+import com.goafanti.common.dao.BranchInformationMapper;
 import com.goafanti.common.dao.DemandFollowDetailMapper;
 import com.goafanti.common.dao.DemandFollowDetailMapper;
 import com.goafanti.common.dao.DemandInterestMapper;
 import com.goafanti.common.dao.DemandInterestMapper;
 import com.goafanti.common.dao.DemandKeywordMapper;
 import com.goafanti.common.dao.DemandKeywordMapper;
 import com.goafanti.common.dao.DemandMapper;
 import com.goafanti.common.dao.DemandMapper;
-
+import com.goafanti.common.dao.DemandPublishMapper;
 import com.goafanti.common.dao.FieldGlossoryMapper;
 import com.goafanti.common.dao.FieldGlossoryMapper;
 import com.goafanti.common.dao.NewsInterestMapper;
 import com.goafanti.common.dao.NewsInterestMapper;
 
 
@@ -42,7 +43,6 @@ import com.goafanti.common.dao.UserRoleMapper;
 import com.goafanti.common.enums.DeleteStatus;
 import com.goafanti.common.enums.DeleteStatus;
 import com.goafanti.common.enums.DemandAuditStatus;
 import com.goafanti.common.enums.DemandAuditStatus;
 import com.goafanti.common.enums.DemandInfoSourceStatus;
 import com.goafanti.common.enums.DemandInfoSourceStatus;
-import com.goafanti.common.enums.DemandPortalSearchSignType;
 import com.goafanti.common.enums.DemandReleaseStatus;
 import com.goafanti.common.enums.DemandReleaseStatus;
 import com.goafanti.common.enums.DemandStatus;
 import com.goafanti.common.enums.DemandStatus;
 import com.goafanti.common.enums.DemandSwitchSign;
 import com.goafanti.common.enums.DemandSwitchSign;
@@ -54,6 +54,7 @@ import com.goafanti.common.model.AchievementDemand;
 import com.goafanti.common.model.AchievementDemandCount;
 import com.goafanti.common.model.AchievementDemandCount;
 import com.goafanti.common.model.Demand;
 import com.goafanti.common.model.Demand;
 import com.goafanti.common.model.DemandKeyword;
 import com.goafanti.common.model.DemandKeyword;
+import com.goafanti.common.model.DemandPublish;
 import com.goafanti.common.model.Notice;
 import com.goafanti.common.model.Notice;
 import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.common.model.User;
 import com.goafanti.common.model.User;
@@ -66,12 +67,11 @@ import com.goafanti.demand.bo.DemandImportBo;
 
 
 import com.goafanti.demand.bo.DemandListBo;
 import com.goafanti.demand.bo.DemandListBo;
 import com.goafanti.demand.bo.DemandManageDetailBo;
 import com.goafanti.demand.bo.DemandManageDetailBo;
-import com.goafanti.demand.bo.DemandManageListBo;
 import com.goafanti.demand.bo.DemandPartnerListBo;
 import com.goafanti.demand.bo.DemandPartnerListBo;
+import com.goafanti.demand.bo.DemandPublishBo;
 import com.goafanti.demand.bo.ObjectInterestListBo;
 import com.goafanti.demand.bo.ObjectInterestListBo;
 import com.goafanti.demand.service.DemandService;
 import com.goafanti.demand.service.DemandService;
 
 
-import com.goafanti.portal.bo.BoutiqueListBo;
 import com.goafanti.portal.bo.DemandPortalDetailBo;
 import com.goafanti.portal.bo.DemandPortalDetailBo;
 import com.goafanti.portal.bo.DemandPortalSimilarListBo;
 import com.goafanti.portal.bo.DemandPortalSimilarListBo;
 import com.goafanti.portal.bo.DemandSearchDetailBo;
 import com.goafanti.portal.bo.DemandSearchDetailBo;
@@ -80,14 +80,10 @@ import com.goafanti.portal.bo.DemandSearchListBo;
 
 
 @Service
 @Service
 public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements DemandService {
 public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements DemandService {
-	
-
-
 	@Autowired
 	@Autowired
 	private DemandMapper					demandMapper;
 	private DemandMapper					demandMapper;
 	@Autowired
 	@Autowired
 	private UserMapper						userMapper;
 	private UserMapper						userMapper;
-
 	@Autowired
 	@Autowired
 	private UserRoleMapper					userRoleMapper;
 	private UserRoleMapper					userRoleMapper;
 	@Autowired
 	@Autowired
@@ -107,9 +103,6 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	@Autowired
 	@Autowired
 	private AchievementMapper			 	achievementMapper;
 	private AchievementMapper			 	achievementMapper;
 	@Autowired
 	@Autowired
-	private FieldGlossoryMapper 			fieldGlossoryMapper;
-
-	@Autowired
 	private DemandInterestMapper			demandInterestMapper;
 	private DemandInterestMapper			demandInterestMapper;
 	@Autowired
 	@Autowired
 	private NewsInterestMapper	newsInterestMapper;
 	private NewsInterestMapper	newsInterestMapper;
@@ -117,112 +110,14 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	private UserInterestMapper	userInterestMapper;
 	private UserInterestMapper	userInterestMapper;
 	@Autowired
 	@Autowired
 	ProjectInterestMapper	projectInterestMapper; 
 	ProjectInterestMapper	projectInterestMapper; 
-	
-	
+	@Autowired
 	DemandFollowDetailMapper	demandFollowDetailMapper;
 	DemandFollowDetailMapper	demandFollowDetailMapper;
-
-	@SuppressWarnings("unchecked")
-	@Override
-	public 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) {
-
-		Map<String, Object> params = disposeParams(auditStatus, province, serialNumber, name, keyword, infoSources,
-				demandType, validityPeriodStartDate, validityPeriodEndDate, username, status, releaseStatus,
-				releaseDateStartDate, releaseDateEndDate, createDateStartDate,  createDateEndDate, boutique, hot);
-
-		if (pNo == null || pNo < 0) {
-			pNo = 1;
-		}
-
-		if (pSize == null || pSize < 0 || pSize > 10) {
-			pSize = 10;
-		}
-
-		/*
-		 * if (TokenManager.hasRole(AFTConstants.SALESMANAGERADMIN) ||
-		 * TokenManager.hasRole(AFTConstants.SALESMANADMIN)) {
-		 * params.put("principal", TokenManager.getAdminId()); }
-		 * 
-		 * if (TokenManager.hasRole(AFTConstants.MANAGERADMIN)) {
-		 * params.put("mid", TokenManager.getAdminId()); }
-		 * 
-		 * if (TokenManager.hasRole(AFTConstants.TECHBROKER)) {
-		 * params.put("techBroker", TokenManager.getAdminId()); }
-		 */
-
-		if (!TokenManager.hasRole(AFTConstants.SUPERADMIN) && !TokenManager.hasRole(AFTConstants.AUDITORADMIN)) {
-			params.put("adminId", TokenManager.getAdminId());
-		}
-
-		if (StringUtils.isNotBlank(employerName)) {
-			params.put("employerName", employerName);
-		}
-
-		if (StringUtils.isNotBlank(username)) {
-			params.put("username", username);
-		}
-
-		return (Pagination<DemandManageListBo>) findPage("findManageUserDemandListByPage", "findManageUserDemandCount",
-				params, pNo, pSize);
-
-	}
-
-	@SuppressWarnings("unchecked")
-	@Override
-	public 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) {
-		Map<String, Object> params = disposeParams(auditStatus, province, serialNumber, name, keyword, infoSources,
-				demandType, validityPeriodStartDate, validityPeriodEndDate, username, status, releaseStatus,
-				releaseDateStartDate, releaseDateEndDate, createDateStartDate,  createDateEndDate, boutique, hot);
-		
-		if (pNo == null || pNo < 0) {
-			pNo = 1;
-		}
-
-		if (pSize == null || pSize < 0 || pSize > 10) {
-			pSize = 10;
-		}
-
-		/*if (TokenManager.hasRole(AFTConstants.SALESMANAGERADMIN) || TokenManager.hasRole(AFTConstants.SALESMANADMIN)) {
-			params.put("principal", TokenManager.getAdminId());
-		}
-		
-		if (TokenManager.hasRole(AFTConstants.MANAGERADMIN)) {
-			params.put("mid", TokenManager.getAdminId());
-		}
-		
-		if (TokenManager.hasRole(AFTConstants.TECHBROKER)) {
-			params.put("techBroker", TokenManager.getAdminId());
-		}*/
-		if (null != dataCategory) {
-			params.put("dataCategory", dataCategory);
-		}
-		if (null!=recordPerson) {
-			params.put("recordPerson",  recordPerson);
-		}
-
-		/*if (!TokenManager.hasRole(AFTConstants.SUPERADMIN) && !TokenManager.hasRole(AFTConstants.AUDITORADMIN)) {
-			params.put("adminId", TokenManager.getAdminId());
-		}*/
-
-		if (StringUtils.isNotBlank(employerName)) {
-			params.put("employerName", employerName);
-		}
-
-		if (StringUtils.isNotBlank(username)) {
-			params.put("unitName", username);
-		}
-
-		return (Pagination<DemandManageListBo>) findPage("findManageOrgDemandListByPage", "findManageOrgDemandCount",
-				params, pNo, pSize);
-	}
-
+	@Autowired
+	FieldGlossoryMapper    fieldGlossoryMapper;
+	@Autowired
+	BranchInformationMapper		branchInformationMapper;
+	@Autowired
+	DemandPublishMapper demandPublishMapper;
 	@Override
 	@Override
 	public void saveUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords) {
 	public void saveUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords) {
 		Date validityPeriod = null;
 		Date validityPeriod = null;
@@ -316,28 +211,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	public Demand selectByPrimaryKey(String id) {
 	public Demand selectByPrimaryKey(String id) {
 		return demandMapper.selectByPrimaryKey(id);
 		return demandMapper.selectByPrimaryKey(id);
 	}
 	}
-
-	@SuppressWarnings("unchecked")
-	@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,String createDateStartDate, String createDateEndDate, Integer pNo, Integer pSize) {
-		Map<String, Object> params = disposeParams(auditStatus, null, serialNumber, name, keyword, null, demandType,
-				validityPeriodStartDate, validityPeriodEndDate, null, status, releaseStatus, releaseDateStartDate,
-				releaseDateEndDate, createDateStartDate, createDateEndDate, null, null);
-
-		params.put("employerId", TokenManager.getUserId());
-		
-		if (pNo == null || pNo < 0) {
-			pNo = 1;
-		}
-
-		if (pSize == null || pSize < 0) {
-			pSize = 10;
-		}
-		return (Pagination<DemandListBo>) findPage("findDemandListByPage", "findDemandCount", params, pNo, pSize);
-	}
-
+	
 	@Override
 	@Override
 	public int updateReleaseStatus(Demand d) {
 	public int updateReleaseStatus(Demand d) {
 		d.setAuditStatus(DemandAuditStatus.AUDITED.getCode());
 		d.setAuditStatus(DemandAuditStatus.AUDITED.getCode());
@@ -414,7 +288,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	}
 	}
 
 
 	@Override
 	@Override
-	public void saveDemand(Demand d, String validityPeriodFormattedDate, String[] keywords) {
+	public void saveDemand(Demand d, String validityPeriodFormattedDate, String[] keywords,List<String> webPages, List<String> appPages) {
 		Date validityPeriod = null;
 		Date validityPeriod = null;
 		if (!StringUtils.isBlank(validityPeriodFormattedDate)) {
 		if (!StringUtils.isBlank(validityPeriodFormattedDate)) {
 			try {
 			try {
@@ -422,27 +296,61 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 			} catch (ParseException e) {
 			} catch (ParseException e) {
 			}
 			}
 		}
 		}
-
 		d.setValidityPeriod(validityPeriod);
 		d.setValidityPeriod(validityPeriod);
 		d.setId(UUID.randomUUID().toString());
 		d.setId(UUID.randomUUID().toString());
-
 		d.setDeletedSign(DeleteStatus.UNDELETE.getCode());
 		d.setDeletedSign(DeleteStatus.UNDELETE.getCode());
-
 		Calendar now = Calendar.getInstance();
 		Calendar now = Calendar.getInstance();
 		now.set(Calendar.MILLISECOND, 0);
 		now.set(Calendar.MILLISECOND, 0);
 		d.setStatus(DemandStatus.UNRESOLVED.getCode());
 		d.setStatus(DemandStatus.UNRESOLVED.getCode());
 		d.setReleaseStatus(DemandReleaseStatus.UNRELEASE.getCode());
 		d.setReleaseStatus(DemandReleaseStatus.UNRELEASE.getCode());
-
 		if (DemandAuditStatus.SUBMIT.getCode().equals(d.getAuditStatus())) {
 		if (DemandAuditStatus.SUBMIT.getCode().equals(d.getAuditStatus())) {
 			d.setAuditStatus(DemandAuditStatus.INAUDIT.getCode());
 			d.setAuditStatus(DemandAuditStatus.INAUDIT.getCode());
 			createAuditorNotice(d);
 			createAuditorNotice(d);
 		} else {
 		} else {
 			d.setAuditStatus(DemandAuditStatus.CREATE.getCode());
 			d.setAuditStatus(DemandAuditStatus.CREATE.getCode());
 		}
 		}
-
 		d.setCreateTime(now.getTime());
 		d.setCreateTime(now.getTime());
 		demandMapper.insert(d);
 		demandMapper.insert(d);
 		disposeDemandKeyword(keywords, d, false);
 		disposeDemandKeyword(keywords, d, false);
+		disposeDemandPublish(d,webPages,appPages);
+	}
+
+	private void disposeDemandPublish(Demand d, List<String> webPages, List<String> appPages) {
+		DemandPublish dp = null;
+		String defaultPlatformId = branchInformationMapper.selectByDomain(PageConstants.DEFAULT_DOMAIN).getId();
+		if(webPages.size()>0){
+			for(String page: webPages){
+				dp = new DemandPublish();
+				dp.setId(UUID.randomUUID().toString());
+				dp.setDemandId(d.getId());
+				dp.setPublisher(TokenManager.getUserId());
+				dp.setPublishTime(d.getCreateTime());
+				dp.setPublishClient(PageConstants.WEB_PLATFORM);
+				dp.setPublishPage(page);
+				dp.setPublishPlatform(defaultPlatformId);
+				dp.setIfTop(AFTConstants.NO);
+				dp.setTopNumber(PageConstants.DEFAULT_TOP_NUMBER);
+				dp.setShowNumber(PageConstants.DEFAULT_SHOW_NUMBER);
+				demandPublishMapper.insert(dp);
+			}
+		}
+		if(appPages.size()>0){
+			for(String page: webPages){
+				dp = new DemandPublish();
+				dp.setId(UUID.randomUUID().toString());
+				dp.setDemandId(d.getId());
+				dp.setPublisher(TokenManager.getUserId());
+				dp.setPublishTime(d.getCreateTime());
+				dp.setPublishClient(PageConstants.APP_PLATFORM);
+				dp.setPublishPage(page);
+				dp.setPublishPlatform(defaultPlatformId);
+				dp.setIfTop(AFTConstants.NO);
+				dp.setTopNumber(PageConstants.DEFAULT_TOP_NUMBER);
+				dp.setShowNumber(PageConstants.DEFAULT_SHOW_NUMBER);
+				demandPublishMapper.insert(dp);
+			}
+		}
+		
 	}
 	}
 
 
 	@Override
 	@Override
@@ -491,59 +399,6 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		demandKeywordMapper.insertBatch(demandKeywordList);
 		demandKeywordMapper.insertBatch(demandKeywordList);
 	}
 	}
 
 
-	@SuppressWarnings("unchecked")
-	@Override
-	public 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) {
-		Map<String, Object> params = new HashMap<>();
-		if (!StringUtils.isBlank(url)) {
-			params.put("url", url);
-		}
-		if (!StringUtils.isBlank(keyword)) {
-			params.put("keyword", keyword);
-		}
-
-		if (null != industryCategoryA) {
-			params.put("industryCategoryA", industryCategoryA);
-		}
-
-		if (null != industryCategoryB) {
-			params.put("industryCategoryB", industryCategoryB);
-		}
-
-		if (null != demandType) {
-			params.put("demandType", demandType);
-		}
-
-		if (null != budgetCostLower && DemandPortalSearchSignType.ALL.getCode().equals(sign)) {
-			params.put("budgetCostLower", budgetCostLower);
-		}
-
-		if (null != budgetCostUpper && DemandPortalSearchSignType.ALL.getCode().equals(sign)) {
-			params.put("budgetCostUpper", budgetCostUpper);
-		}
-
-		if (null != sign) {
-			params.put("sign", sign);
-		}
-
-		if (null != dateSort) {
-			params.put("dateSort", dateSort);
-		}
-
-		if (pNo == null || pNo < 0) {
-			pNo = 1;
-		}
-
-		if (pSize == null || pSize < 0 || pSize > 10) {
-			pSize = 12;
-		}
-
-		return (Pagination<DemandSearchListBo>) findPage("findSearchDemandListByPage", "findSearchDemandCount", params,
-				pNo, pSize);
-	}
-
 	@Override
 	@Override
 	public DemandSearchDetailBo selectDemandSearchDetail(String uid, String id) {
 	public DemandSearchDetailBo selectDemandSearchDetail(String uid, String id) {
 		return demandMapper.selectDemandSearchDetail(uid, id);
 		return demandMapper.selectDemandSearchDetail(uid, id);
@@ -807,7 +662,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	public int updateByPrimaryKeySelective(Demand d) {
 	public int updateByPrimaryKeySelective(Demand d) {
 		return demandMapper.updateByPrimaryKeySelective(d);
 		return demandMapper.updateByPrimaryKeySelective(d);
 	}
 	}
-
+	
 	@Override
 	@Override
 	public DemandListBo selectDemandDetail(String id ) {
 	public DemandListBo selectDemandDetail(String id ) {
 		DemandListBo d=demandMapper.selectAppByPrimaryKey(id);
 		DemandListBo d=demandMapper.selectAppByPrimaryKey(id);
@@ -834,52 +689,6 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 
 
 	@SuppressWarnings("unchecked")
 	@SuppressWarnings("unchecked")
 	@Override
 	@Override
-	public Pagination<BoutiqueListBo> boutiqueSearchList(Integer industryCategoryA, Integer pNo, Integer pSize) {
-		Map<String, Object> params = new HashMap<>();
-		if (null != industryCategoryA)
-			params.put("industryCategoryA", industryCategoryA);
-		return (Pagination<BoutiqueListBo>) findPage("findBoutiqueListByPage", "findBoutiqueCount", params, pNo, pSize);
-	}
-
-	@Override
-	public ArrayList<DemandListBo> selectDemandList(Integer boutique) {
-		return demandMapper.selectDemandList(boutique);
-	}
-
-	@Override
-	public List<DemandListBo> selectCsutomerLike() {
-		return demandMapper.selectCsutomerLike(TokenManager.getUserId());
-	}
-
-	@SuppressWarnings("unchecked")
-	@Override
-	public 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) {
-		Map<String, Object> params = disposeParams(auditStatus, null, serialNumber, name, keyword, null, demandType,
-				validityPeriodStartDate, validityPeriodEndDate, null, status, releaseStatus, releaseDateStartDate,
-				releaseDateEndDate,null,null, null, null);
-		if (null!=industryCategoryA) {
-			params.put("industryCategoryA",  industryCategoryA);
-		}
-		if (null!=employerId) {
-			params.put("employerId", employerId);
-		}
-		if (pNo == null || pNo < 0) {
-			pNo = 1;
-		}
-
-		if (pSize == null || pSize < 0) {
-			pSize = 10;
-			
-		}
-		Pagination<DemandSearchListBo> p=(Pagination<DemandSearchListBo>) findPage("findAppDemandListByPage", "findAppDemandCount", params, pNo, pSize);
-		return p;
-	}
-
-	@SuppressWarnings("unchecked")
-	@Override
 	public Pagination<ObjectInterestListBo> selectinterest(Integer type,Integer pNo, Integer pSize) {
 	public Pagination<ObjectInterestListBo> selectinterest(Integer type,Integer pNo, Integer pSize) {
 		if (pNo == null || pNo < 0) {
 		if (pNo == null || pNo < 0) {
 			pNo = 1;
 			pNo = 1;
@@ -1019,92 +828,6 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		return demandMapper.insert(d);
 		return demandMapper.insert(d);
 	}
 	}
 
 
-
-	@SuppressWarnings("unchecked")
-	@Override
-	public 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) {
-		Map<String, Object> params = disposeParams(auditStatus, province, serialNumber, name, keyword, infoSources,
-				demandType, validityPeriodStartDate, validityPeriodEndDate, username, status, releaseStatus,
-				releaseDateStartDate, releaseDateEndDate, createDateStartDate,  createDateEndDate, boutique, hot);
-
-		if (pNo == null || pNo < 0) {
-			pNo = 1;
-		}
-
-		if (pSize == null || pSize < 0 || pSize > 10) {
-			pSize = 10;
-		}
-		if (null != dataCategory) {
-			params.put("dataCategory", dataCategory);
-		}
-
-		if (!TokenManager.hasRole(AFTConstants.SUPERADMIN) && !TokenManager.hasRole(AFTConstants.AUDITORADMIN)) {
-			params.put("adminId", TokenManager.getAdminId());
-		}
-
-		if (StringUtils.isNotBlank(employerName)) {
-			params.put("employerName", employerName);
-		}
-
-		if (StringUtils.isNotBlank(username)) {
-			params.put("unitName", username);
-		}
-		if (null != techBrokerId) {
-			params.put("techBrokerId", techBrokerId);
-		}
-
-		return (Pagination<DemandManageListBo>) findPage("findMyDemandListByPage", "findMyDemandCount",
-				params, pNo, pSize);
-	}
-	
-	
-	@SuppressWarnings("unchecked")
-	@Override
-	public 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) {
-		Map<String, Object> params = disposeParams(auditStatus, province, serialNumber, name, keyword, infoSources,
-				demandType, validityPeriodStartDate, validityPeriodEndDate, username, status, releaseStatus,
-				releaseDateStartDate, releaseDateEndDate, createDateStartDate,  createDateEndDate, boutique, hot);
-
-		if (pNo == null || pNo < 0) {
-			pNo = 1;
-		}
-
-		if (pSize == null || pSize < 0 || pSize > 10) {
-			pSize = 10;
-		}
-		if (null != dataCategory) {
-			params.put("dataCategory", dataCategory);
-		} 
-		if (null != recordPerson) {
-			params.put("recordPerson", recordPerson);
-		}
-		if (!TokenManager.hasRole(AFTConstants.SUPERADMIN) && !TokenManager.hasRole(AFTConstants.AUDITORADMIN)) {
-			params.put("adminId", TokenManager.getAdminId());
-		}
-
-		if (StringUtils.isNotBlank(employerName)) {
-			params.put("employerName", employerName);
-		}
-
-		if (StringUtils.isNotBlank(username)) {
-			params.put("unitName", username);
-		}
-		if (null != techBrokerId) {
-			params.put("techBrokerId", techBrokerId);
-		}
-
-		return (Pagination<DemandManageListBo>) findPage("findManageDemandListByPage", "findManagegDemandCount",
-				params, pNo, pSize);
-	}
-
 	@Override
 	@Override
 	public Demand DemandFollowDetails(String id) {
 	public Demand DemandFollowDetails(String id) {
 		return demandMapper.selectDemandFollow(id);
 		return demandMapper.selectDemandFollow(id);
@@ -1147,10 +870,30 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		return demandMapper.getProLearnStudyDemand();
 		return demandMapper.getProLearnStudyDemand();
 	}
 	}
 	
 	
-	
-	
-	
-	
-	
-	
+	@SuppressWarnings("unchecked")
+	@Override
+	public 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) {
+		Map<String, Object> params = disposeParams(auditStatus, null, serialNumber, name, keyword, null, demandType,
+				validityPeriodStartDate, validityPeriodEndDate, null, status, releaseStatus, releaseDateStartDate,
+				releaseDateEndDate,null,null, null, null);
+		if (null!=industryCategoryA) {
+			params.put("industryCategoryA",  industryCategoryA);
+		}
+		if (null!=employerId) {
+			params.put("employerId", employerId);
+		}
+		if (pNo == null || pNo < 0) {
+			pNo = 1;
+		}
+
+		if (pSize == null || pSize < 0) {
+			pSize = 10;
+			
+		}
+		Pagination<DemandSearchListBo> p=(Pagination<DemandSearchListBo>) findPage("findAppDemandListByPage", "findAppDemandCount", params, pNo, pSize);
+		return p;
+	}
 }
 }

+ 0 - 240
src/main/java/com/goafanti/portal/controller/PortalSearchController.java

@@ -1,240 +0,0 @@
-package com.goafanti.portal.controller;
-
-import java.math.BigDecimal;
-import java.util.List;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.goafanti.achievement.service.AchievementService;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.BaseController;
-import com.goafanti.common.enums.AchievementMaturity;
-import com.goafanti.common.enums.DemandPortalSearchSignType;
-import com.goafanti.common.enums.UserLevel;
-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;
-
-@RestController
-@RequestMapping(value = "/portal/search")
-public class PortalSearchController extends BaseController {
-	@Resource
-	private AchievementService			achievementService;
-	@Resource
-	private DemandService				demandService;
-	@Resource
-	private UserIdentityService			userIdentityService;
-	@Resource
-	private OrganizationIdentityService	organizationIdentityService;
-
-	/**
-	 * 项目搜索
-	 */
-	@SuppressWarnings("unchecked")
-	@RequestMapping(value = "/achievementList", method = RequestMethod.GET)
-	public Result achievementSearchList(HttpServletRequest req,  String keyword,Integer dataCategory,Integer category,
-			Integer fieldA, String pageNo, String pageSize,String transferMode, Integer dateSort,String upperPrice,String lowerPrice,
-			Integer internationalFlag) {
-		Result res = new Result();
-		Integer pNo = 1;
-		Integer pSize = 20;
-		String url=req.getServerName();
-		url=url.substring(url.indexOf(".")+1, url.length());
-		if(null != dateSort && dateSort != 0 && dateSort != 1){
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "时间排序"));
-		}
-		if (null==dateSort) {
-			dateSort=0;
-		}
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize = Integer.parseInt(pageSize);
-		}
-		if (StringUtils.isNumeric(pageNo)) {
-			pNo = Integer.parseInt(pageNo);
-		}
-		if (null!=upperPrice&&null!=lowerPrice) {
-			try{
-				new BigDecimal(upperPrice);
-				new BigDecimal(lowerPrice);
-			}catch (Exception e) {
-				res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "金额"));
-				return res;
-			}
-		}
-		
-		
-		Pagination<AchievementSearchListBo> achievementSearchList = achievementService.listAchievementSearchList( url,
-				  keyword, dataCategory,category,fieldA, transferMode, pNo, pSize,dateSort,upperPrice,lowerPrice,internationalFlag);
-		
-		
-		List<AchievementSearchListBo> list = (List<AchievementSearchListBo>) achievementSearchList.getList();
-		for (int i = 0; i < list.size(); i++) {
-			Integer maturity = list.get(i).getMaturity();
-			if (null != maturity) {
-				if (AchievementMaturity.RESEARCH.getCode().equals(maturity)) {
-					list.get(i).setMaturityS(AchievementMaturity.RESEARCH.getDesc());
-				} else if (AchievementMaturity.SAMPLE.getCode().equals(maturity)) {
-					list.get(i).setMaturityS(AchievementMaturity.SAMPLE.getDesc());
-				} else if (AchievementMaturity.PRIMARYTEST.getCode().equals(maturity)) {
-					list.get(i).setMaturityS(AchievementMaturity.PRIMARYTEST.getDesc());
-				} else if (AchievementMaturity.INTERMEDIATETEST.getCode().equals(maturity)) {
-					list.get(i).setMaturityS(AchievementMaturity.INTERMEDIATETEST.getDesc());
-				} else if (AchievementMaturity.MASSPRODUCTION.getCode().equals(maturity)) {
-					list.get(i).setMaturityS(AchievementMaturity.MASSPRODUCTION.getDesc());
-				}
-			}
-			
-			String pic=list.get(i).getTechnicalPictureUrl();//在存在多张图片的情况下,暂时先取第一张
-			if(null!= pic) {
-				boolean hascomma = pic.contains(",");
-				if(hascomma) {
-					String[] picurl = pic.split(",");
-					list.get(i).setTechnicalPictureUrl(picurl[0]);
-				}
-			}
-		}
-		achievementSearchList.setList(list);
-		res.setData(achievementSearchList);
-		return res;
-	}
-
-	/**
-	 * 科技需求搜索
-	 */
-	@RequestMapping(value = "/demandList", method = RequestMethod.GET)
-	public Result demandSearchList(HttpServletRequest req,Integer sign, String keyword, Integer industryCategoryA, Integer industryCategoryB,
-			Integer demandType, BigDecimal budgetCostLower, BigDecimal budgetCostUpper, String pageNo,
-			String pageSize,Integer dateSort) {
-		Result res = new Result();
-		String url=req.getServerName();
-		url=url.substring(url.indexOf(".")+1, url.length());
-		Integer pNo = 1;
-		Integer pSize = 10;
-		if (null == sign) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "查询标记"));
-			return res;
-		}
-
-		if (!DemandPortalSearchSignType.ALL.getCode().equals(sign)
-				&& !DemandPortalSearchSignType.NEGOATION.getCode().equals(sign)) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "查询标记"));
-			return res;
-		}
-		if (null==dateSort) {
-			dateSort=0;
-		}
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize = Integer.parseInt(pageSize);
-		}
-		if (StringUtils.isNumeric(pageNo)) {
-			pNo = Integer.parseInt(pageNo);
-		}
-		res.setData(demandService.listDemandSearchList(url,sign, keyword, industryCategoryA, industryCategoryB, demandType,
-				budgetCostLower, budgetCostUpper, pNo, pSize,dateSort));
-		return res;
-	}
-
-	/**
-	 * 用户搜索
-	 */
-	@RequestMapping(value = "/subscriberList", method = RequestMethod.GET)
-	public Result subscriberSearchList(HttpServletRequest req,String name, Integer level, Integer type, String field, Integer province,
-			Integer city, Integer area,Integer international, String pageNo, String pageSize) {
-		Result res = new Result();
-		String url=req.getServerName();
-		url=url.substring(url.indexOf(".")+1, url.length());
-		if (null == type) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "用户类型"));
-			return res;
-		}
-
-		if (!UserType.PERSONAL.getCode().equals(type) && !UserType.ORGANIZATION.getCode().equals(type)) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "用户类型"));
-			return res;
-		}
-
-		if (null != level && !UserLevel.GENERAL.getCode().equals(level)
-				&& !UserLevel.CERTIFIED.getCode().equals(level)) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "用户认证标记"));
-			return res;
-		}
-		Integer pNo = 1;
-		Integer pSize = 12;
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize = Integer.parseInt(pageSize);
-		}
-		if (StringUtils.isNumeric(pageNo)) {
-			pNo = Integer.parseInt(pageNo);
-		}
-		if (UserType.PERSONAL.getCode().equals(type)) {
-			res.setData(userIdentityService.listSubscriber(url,name, level, field, province, city, area, international, pNo, pSize));
-		} else {
-			res.setData(organizationIdentityService.listSubscriber(url,name, level, field, province, city, area, pNo, pSize));
-		}
-		return res;
-	}
-	
-	/**
-	 * 
-	 * @param boutiqueType 0 - 专利 , 1 - 技术, 2 - 成果
-	 * @param industryCatalog 行业类别
-	 * @param pageNo
-	 * @param pageSize
-	 * @return
-	 */
-	@RequestMapping(value="/boutiqueSearchList",method = RequestMethod.POST)
-	public Result boutiqueSearchList(Integer boutiqueType, Integer industryCatalog,String pageNo, String pageSize){
-		Result res = new Result();
-		if(null == boutiqueType){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "精品类型"));
-		}
-		if(null == industryCatalog){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","行业类别"));
-		}
-		Integer pNo = 1;
-		Integer pSize = 9;
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize = Integer.parseInt(pageSize);
-		}
-		if (StringUtils.isNumeric(pageNo)) {
-			pNo = Integer.parseInt(pageNo);
-		}
-		Pagination<BoutiqueListBo> boutiqueSearchList = null ;
-		if(boutiqueType == 0){
-			boutiqueSearchList=achievementService.boutiqueSearchList(null, 0, industryCatalog, pNo, pSize);
-		}else if(boutiqueType == 1){
-			boutiqueSearchList=achievementService.boutiqueSearchList(1, null, industryCatalog, pNo, pSize);
-		}else if(boutiqueType == 2){
-			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;
-	}
-	
-}

+ 150 - 0
src/main/java/com/goafanti/user/bo/UserBaseBo.java

@@ -0,0 +1,150 @@
+package com.goafanti.user.bo;
+
+import java.util.Date;
+
+import com.alibaba.fastjson.annotation.JSONField;
+
+public class UserBaseBo {
+	 private String	uid;
+	    /**
+	     * 用户等级
+	     */
+	    private Integer	lvl;
+	    /**
+	     * 注册用户名
+	     */
+	    private String username;
+	    /**
+	     * 用户昵称
+	     */
+	    private String	nickname;
+	   /**
+	    * 用户认证名称
+	    */
+	    private String identifyName;
+	    /**
+	     * 邮箱
+	     */
+	    private String	email;
+	    /**
+	     * 用户编号
+	     */
+	    private Integer	number;
+	    /**
+	     * 帐号类型
+	     */
+	    private Integer	type;
+	    /**
+	     * 用户头像URL
+	     */
+	    private String	headPortraitUrl;
+	    /**
+	     * 公司LogoUrl
+	     */
+	    private String	logoUrl;
+	   
+	    /**
+	     * 用户状态
+	     */
+	    private Integer status;
+	    
+	    /**
+	     * 实名认证
+	     */
+	    private Integer authentication;
+	    
+	    /**
+	     * 注册时间
+	     */
+	    @JSONField (format="yyyy-MM-dd")
+	    private Date createTime;
+	    
+	    /**
+	     * 手机号码 
+	     */
+	    private String mobile;
+	    public String getUid() {
+	        return uid;
+	    }
+	    public void setUid(String uid) {
+	        this.uid = uid;
+	    }
+	    public Integer getLvl() {
+	        return lvl;
+	    }
+	    public void setLvl(Integer lvl) {
+	        this.lvl = lvl;
+	    }
+	    public String getUsername() {
+			return username;
+		}
+		public void setUsername(String username) {
+			this.username = username;
+		}
+		public String getIdentifyName() {
+			return identifyName;
+		}
+		public void setIdentifyName(String identifyName) {
+			this.identifyName = identifyName;
+		}
+		public String getNickname() {
+	        return nickname;
+	    }
+	    public void setNickname(String nickname) {
+	        this.nickname = nickname;
+	    }
+	    public String getEmail() {
+	        return email;
+	    }
+	    public void setEmail(String email) {
+	        this.email = email;
+	    }
+	    public Integer getNumber() {
+	        return number;
+	    }
+	    public void setNumber(Integer number) {
+	        this.number = number;
+	    }
+	    public Integer getType() {
+	        return type;
+	    }
+	    public void setType(Integer type) {
+	        this.type = type;
+	    }
+	    public String getHeadPortraitUrl() {
+			return headPortraitUrl;
+		}
+		public void setHeadPortraitUrl(String headPortraitUrl) {
+			this.headPortraitUrl = headPortraitUrl;
+		}
+		public String getLogoUrl() {
+	        return logoUrl;
+	    }
+	    public void setLogoUrl(String logoUrl) {
+	        this.logoUrl = logoUrl;
+	    }
+		public Integer getStatus() {
+			return status;
+		}
+		public void setStatus(Integer status) {
+			this.status = status;
+		}
+		public Integer getAuthentication() {
+			return authentication;
+		}
+		public void setAuthentication(Integer authentication) {
+			this.authentication = authentication;
+		}
+		public Date getCreateTime() {
+			return createTime;
+		}
+		public void setCreateTime(Date createTime) {
+			this.createTime = createTime;
+		}
+		public String getMobile() {
+			return mobile;
+		}
+		public void setMobile(String mobile) {
+			this.mobile = mobile;
+		}
+}

+ 37 - 123
src/main/java/com/goafanti/user/bo/UserPageHomeBo.java

@@ -1,150 +1,64 @@
 package com.goafanti.user.bo;
 package com.goafanti.user.bo;
 
 
-import java.util.Date;
-
-import com.alibaba.fastjson.annotation.JSONField;
-
-public class UserPageHomeBo {
-    private String	uid;
-    /**
-     * 用户等级
-     */
-    private Integer	lvl;
-    /**
-     * 注册用户名
-     */
-    private String username;
-    /**
-     * 用户昵称
-     */
-    private String	nickname;
-   /**
-    * 用户认证名称
-    */
-    private String identifyName;
+public class UserPageHomeBo extends UserBaseBo{
     /**
     /**
-     * 邮箱
+     * 专利数量
      */
      */
-    private String	email;
+    private Integer	patentNum;
     /**
     /**
-     * 用户编号
+     * 软著数量
      */
      */
-    private Integer	number;
+    private Integer	copyrightNum;
     /**
     /**
-     * 帐号类型
+     * 科技成果数量
      */
      */
-    private Integer	type;
+    private Integer	techProjectNum;
     /**
     /**
-     * 用户头像URL
+     * 发布需求数量
      */
      */
-    private String	headPortraitUrl;
+    private Integer	demandNum;
     /**
     /**
-     * 公司LogoUrl
+     * 发布成果数量
      */
      */
-    private String	logoUrl;
-   
+    private Integer	achievementNum;
     /**
     /**
-     * 用户状态
+     * 知识产权数量
      */
      */
-    private Integer status;
-    
-    /**
-     * 实名认证
-     */
-    private Integer authentication;
-    
-    /**
-     * 注册时间
-     */
-    private Date createTime;
-    
-    /**
-     * 手机号码 
-     */
-    private String mobile;
-    public String getUid() {
-        return uid;
-    }
-    public void setUid(String uid) {
-        this.uid = uid;
-    }
-    public Integer getLvl() {
-        return lvl;
-    }
-    public void setLvl(Integer lvl) {
-        this.lvl = lvl;
-    }
-    public String getUsername() {
-		return username;
-	}
-	public void setUsername(String username) {
-		this.username = username;
-	}
-	public String getIdentifyName() {
-		return identifyName;
+    private Integer	intellectualPropertyNum;
+	public Integer getPatentNum() {
+		return patentNum;
 	}
 	}
-	public void setIdentifyName(String identifyName) {
-		this.identifyName = identifyName;
+	public void setPatentNum(Integer patentNum) {
+		this.patentNum = patentNum;
 	}
 	}
-	public String getNickname() {
-        return nickname;
-    }
-    public void setNickname(String nickname) {
-        this.nickname = nickname;
-    }
-    public String getEmail() {
-        return email;
-    }
-    public void setEmail(String email) {
-        this.email = email;
-    }
-    public Integer getNumber() {
-        return number;
-    }
-    public void setNumber(Integer number) {
-        this.number = number;
-    }
-    public Integer getType() {
-        return type;
-    }
-    public void setType(Integer type) {
-        this.type = type;
-    }
-    public String getHeadPortraitUrl() {
-		return headPortraitUrl;
+	public Integer getCopyrightNum() {
+		return copyrightNum;
 	}
 	}
-	public void setHeadPortraitUrl(String headPortraitUrl) {
-		this.headPortraitUrl = headPortraitUrl;
+	public void setCopyrightNum(Integer copyrightNum) {
+		this.copyrightNum = copyrightNum;
 	}
 	}
-	public String getLogoUrl() {
-        return logoUrl;
-    }
-    public void setLogoUrl(String logoUrl) {
-        this.logoUrl = logoUrl;
-    }
-	public Integer getStatus() {
-		return status;
+	public Integer getTechProjectNum() {
+		return techProjectNum;
 	}
 	}
-	public void setStatus(Integer status) {
-		this.status = status;
+	public void setTechProjectNum(Integer techProjectNum) {
+		this.techProjectNum = techProjectNum;
 	}
 	}
-	public Integer getAuthentication() {
-		return authentication;
+	public Integer getDemandNum() {
+		return demandNum;
 	}
 	}
-	public void setAuthentication(Integer authentication) {
-		this.authentication = authentication;
+	public void setDemandNum(Integer demandNum) {
+		this.demandNum = demandNum;
 	}
 	}
-	@JSONField(format="yyyyMMdd")
-	public Date getCreateTime() {
-		return createTime;
+	public Integer getAchievementNum() {
+		return achievementNum;
 	}
 	}
-	public void setCreateTime(Date createTime) {
-		this.createTime = createTime;
+	public void setAchievementNum(Integer achievementNum) {
+		this.achievementNum = achievementNum;
 	}
 	}
-	public String getMobile() {
-		return mobile;
+	public Integer getIntellectualPropertyNum() {
+		return intellectualPropertyNum;
 	}
 	}
-	public void setMobile(String mobile) {
-		this.mobile = mobile;
+	public void setIntellectualPropertyNum(Integer intellectualPropertyNum) {
+		this.intellectualPropertyNum = intellectualPropertyNum;
 	}
 	}
 }
 }

+ 33 - 0
src/main/java/com/goafanti/user/controller/UserApiController.java

@@ -47,6 +47,7 @@ import com.goafanti.easemob.EasemobUtils;
 import com.goafanti.user.bo.InputOrgPro;
 import com.goafanti.user.bo.InputOrgPro;
 import com.goafanti.user.bo.InputOrganizationIdentity;
 import com.goafanti.user.bo.InputOrganizationIdentity;
 import com.goafanti.user.bo.InputOrganizationTech;
 import com.goafanti.user.bo.InputOrganizationTech;
+import com.goafanti.user.bo.InputUser;
 import com.goafanti.user.bo.InputUserAbility;
 import com.goafanti.user.bo.InputUserAbility;
 import com.goafanti.user.bo.InputUserCareer;
 import com.goafanti.user.bo.InputUserCareer;
 import com.goafanti.user.bo.InputUserEdu;
 import com.goafanti.user.bo.InputUserEdu;
@@ -577,8 +578,40 @@ public class UserApiController extends BaseApiController {
 		return res;
 		return res;
 
 
 	}
 	}
+	
+	/**
+	 * 用户基本信息
+	 * @return
+	 */
+	@RequestMapping(value = "/userBase", method = RequestMethod.GET)
+	public Result userBase(){
+		Result res = new Result();
+		res.setData(userService.selectUserBase(TokenManager.getUserId()));
+		return res;
+	}
 
 
 	/**
 	/**
+	 * 修改用户基本信息
+	 * @return
+	 */
+	@RequestMapping(value = "/updateUserBase", method = RequestMethod.POST)
+	public Result updateUserBase(String identifyName,String mobile,String email,String nickname){
+		Result res = new Result();
+		if(StringUtils.isBlank(identifyName) || StringUtils.isBlank(mobile)
+				|| StringUtils.isBlank(email) || StringUtils.isBlank(nickname)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"用户信息不全"));
+		}
+		User user = new User();
+		user.setId(TokenManager.getUserId());
+		user.setIdentifyName(identifyName);
+		user.setMobile(mobile);
+		user.setEmail(email);
+		user.setNickname(nickname);
+		userService.updateByPrimaryKeySelective(user);
+		return res;
+	}
+	
+	/**
 	 * 登陆后返回用户基本信息
 	 * 登陆后返回用户基本信息
 	 * 
 	 * 
 	 * @return
 	 * @return

+ 3 - 0
src/main/java/com/goafanti/user/service/UserService.java

@@ -6,6 +6,7 @@ import java.util.Map;
 import com.goafanti.app.bo.UserBasicInfo;
 import com.goafanti.app.bo.UserBasicInfo;
 import com.goafanti.common.model.User;
 import com.goafanti.common.model.User;
 import com.goafanti.user.bo.OrgUnitNames;
 import com.goafanti.user.bo.OrgUnitNames;
+import com.goafanti.user.bo.UserBaseBo;
 import com.goafanti.user.bo.UserDownLoadBo;
 import com.goafanti.user.bo.UserDownLoadBo;
 import com.goafanti.user.bo.UserNames;
 import com.goafanti.user.bo.UserNames;
 import com.goafanti.user.bo.UserPageHomeBo;
 import com.goafanti.user.bo.UserPageHomeBo;
@@ -26,6 +27,8 @@ public interface UserService {
 
 
 	User insertRegister(User user, String unitName, String contacts);
 	User insertRegister(User user, String unitName, String contacts);
 
 
+	UserBaseBo selectUserBase(String userId);
+	
 	UserPageHomeBo selectUserPageHomeBoByUserId(String userId);
 	UserPageHomeBo selectUserPageHomeBoByUserId(String userId);
 
 
 	UserDownLoadBo selectUserDownLoadBoByUserId(String userId);
 	UserDownLoadBo selectUserDownLoadBoByUserId(String userId);

+ 16 - 8
src/main/java/com/goafanti/user/service/impl/UserServiceImpl.java

@@ -1,11 +1,10 @@
 package com.goafanti.user.service.impl;
 package com.goafanti.user.service.impl;
 
 
-import java.text.ParseException;
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
 
 
-import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
@@ -20,6 +19,7 @@ import com.goafanti.common.model.User;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.user.bo.OrgUnitNames;
 import com.goafanti.user.bo.OrgUnitNames;
+import com.goafanti.user.bo.UserBaseBo;
 import com.goafanti.user.bo.UserDownLoadBo;
 import com.goafanti.user.bo.UserDownLoadBo;
 import com.goafanti.user.bo.UserNames;
 import com.goafanti.user.bo.UserNames;
 import com.goafanti.user.bo.UserPageHomeBo;
 import com.goafanti.user.bo.UserPageHomeBo;
@@ -91,12 +91,14 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 
 
 	@Override
 	@Override
 	public UserPageHomeBo selectUserPageHomeBoByUserId(String uid) {
 	public UserPageHomeBo selectUserPageHomeBoByUserId(String uid) {
-		UserPageHomeBo bo = userMapper.selectUserPageHomeBoByUserId(uid);
-		/*bo.setPatentNum(patentInfoMapper.findPatentInfoNumByUid(uid));
-		bo.setCopyrightNum(copyrightInfoMapper.findCopyrightInfoNumByUid(uid));
-		bo.setTechProjectNum(techProjectMapper.findTechProjectNumByUid(uid));
-		bo.setIntellectualPropertyNum(orgIntellectualPropertyMapper.findIntellectualPropertyNum(uid));*/
-		return bo;
+		UserBaseBo baseBo = userMapper.selectUserBaseByUserId(uid);
+		UserPageHomeBo homeBo = new UserPageHomeBo();
+		/*homeBo.setPatentNum(patentInfoMapper.findPatentInfoNumByUid(uid));
+		homeBo.setCopyrightNum(copyrightInfoMapper.findCopyrightInfoNumByUid(uid));
+		homeBo.setTechProjectNum(techProjectMapper.findTechProjectNumByUid(uid));
+		homeBo.setIntellectualPropertyNum(orgIntellectualPropertyMapper.findIntellectualPropertyNum(uid));*/
+		BeanUtils.copyProperties(baseBo, homeBo);
+		return homeBo;
 	}
 	}
 
 
 	@Override
 	@Override
@@ -198,4 +200,10 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 	public User selectByNumber(String easemobName) {
 	public User selectByNumber(String easemobName) {
 		return userMapper.selectByNumber(easemobName);
 		return userMapper.selectByNumber(easemobName);
 	}
 	}
+
+	@Override
+	public UserBaseBo selectUserBase(String userId) {
+		 
+		return userMapper.selectUserBaseByUserId(userId);
+	}
 }
 }