Przeglądaj źródła

科技需求用户管理

wanghui 7 lat temu
rodzic
commit
352f8d99ec

+ 1 - 4
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -41,7 +41,6 @@ import com.goafanti.common.enums.AchievementAuditStatus;
 import com.goafanti.common.enums.AchievementReleaseStatus;
 import com.goafanti.common.enums.AchievementSwitchSign;
 import com.goafanti.common.enums.DeleteStatus;
-import com.goafanti.common.enums.DemandAuditStatus;
 import com.goafanti.common.enums.DemandReleaseStatus;
 import com.goafanti.common.enums.NoticeReadStatus;
 import com.goafanti.common.enums.NoticeStatus;
@@ -154,7 +153,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		a.setReleaseStatus(AchievementReleaseStatus.UNRELEASE.getCode());
 
 		if (AchievementAuditStatus.SUBMIT.getCode().equals(a.getAuditStatus())) {
-			a.setAuditStatus(DemandAuditStatus.INAUDIT.getCode());
+			
 			createAuditorNotice(a);
 		} else {
 			a.setAuditStatus(AchievementAuditStatus.CREATE.getCode());
@@ -187,7 +186,6 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 	@Override
 	public int updateAchievement(Achievement a, String[] keywords, Integer switchSign) {
 		if (AchievementAuditStatus.SUBMIT.getCode().equals(a.getAuditStatus())) {
-			a.setAuditStatus(DemandAuditStatus.INAUDIT.getCode());
 			createAuditorNotice(a);
 		}
 		disposeAchievementKeyword(keywords, a, true);
@@ -855,7 +853,6 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		a.setReleaseStatus(AchievementReleaseStatus.UNRELEASE.getCode());
 
 		if (AchievementAuditStatus.SUBMIT.getCode().equals(a.getAuditStatus())) {
-			a.setAuditStatus(DemandAuditStatus.INAUDIT.getCode());
 			createAuditorNotice(a);
 		} else {
 			a.setAuditStatus(AchievementAuditStatus.INAUDIT.getCode());

+ 2 - 2
src/main/java/com/goafanti/admin/controller/AdminAuditApiController.java

@@ -118,11 +118,11 @@ public class AdminAuditApiController extends CertifyApiController {
 			return res;
 		}
 
-		if (!DemandAuditStatus.INAUDIT.getCode().equals(d.getAuditStatus())) {
+		/*if (!DemandAuditStatus.INAUDIT.getCode().equals(d.getAuditStatus())) {
 			res.getError().add(buildError("", "当前需求状态无法审核!"));
 			return res;
 		}
-
+*/
 		res.setData(demandService.updateAuditDemand(d, techBroderId, auditStatus));
 		return res;
 	}

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

@@ -328,7 +328,7 @@ public class AppUserController extends BaseApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"需求必须指定","需求"));
 			return res;
 		}
-		res.setData(demandService.selectDemandDetail( id));
+		res.setData(demandService.selectAppDemandDetail( id));
 		return res;
 	}
 	

+ 1 - 1
src/main/java/com/goafanti/app/controller/OpenAppUserController.java

@@ -72,7 +72,7 @@ public class OpenAppUserController extends BaseApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"需求必须指定","需求"));
 			return res;
 		}
-		res.setData(demandService.selectDemandDetail( id));
+		res.setData(demandService.selectAppDemandDetail( id));
 		return res;
 	}
 	

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

@@ -1,13 +1,12 @@
 package com.goafanti.common.dao;
 
-import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.ibatis.annotations.Param;
 
 import com.goafanti.common.model.Demand;
+import com.goafanti.demand.bo.DemandDetailBo;
 import com.goafanti.demand.bo.DemandListBo;
-import com.goafanti.demand.bo.DemandManageDetailBo;
 import com.goafanti.demand.bo.DemandRecommended;
 import com.goafanti.portal.bo.DemandPortalDetailBo;
 import com.goafanti.portal.bo.DemandPortalSimilarListBo;
@@ -26,11 +25,11 @@ public interface DemandMapper {
 
 	int updateByPrimaryKey(Demand record);
 
-	DemandManageDetailBo selectUserDemandDetail(String id);
+	DemandDetailBo selectUserDemandDetail(String id);
 
 	int batchDeleteByPrimaryKey(List<String> id);
 
-	DemandManageDetailBo selectOrgDemandDetail(String id);
+	DemandDetailBo selectOrgDemandDetail(String id);
 
 	int updateReleaseDate(String id);
 
@@ -48,12 +47,10 @@ public interface DemandMapper {
 			@Param("id") String id);
 
 	int updateEmployerId(String id);
-	
-	ArrayList<DemandListBo> selectDemandList (Integer boutique);
 
 	int countInterest(String demandId);
 	
-	Demand selectDemandDetail(String id);
+	DemandDetailBo selectDemandDetail(String id);
 
 	DemandListBo selectAppByPrimaryKey(String id);
 

+ 5 - 0
src/main/java/com/goafanti/common/dao/DemandPublishMapper.java

@@ -2,6 +2,7 @@ package com.goafanti.common.dao;
 
 import com.goafanti.common.model.DemandPublish;
 import com.goafanti.common.model.DemandPublishExample;
+
 import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
@@ -74,4 +75,8 @@ public interface DemandPublishMapper {
 	int updateByPrimaryKey(DemandPublish record);
 	
 	int checkExisting(DemandPublish a);
+	
+	List<DemandPublish> selectPublishPages(String demandId);
+
+	int batchDeleteByDemandId(String id);
 }

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

@@ -7,10 +7,10 @@ import org.apache.commons.lang3.StringUtils;
 
 public enum DemandAuditStatus {
 	CREATE(0, "草稿"),
-	SUBMIT(1, "提交审核"),
-	INAUDIT(2, "审核中"),
-	AUDITED(3,"审核通过"),
-	UNAUDITED(4,"审核未通过"),
+	INAUDIT(1, "提交审核"),
+	AUDITED(2,"审核通过"),
+	UNAUDITED(3,"审核通过"),
+	REVOKE(4,"撤销发布"),
 	OTHER(5, "其他");
 
 	private DemandAuditStatus(Integer code, String desc) {

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

@@ -551,6 +551,110 @@
   	where d.data_category = 0 and d.id = #{id,jdbcType=VARCHAR}
   </select>
   
+  <select id="findAppDemandListByPage" parameterType="String" resultType="com.goafanti.demand.bo.DemandListBo">
+  	select 
+	  d.id, d.serial_number as serialNumber, d.data_category as dataCategory, d.boutique,
+	  d.name, d.keyword, d.demand_type as demandType, d.industry_category_a as industryCategoryA, d.industry_category_b as industryCategoryB, d.industry_category_c as industryCategoryC,
+	  d.validity_period as validityPeriod, d.status, d.release_status as releaseStatus, 
+	  d.release_date as releaseDate, d.employer_id as employerId, d.audit_status as auditStatus,t.city as cityname,
+	  d.urgent_money as urgentMoney,d.urgent_days as  urgentDays,d.employer_address as employerAddress,d.problem_des as problemDes,ifnull(t.countInterest,0) as countInterest,g.name as industryCategory1,g2.name as industryCategory2
+	from  demand d 
+	left join  user_identity t on d.employer_id=t.uid
+	left join	field_glossory g on d.industry_category_a=g.id
+	left join	field_glossory g2 on d.industry_category_b=g2.id
+	left join (select count(0)  as countInterest ,demand_id from demand_interest 
+				group by demand_id) t on d.id=t.demand_id
+	where d.deleted_sign = 0 
+	and d.audit_status=3
+	<if test="employerId != null">
+	and d.employer_id = #{employerId, jdbcType=VARCHAR}
+	</if>
+	<if test="serialNumber != null">
+		and  d.serial_number = #{serialNumber,jdbcType=INTEGER}
+	</if>
+	<if test="auditStatus != null">
+		and  d.audit_status = #{auditStatus,jdbcType=INTEGER}
+	</if>
+	<if test="name != null">
+		and  d.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+	</if>
+	<if test="keyword != null">
+		and  d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
+	</if>
+	<if test="demandType != null">
+		and  d.demand_type = #{demandType,jdbcType=INTEGER}
+	</if>
+	<if test="industryCategoryA != null">
+		and  d.industry_category_a = #{industryCategoryA,jdbcType=INTEGER}
+	</if>
+	<if test="status != null">
+		and  d.status = #{status,jdbcType=VARCHAR}
+	</if>
+	<if test="releaseStatus != null">
+		and  d.release_status = #{releaseStatus,jdbcType=VARCHAR}
+	</if>
+	<if test="vStart != null">
+	   and d.validity_period <![CDATA[ >= ]]> #{vStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="vEnd != null">
+	   and d.validity_period <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="rStart != null">
+       and	d.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="rEnd != null">
+	   and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
+	</if>
+  	order by d.boutique desc
+  	<if test="page_sql!=null">
+		${page_sql}
+	</if>
+  </select>
+  
+  <select id="findAppDemandCount" parameterType="String" resultType="java.lang.Integer">
+  		select count(1)
+	from  demand d 
+	where d.deleted_sign = 0 
+	<if test="employerId != null">
+	and d.employer_id = #{employerId, jdbcType=VARCHAR}
+	</if>
+	<if test="serialNumber != null">
+		and  d.serial_number = #{serialNumber,jdbcType=INTEGER}
+	</if>
+	<if test="auditStatus != null">
+		and  d.audit_status = #{auditStatus,jdbcType=INTEGER}
+	</if>
+	<if test="industryCategoryA != null">
+		and  d.industry_category_a = #{industryCategoryA,jdbcType=INTEGER}
+	</if>
+	<if test="name != null">
+		and  d.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+	</if>
+	<if test="keyword != null">
+		and  d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
+	</if>
+	<if test="demandType != null">
+		and  d.demand_type = #{demandType,jdbcType=INTEGER}
+	</if>
+	<if test="status != null">
+		and  d.status = #{status,jdbcType=VARCHAR}
+	</if>
+	<if test="releaseStatus != null">
+		and  d.release_status = #{releaseStatus,jdbcType=VARCHAR}
+	</if>
+	<if test="vStart != null">
+	   and d.validity_period <![CDATA[ >= ]]> #{vStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="vEnd != null">
+	   and d.validity_period <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="rStart != null">
+       and	d.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="rEnd != null">
+	   and  d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
+	</if>
+  </select>
   
    <select id="selectOrgDemandDetail" parameterType="java.lang.String" resultType="com.goafanti.demand.bo.DemandManageDetailBo">
 	select 
@@ -784,47 +888,44 @@
   </update>
    
   <!-- 查询需求列表 -->
-	<select id="selectDemandList" 
-		resultType="com.goafanti.demand.bo.DemandListBo">
-		SELECT
-		d.id,
-		d.name,
-		d.keyword,
-		d.data_category as dataCategory,
-		d.fixed_budget as fixedbudget,
-		d.demand_type as demandType,
-		d.picture_url as pictureUrl,
-		d.industry_category_a AS industryCategoryA,
-		fg.name AS
-		industryCategoryAS,
-		fgg.name AS industryCategorBS,
-		d.budget_cost AS
-		budgetCost,
-		d.problem_des AS problemDes,
-		dg.name AS
-		province,
-		dgg.name AS
-		city,
-		d.employer_name as
-		employerName,
-		u.lvl as
-		level
-		FROM
-		demand d
-		LEFT JOIN `user` u on u.id = d.employer_id
-		LEFT JOIN
-		user_identity ui on ui.uid = d.employer_id
-		LEFT JOIN district_glossory
-		dg ON dg.id = ui.province
-		LEFT JOIN district_glossory dgg ON dgg.id =
-		ui.city
-		LEFT JOIN field_glossory fg on fg.id = d.industry_category_a
-		LEFT JOIN field_glossory fgg on fgg.id = d.industry_category_b
-		WHERE
-		<if test="_parameter!= null">
-			d.boutique = #{_parameter,jdbcType=INTEGER}
+	<select id="selectDemandListByPage" resultType="com.goafanti.demand.bo.DemandListBo">
+		select
+			id,
+			serial_number as serialNumber,
+			name,
+			demand_type as demandType,
+			audit_status as auditStatus,
+			create_time as createTime
+		from
+			demand
+		where
+			employer_id = #{employerId,jdbcType=VARCHAR}
+		<if test="startDate != null">
+			and create_time <![CDATA[ >= ]]> #{startDate,jdbcType=TIMESTAMP}
+		</if>
+		<if test="endDate != null">
+			and create_time <![CDATA[ <= ]]> #{endDate,jdbcType=TIMESTAMP}
+		</if>
+		<if test="page_sql!=null">
+			${page_sql}
 		</if>
-		limit 0,30
+	</select>
+	<select id="selectDemandListCount" resultType="java.lang.Integer">
+		select
+			count(0)
+		from
+			demand
+		where
+			employer_id = #{employerId,jdbcType=VARCHAR}
+			<if test="startDate != null">
+				and create_time <![CDATA[ >= ]]> #{startDate,jdbcType=TIMESTAMP}
+			</if>
+			<if test="endDate != null">
+				and create_time <![CDATA[ <= ]]> #{endDate,jdbcType=TIMESTAMP}
+			</if>
+			<if test="name != null">
+				and name like concat('%',#{name,jdbcType=VARCHAR},'%')
+			</if>
 	</select>
   
 	<select id="countInterest" resultType="Integer">
@@ -863,22 +964,32 @@
 	</if>
 	
   </select>
-  <select id="selectDemandDetail" resultMap="BaseResultMap" parameterType="java.lang.String" >
-     select 
-    d.id, d.serial_number AS serialNumber, d.data_category AS serialNumber,d.name, d.keyword, d.info_sources AS infoSources, d.industry_category_a AS industryCategoryA, 
-    d.industry_category_b AS industryCategoryB, d.industry_category_c AS industryCategoryC, d.demand_type AS demandType, d.problem_des AS problemDes, d.technical_requirements AS technicalRequirements, 
-    d.picture_url AS pictureUrl, d.text_file_url AS textFileUrl, d.video_url AS videoUrl, d.fixed_budget AS fixedBudget, d.fixed_cycle AS fixedCycle, d.people_number AS peopleNumber, 
-    d.fixed_scheme as fixedScheme, d.cost_escrow AS costEscrow, d.budget_cost AS budgetCost, d.validity_period AS validityPeriod, d.employer_id AS employerId, d.employer_name AS employerName, 
-    d.employer_address as employerAddress, d.employer_contacts as employerContacts, d.employer_contacts_mobile as employerContactsMobile, d.employer_contacts_mailbox as employerContactsMailbox, 
-    d.contacts, d.status,d.release_status as releaseStatus, d.release_date as releaseDate, d.create_time as createTime, d.principal_id as principalId, d.deleted_sign as deletedSign,j.easemob_name as easemobName,
-    d.audit_status as auditStatus, d.tech_broker_id as techBrokerId,d.boutique,d.urgent_money as urgentMoney,d.urgent_days as urgentDays
-    from demand d
-    left join jpush_easemob_account j on d.employer_id=j.uid
-   	where d.id = #{id,jdbcType=VARCHAR}
-  	</select>
-  	
-  	
-	
+  
+  <select id="selectDemandDetail" resultType="com.goafanti.demand.bo.DemandDetailBo" parameterType="java.lang.String" >
+	select
+		id,
+		name,
+		problem_des as problemDes,
+		industry_category_a as industryCategoryA,
+		industry_category_b as industryCategoryB,
+		industry_category_c as industryCategoryC,
+		demand_type as demandType,
+		research_type as researchType,
+		budget_cost as budgetCost,
+		crowd_cost as crowdCost,
+		is_hot as isHot,
+		is_urgent as isUrgent,
+		urgent_money as urgentMoney,
+		urgent_days as urgentDays,
+		status,
+		picture_url as pictureUrl,
+		audit_status as auditStatus,
+		audit_info as auditInfo
+	from
+		demand
+	where id = #{id,jdbcType=VARCHAR}
+  </select>
+ 
 	<select id="findAppNewsInterestByPage" parameterType="String" resultType="com.goafanti.demand.bo.ObjectInterestListBo">
   	select	n.id,n.title as name,n.create_time as createTime
 	from news_interest ni
@@ -1035,7 +1146,7 @@
  select name,picture_url as pictureUrl ,problem_des as problemDes ,id from demand d  where d.demand_type=4 and d.audit_status=2 order by  release_date  desc
   </select>
   
-     <select id="getProLearnStudyDemand" resultType="com.goafanti.demand.bo.DemandListBo">
+   <select id="getProLearnStudyDemand" resultType="com.goafanti.demand.bo.DemandListBo">
     select d.name as name,picture_url as pictureUrl ,problem_des as problemDes,employer_name as employerName,d.id,fg.name as industryCategory1,fgg.name as industryCategory2 from demand d  
     left join aft.field_glossory  fg  on fg.id=d.industry_category_a
     left join aft.field_glossory fgg  on fgg.id=d.industry_category_b
@@ -1049,4 +1160,29 @@
   select name,picture_url as pictureUrl ,problem_des as problemDes ,id,budget_cost as fundForPersonnel from demand d  where d.demand_type=5 and d.audit_status=2 order by  release_date  desc
   </select>
   
+  <select id="listMyDemand" resultType="com.goafanti.portal.bo.DemandSearchListBo">
+	select
+		id,
+		serial_number as serialNumber,
+		name,
+		demand_type as demandType,
+		audit_status as auditStatus,
+		create_time as createTime
+	from
+		demand
+	where
+		employer_id = #{uid,jdbcType=VARCHAR}
+	<if test="status != null">
+		and status = #{status,jdbcType=INTEGER}
+	</if>
+	<if test="name != null">
+		and name = #{name,jdbcType=VARCHAR}
+	</if>
+	<if test="startDate != null">
+		and create_time <![CDATA[ > ]]>  #{startDate,jdbcType=VARCHAR}
+	</if>
+	<if test="endDate != null">
+		and create_time <![CDATA[ < ]]>  #{endDate,jdbcType=VARCHAR}
+	</if>
+  </select>
 </mapper>

+ 8 - 0
src/main/java/com/goafanti/common/mapper/DemandPublishMapper.xml

@@ -437,4 +437,12 @@ where 1=1
 	 	and publish_client= #{publishClient,jdbcType=INTEGER}
 	 	and publish_page= #{publishPage,jdbcType=VARCHAR}
 	 </select>
+	 
+	 <select id="selectPublishPages" resultMap="BaseResultMap" parameterType="java.lang.String">
+	 	select id,publish_client,publish_page from demand_publish where demand_id = #{demandId,jdbcType=VARCHAR}
+	 </select>
+	 
+	 <delete id="batchDeleteByDemandId" parameterType="java.lang.String">
+	 	delete from demand_publish where demand_id = #{demandId,jdbcType=VARCHAR}
+	 </delete>
 </mapper>

+ 19 - 0
src/main/java/com/goafanti/demand/bo/DemandDetailBo.java

@@ -0,0 +1,19 @@
+package com.goafanti.demand.bo;
+
+import java.util.List;
+
+import com.goafanti.common.model.DemandPublish;
+
+public class DemandDetailBo extends InputDemand{
+	List< DemandPublish> publishPages;
+
+	public List<DemandPublish> getPublishPages() {
+		return publishPages;
+	}
+
+	public void setPublishPages(List<DemandPublish> publishPages) {
+		this.publishPages = publishPages;
+	}
+	
+	
+}

+ 0 - 234
src/main/java/com/goafanti/demand/bo/DemandManageDetailBo.java

@@ -1,234 +0,0 @@
-package com.goafanti.demand.bo;
-
-import java.math.BigDecimal;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.annotation.JsonFormat.Shape;
-
-public class DemandManageDetailBo extends DemandManageListBo {
-
-	private Integer		industryCategoryA;
-
-	private Integer		industryCategoryB;
-
-	private String		problemDes;
-
-	private String		technicalRequirements;
-
-	private String		pictureUrl;
-
-	private String		textFileUrl;
-
-	private String		videoUrl;
-
-	private BigDecimal	budgetCost;
-
-	private String		fixedCycle;
-
-	private Integer		peopleNumber;
-
-	private String		fixedScheme;
-
-	private BigDecimal	costEscrow;
-
-	private String		employerId;
-
-	private String		address;
-
-	private String		contactsName;
-
-	private String		mobile;
-
-	private String		mailbox;
-
-	private String		contacts;
-
-	private String		employerAddress;
-
-	private String		employerContactsMobile;
-
-	private String		employerContactsMailbox;
-
-	private String      coverImg;
-	
-	
-	
-
-	public String getEmployerAddress() {
-		return employerAddress;
-	}
-
-	public void setEmployerAddress(String employerAddress) {
-		this.employerAddress = employerAddress;
-	}
-
-	public String getEmployerContactsMobile() {
-		return employerContactsMobile;
-	}
-
-	public void setEmployerContactsMobile(String employerContactsMobile) {
-		this.employerContactsMobile = employerContactsMobile;
-	}
-
-	public String getEmployerContactsMailbox() {
-		return employerContactsMailbox;
-	}
-
-	public void setEmployerContactsMailbox(String employerContactsMailbox) {
-		this.employerContactsMailbox = employerContactsMailbox;
-	}
-
-	@JsonFormat(shape = Shape.STRING)
-	public String getContacts() {
-		return contacts;
-	}
-
-	public void setContacts(String contacts) {
-		this.contacts = contacts;
-	}
-
-	public Integer getIndustryCategoryA() {
-		return industryCategoryA;
-	}
-
-	public void setIndustryCategoryA(Integer industryCategoryA) {
-		this.industryCategoryA = industryCategoryA;
-	}
-
-	public Integer getIndustryCategoryB() {
-		return industryCategoryB;
-	}
-
-	public void setIndustryCategoryB(Integer industryCategoryB) {
-		this.industryCategoryB = industryCategoryB;
-	}
-
-	public String 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 getBudgetCost() {
-		return budgetCost;
-	}
-
-	public void setBudgetCost(BigDecimal budgetCost) {
-		this.budgetCost = budgetCost;
-	}
-
-	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 String getEmployerId() {
-		return employerId;
-	}
-
-	public void setEmployerId(String employerId) {
-		this.employerId = employerId;
-	}
-
-	public String getAddress() {
-		return address;
-	}
-
-	public void setAddress(String address) {
-		this.address = address;
-	}
-
-	public String getContactsName() {
-		return contactsName;
-	}
-
-	public void setContactsName(String contactsName) {
-		this.contactsName = contactsName;
-	}
-
-	public String getMobile() {
-		return mobile;
-	}
-
-	public void setMobile(String mobile) {
-		this.mobile = mobile;
-	}
-
-	public String getMailbox() {
-		return mailbox;
-	}
-
-	public void setMailbox(String mailbox) {
-		this.mailbox = mailbox;
-	}
-
-	public String getCoverImg() {
-		return coverImg;
-	}
-
-	public void setCoverImg(String coverImg) {
-		this.coverImg = coverImg;
-	}
-
-}

+ 0 - 114
src/main/java/com/goafanti/demand/bo/DemandManageListBo.java

@@ -1,114 +0,0 @@
-package com.goafanti.demand.bo;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.annotation.JsonFormat.Shape;
-
-public class DemandManageListBo extends DemandListBo {
-
-	/**
-	 * 信息来源(0-平台采集,1-客户发布)
-	 */
-	private Integer	infoSources;
-
-	private String	username;
-
-	private String	employerName;
-
-	private Integer	province;
-	/**
-	 * 是否在首页 0-否 1-是
-	 */
-	private Integer hot;
-	/**
-	 * 是否属于精品  0- 否 1-是
-	 */
-	private Integer boutique;
-	/**
-	 * 负责人(营销员)
-	 */
-	private String	principalId;
-
-	/**
-	 * 技术经纪人
-	 */
-	private String	techBrokerId;
-	
-	/**
-	 * 技术经纪人idd
-	 */
-	private String	techBrokerIdd;
-	
-	public String getTechBrokerIdd() {
-		return techBrokerIdd;
-	}
-
-	public void setTechBrokerIdd(String techBrokerIdd) {
-		this.techBrokerIdd = techBrokerIdd;
-	}
-
-	public String getTechBrokerId() {
-		return techBrokerId;
-	}
-
-	public void setTechBrokerId(String techBrokerId) {
-		this.techBrokerId = techBrokerId;
-	}
-
-	@JsonFormat(shape = Shape.STRING)
-	public Integer getInfoSources() {
-		return infoSources;
-	}
-
-	public void setInfoSources(Integer infoSources) {
-		this.infoSources = infoSources;
-	}
-
-	public String getUsername() {
-		return username;
-	}
-
-	public void setUsername(String username) {
-		this.username = username;
-	}
-
-	public String getEmployerName() {
-		return employerName;
-	}
-
-	public void setEmployerName(String employerName) {
-		this.employerName = employerName;
-	}
-
-	public Integer getProvince() {
-		return province;
-	}
-
-	public void setProvince(Integer province) {
-		this.province = province;
-	}
-
-	public String getPrincipalId() {
-		return principalId;
-	}
-
-	public void setPrincipalId(String principalId) {
-		this.principalId = principalId;
-	}
-	
-	@JsonFormat(shape = Shape.STRING)
-	public Integer getBoutique() {
-		return boutique;
-	}
-
-	public void setBoutique(Integer boutique) {
-		this.boutique = boutique;
-	}
-	@JsonFormat(shape = Shape.STRING)
-	public Integer getHot() {
-		return hot;
-	}
-
-	public void setHot(Integer hot) {
-		this.hot = hot;
-	}
-}

+ 12 - 0
src/main/java/com/goafanti/demand/bo/InputDemand.java

@@ -48,6 +48,10 @@ public class InputDemand {
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private BigDecimal	budgetCost;
 	
+	@Max(value = (long) 999999.99, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	private BigDecimal crowdCost;
+	
 	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private Integer isHot;
@@ -180,6 +184,14 @@ public class InputDemand {
 		this.budgetCost = budgetCost;
 	}
 
+	public BigDecimal getCrowdCost() {
+		return crowdCost;
+	}
+
+	public void setCrowdCost(BigDecimal crowdCost) {
+		this.crowdCost = crowdCost;
+	}
+
 	public Integer getIsHot() {
 		return isHot;
 	}

+ 0 - 10
src/main/java/com/goafanti/demand/controller/AdminDemandApiController.java

@@ -62,16 +62,6 @@ public class AdminDemandApiController extends CertifyApiController {
 	}
 
 	
-
-	/**
-	 * 成果需求匹配列表
-	 */
-	@RequestMapping(value = "/achievementDemand", method = RequestMethod.GET)
-	public Result achievementDemand(String id) {
-		Result res = new Result();
-		res.setData(demandService.selectAchievementDemandListByDemandId(id));
-		return res;
-	}
 	/**
 	 * 下载技术需求批量导入Excel模板
 	 * 

+ 53 - 21
src/main/java/com/goafanti/demand/controller/UserDemandApiController.java

@@ -46,15 +46,6 @@ public class UserDemandApiController extends CertifyApiController {
 	@Resource
 	private DemandOrderService	demandOrderService;
 
-	/**
-	 * 成果需求匹配列表
-	 */
-	@RequestMapping(value = "/achievementDemand", method = RequestMethod.GET)
-	public Result achievementDemand(String id) {
-		Result res = new Result();
-		res.setData(demandService.selectAchievementDemandListByDemandId(id));
-		return res;
-	}
 
 	/**
 	 * 下载技术需求批量导入Excel模板
@@ -84,9 +75,9 @@ public class UserDemandApiController extends CertifyApiController {
 	 * 用户需求列表
 	 */
 	@RequestMapping(value = "/list", method = RequestMethod.GET)
-	public Result list(String pageNo, String pageSize) {
+	public Result list(String name,String startDate,String endDate,Integer pageNo, Integer pageSize) {
 		Result res = new Result();
-		// res.setData(); TODO
+		res.setData(demandService.listMyDemand(name, startDate, endDate, pageNo, pageSize));
 		return res;
 	}
 
@@ -116,11 +107,24 @@ public class UserDemandApiController extends CertifyApiController {
 		PageConstants.putDemand(publishPages, webPages, appPages);
 		if(webPages.size()==0 && appPages.size() == 0){
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "页面参数错误"));
+			return res;
 		}
 		demandService.saveDemand(d, validityPeriodFormattedDate, keywords,webPages, appPages);
 		return res;
 	}
 
+	@RequestMapping(value = "/demandDetail", method = RequestMethod.GET)
+	public Result demandDetail(String id){
+		Result res = new Result();
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到需求ID", "需求ID"));
+			return res;
+		}
+		res.setData(demandService.selectDemandDetail(id));
+		return res;
+	}
+	
+	
 	/**
 	 * 组织用户详情
 	 */
@@ -155,8 +159,8 @@ public class UserDemandApiController extends CertifyApiController {
 	/**
 	 * 修改需求
 	 */
-	@RequestMapping(value = "/update", method = RequestMethod.POST)
-	public Result updateUser(@Valid InputDemand demand, BindingResult bindingResult,
+	@RequestMapping(value = "/updateDemand", method = RequestMethod.POST)
+	public Result updateDemand(@Valid InputDemand demand, BindingResult bindingResult,
 			@RequestParam(name = "keywords[]", required = false) String[] keywords,
 			@RequestParam(value = "publishPages[]", required = false)  String[] publishPages,
 			String validityPeriodFormattedDate) {
@@ -166,31 +170,59 @@ public class UserDemandApiController extends CertifyApiController {
 					DemandFields.getFieldDesc(bindingResult.getFieldError().getField())));
 			return res;
 		}
-
 		if (StringUtils.isBlank(demand.getId())) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到需求ID", "需求ID"));
 			return res;
 		}
-
 		if (!DemandAuditStatus.CREATE.getCode().equals(demand.getAuditStatus())
-				&& !DemandAuditStatus.SUBMIT.getCode().equals(demand.getAuditStatus())
-				&& !DemandAuditStatus.UNAUDITED.getCode().equals(demand.getAuditStatus())) {
+				&& !DemandAuditStatus.UNAUDITED.getCode().equals(demand.getAuditStatus())
+				&& !DemandAuditStatus.REVOKE.getCode().equals(demand.getAuditStatus())) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "当前状态无法提交审核!"));
 			return res;
 		}
-
+		//demand.setAuditStatus(DemandAuditStatus.INAUDIT.getCode()); 两步操作,先保存后提交
 		res = disposeDemand(res, demand, keywords,publishPages);
 		if (!res.getError().isEmpty()) {
 			return res;
 		}
-
+		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, "页面参数错误"));
+			return res;
+		}
 		Demand d = new Demand();
 		BeanUtils.copyProperties(demand, d);
 		d.setEmployerId(TokenManager.getUserId());
-		res.setData(demandService.updateUserDemand(d, validityPeriodFormattedDate, keywords, null));
+		res.setData(demandService.updateUserDemand(d, validityPeriodFormattedDate, keywords, webPages,appPages));
 		return res;
 	}
-
+	
+	@RequestMapping(value = "/publishDemand", method = RequestMethod.POST)
+	public Result publishDemand(String id,Integer auditStatus){
+		Result res = new Result();
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到需求ID", "需求ID"));
+			return res;
+		}
+		if (null == auditStatus) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "需求状态错误", "需求状态"));
+			return res;
+		}
+		if (DemandAuditStatus.CREATE.getCode() != auditStatus
+				&& DemandAuditStatus.UNAUDITED.getCode() != auditStatus
+				&& DemandAuditStatus.REVOKE.getCode() != auditStatus) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "当前状态无法提交审核!"));
+			return res;
+		}
+		Demand demand = new Demand();
+		demand.setId(id);
+		demand.setAuditStatus(DemandAuditStatus.INAUDIT.getCode());
+		demandService.updateByPrimaryKeySelective(demand);
+		return res;
+	}
+	
 	/**
 	 * 需求撤消发布(下架)
 	 */

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

@@ -2,30 +2,25 @@ package com.goafanti.demand.service;
 
 import java.util.List;
 
-import com.goafanti.achievement.bo.AchievementDemandListBo;
 import com.goafanti.common.model.Demand;
 import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.demand.bo.DemandDetailBo;
 import com.goafanti.demand.bo.DemandImportBo;
 import com.goafanti.demand.bo.DemandListBo;
-import com.goafanti.demand.bo.DemandManageDetailBo;
-import com.goafanti.demand.bo.DemandPartnerListBo;
 import com.goafanti.demand.bo.ObjectInterestListBo;
-import com.goafanti.portal.bo.DemandPortalDetailBo;
-import com.goafanti.portal.bo.DemandPortalSimilarListBo;
 import com.goafanti.portal.bo.DemandSearchDetailBo;
 import com.goafanti.portal.bo.DemandSearchListBo;
 
 public interface DemandService {
+	Pagination<DemandSearchListBo> listMyDemand(String name,String startDate,String endDate,Integer pageNo, Integer pageSize);
+	
+	int updateUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords,List<String> webPages,List<String> appPages);
 
-	void saveUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords);
-
-	int updateUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords, Integer switchSign);
-
-	DemandManageDetailBo selectUserDemandDetail(String id);
+	DemandDetailBo selectUserDemandDetail(String id);
 
 	int deleteByPrimaryKey(List<String> asList);
 
-	DemandManageDetailBo selectOrgDemandDetail(String id);
+	DemandDetailBo selectOrgDemandDetail(String id);
 
 	Demand selectByPrimaryKey(String id);
 
@@ -35,25 +30,15 @@ public interface DemandService {
 
 	void saveDemand(Demand d, String validityPeriodFormattedDate, String keywords[],List<String> webPages, List<String> appPages);
 
-	List<AchievementDemandListBo> selectAchievementDemandListByDemandId(String id);
-
 	void insertImport(List<DemandImportBo> data);
 
 	DemandSearchDetailBo selectDemandSearchDetail(String uid, String id);
 
 	int updateMatchAchievement(Demand d);
 
-	Pagination<DemandPartnerListBo> lisePartnerDemand(String employerId, Integer pNo, Integer pSize);
-
-	DemandPortalDetailBo findUserPortalDemandDetail(String id);
-
-	DemandPortalDetailBo findOrgPortalDemandDetail(String id);
-
-	List<DemandPortalSimilarListBo> findByIndustryCategoryA(Integer industryCategoryA, String id);
-
 	int updateByPrimaryKeySelective(Demand d);
 	
-	DemandListBo selectDemandDetail( String id);
+	DemandListBo selectAppDemandDetail( String id);
 	
 	Pagination<DemandSearchListBo> listAppDemand(Integer auditStatus, Integer serialNumber, String name, String keyword, Integer demandType,Integer industryCategoryA,
 			String validityPeriodStartDate, String validityPeriodEndDate, Integer status, Integer releaseStatus,
@@ -84,4 +69,6 @@ public interface DemandService {
 	
 	List<DemandListBo> getPersonnelDemand();
 	
+	DemandDetailBo selectDemandDetail(String id);
+	
 }

+ 72 - 138
src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java

@@ -15,13 +15,10 @@ import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import com.goafanti.achievement.bo.AchievementDemandListBo;
-
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.PageConstants;
 import com.goafanti.common.dao.AchievementDemandCountMapper;
 import com.goafanti.common.dao.AchievementDemandMapper;
-
 import com.goafanti.common.dao.AchievementKeywordMapper;
 import com.goafanti.common.dao.AchievementMapper;
 import com.goafanti.common.dao.BranchInformationMapper;
@@ -32,7 +29,6 @@ import com.goafanti.common.dao.DemandMapper;
 import com.goafanti.common.dao.DemandPublishMapper;
 import com.goafanti.common.dao.FieldGlossoryMapper;
 import com.goafanti.common.dao.NewsInterestMapper;
-
 import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.OrganizationIdentityMapper;
 import com.goafanti.common.dao.ProjectInterestMapper;
@@ -45,7 +41,6 @@ import com.goafanti.common.enums.DemandAuditStatus;
 import com.goafanti.common.enums.DemandInfoSourceStatus;
 import com.goafanti.common.enums.DemandReleaseStatus;
 import com.goafanti.common.enums.DemandStatus;
-import com.goafanti.common.enums.DemandSwitchSign;
 import com.goafanti.common.enums.InterestType;
 import com.goafanti.common.enums.NoticeReadStatus;
 import com.goafanti.common.enums.NoticeStatus;
@@ -63,17 +58,11 @@ import com.goafanti.common.utils.DateUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.demand.bo.DemandDetailBo;
 import com.goafanti.demand.bo.DemandImportBo;
-
 import com.goafanti.demand.bo.DemandListBo;
-import com.goafanti.demand.bo.DemandManageDetailBo;
-import com.goafanti.demand.bo.DemandPartnerListBo;
-import com.goafanti.demand.bo.DemandPublishBo;
 import com.goafanti.demand.bo.ObjectInterestListBo;
 import com.goafanti.demand.service.DemandService;
-
-import com.goafanti.portal.bo.DemandPortalDetailBo;
-import com.goafanti.portal.bo.DemandPortalSimilarListBo;
 import com.goafanti.portal.bo.DemandSearchDetailBo;
 import com.goafanti.portal.bo.DemandSearchListBo;
 
@@ -118,42 +107,11 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	BranchInformationMapper		branchInformationMapper;
 	@Autowired
 	DemandPublishMapper demandPublishMapper;
-	@Override
-	public void saveUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords) {
-		Date validityPeriod = null;
-		if (!StringUtils.isBlank(validityPeriodFormattedDate)) {
-			try {
-				validityPeriod = DateUtils.parseDate(validityPeriodFormattedDate, AFTConstants.YYYYMMDD);
-			} catch (ParseException e) {
-			}
-		}
-
-		d.setValidityPeriod(validityPeriod);
-		d.setId(UUID.randomUUID().toString());
-		d.setTechBrokerId(TokenManager.getAdminId());
-
-		d.setDeletedSign(DeleteStatus.UNDELETE.getCode());
 
-		Calendar now = Calendar.getInstance();
-		now.set(Calendar.MILLISECOND, 0);
-		d.setStatus(DemandStatus.UNRESOLVED.getCode());
-		d.setReleaseStatus(DemandReleaseStatus.UNRELEASE.getCode());
-
-		d.setPrincipalId(TokenManager.getAdminId());
-		if (DemandAuditStatus.SUBMIT.getCode().equals(d.getAuditStatus())) {
-			d.setAuditStatus(DemandAuditStatus.INAUDIT.getCode());
-			createAuditorNotice(d);
-		} else {
-			d.setAuditStatus(DemandAuditStatus.CREATE.getCode());
-		}
-
-		d.setCreateTime(now.getTime());
-		demandMapper.insert(d);
-		disposeDemandKeyword(keywords, d, false);
-	}
+	private final int source_platform = 0;
 
 	@Override
-	public int updateUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords, Integer switchSign) {
+	public int updateUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords,List<String> webPages,List<String> appPages) {
 		Date validityPeriod = null;
 		if (!StringUtils.isBlank(validityPeriodFormattedDate)) {
 			try {
@@ -162,21 +120,14 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 			}
 		}
 		d.setValidityPeriod(validityPeriod);
-
-		if (DemandAuditStatus.SUBMIT.getCode().equals(d.getAuditStatus())) {
-			d.setAuditStatus(DemandAuditStatus.INAUDIT.getCode());
-			createAuditorNotice(d);
-		}
 		disposeDemandKeyword(keywords, d, true);
+		disposeDemandPublish(d,webPages,appPages,true);
 		demandMapper.updateByPrimaryKeySelective(d);
-		if (null != switchSign && DemandSwitchSign.CLOSE.getCode().equals(switchSign)) {
-			demandMapper.updateEmployerId(d.getId());
-		}
 		return 1;
 	}
 
 	@Override
-	public DemandManageDetailBo selectUserDemandDetail(String id) {
+	public DemandDetailBo selectUserDemandDetail(String id) {
 		return demandMapper.selectUserDemandDetail(id);
 	}
 
@@ -202,7 +153,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	}
 
 	@Override
-	public DemandManageDetailBo selectOrgDemandDetail(String id) {
+	public DemandDetailBo selectOrgDemandDetail(String id) {
 		
 		return demandMapper.selectOrgDemandDetail(id);
 	}
@@ -303,8 +254,8 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		now.set(Calendar.MILLISECOND, 0);
 		d.setStatus(DemandStatus.UNRESOLVED.getCode());
 		d.setReleaseStatus(DemandReleaseStatus.UNRELEASE.getCode());
-		if (DemandAuditStatus.SUBMIT.getCode().equals(d.getAuditStatus())) {
-			d.setAuditStatus(DemandAuditStatus.INAUDIT.getCode());
+		d.setInfoSources(source_platform);
+		if (DemandAuditStatus.INAUDIT.getCode().equals(d.getAuditStatus())) {
 			createAuditorNotice(d);
 		} else {
 			d.setAuditStatus(DemandAuditStatus.CREATE.getCode());
@@ -312,50 +263,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		d.setCreateTime(now.getTime());
 		demandMapper.insert(d);
 		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
-	public List<AchievementDemandListBo> selectAchievementDemandListByDemandId(String id) {
-		return achievementDemandMapper.selectAchievementDemandListByDemandId(id);
+		disposeDemandPublish(d,webPages,appPages,false);
 	}
 
 	@Override
@@ -574,16 +482,58 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		} else {
 			n.setAid(aid);
 			if (UserType.PERSONAL.getCode().equals(d.getDataCategory())) {
-				n.setContent(NoticeStatus.PERSONALDEMAND.getDesc() + " " + DemandAuditStatus.SUBMIT.getDesc());
+				n.setContent(NoticeStatus.PERSONALDEMAND.getDesc() + " " + DemandAuditStatus.INAUDIT.getDesc());
 				n.setNoticeType(NoticeStatus.PERSONALDEMAND.getCode());
 			} else if (UserType.ORGANIZATION.getCode().equals(d.getDataCategory())) {
-				n.setContent(NoticeStatus.ORGANIZATIONDEMAND.getDesc() + " " + DemandAuditStatus.SUBMIT.getDesc());
+				n.setContent(NoticeStatus.ORGANIZATIONDEMAND.getDesc() + " " + DemandAuditStatus.INAUDIT.getDesc());
 				n.setNoticeType(NoticeStatus.ORGANIZATIONDEMAND.getCode());
 			}
 		}
 		return n;
 	}
 
+	private void disposeDemandPublish(Demand d,List<String> webPages,List<String> appPages,boolean delete){
+		if(delete){
+			if(null != webPages && webPages.size()>0){
+				demandPublishMapper.batchDeleteByDemandId(d.getId());
+			}
+		}
+		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);
+			}
+		}
+	}
+	
 	private void disposeDemandKeyword(String[] keywords, Demand d, boolean delete) {
 		if (null != keywords && keywords.length > 0) {
 			if (delete) {
@@ -624,47 +574,13 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		return 0;
 	}
 
-	@SuppressWarnings("unchecked")
-	@Override
-	public Pagination<DemandPartnerListBo> lisePartnerDemand(String employerId, Integer pNo, Integer pSize) {
-		Map<String, Object> params = new HashMap<>();
-
-		params.put("employerId", employerId);
-
-		if (pNo == null || pNo < 0) {
-			pNo = 1;
-		}
-
-		if (pSize == null || pSize < 0 || pSize > 10) {
-			pSize = 10;
-		}
-
-		return (Pagination<DemandPartnerListBo>) findPage("findPartnerDemandListByPage", "findPartnerDemandCount",
-				params, pNo, pSize);
-	}
-
-	@Override
-	public DemandPortalDetailBo findUserPortalDemandDetail(String id) {
-		return demandMapper.findUserPortalDemandDetail(id, TokenManager.getUserId());
-	}
-
-	@Override
-	public DemandPortalDetailBo findOrgPortalDemandDetail(String id) {
-		return demandMapper.findOrgPortalDemandDetail(id, TokenManager.getUserId());
-	}
-
-	@Override
-	public List<DemandPortalSimilarListBo> findByIndustryCategoryA(Integer industryCategoryA, String id) {
-		return demandMapper.findByIndustryCategoryA(industryCategoryA, id);
-	}
-
 	@Override
 	public int updateByPrimaryKeySelective(Demand d) {
 		return demandMapper.updateByPrimaryKeySelective(d);
 	}
 	
 	@Override
-	public DemandListBo selectDemandDetail(String id ) {
+	public DemandListBo selectAppDemandDetail(String id ) {
 		DemandListBo d=demandMapper.selectAppByPrimaryKey(id);
 		
 		if (null!=d.getIndustryCategoryA()) {
@@ -908,4 +824,22 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		Pagination<DemandSearchListBo> p=(Pagination<DemandSearchListBo>) findPage("findAppDemandListByPage", "findAppDemandCount", params, pNo, pSize);
 		return p;
 	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<DemandSearchListBo> listMyDemand(String name, String startDate, String endDate,
+			Integer pageNo, Integer pageSize) {
+		Map<String,Object> params = new HashMap<String,Object>();
+		if(StringUtils.isNotBlank(name)) params.put("name", name);
+		if(StringUtils.isNotBlank(startDate)) params.put("startDate", startDate);
+		if(StringUtils.isNotBlank(endDate)) params.put("endDate", endDate);
+		return (Pagination<DemandSearchListBo>) findPage("selectDemandListByPage", "selectDemandListCount", params, pageNo, pageSize);
+	}
+
+	@Override
+	public DemandDetailBo selectDemandDetail(String id) {
+		DemandDetailBo bo = demandMapper.selectDemandDetail(id);
+		bo.setPublishPages(demandPublishMapper.selectPublishPages(id));
+		return bo;
+	}
 }