Browse Source

服务轮播图地址更换、显示停用项目BUG修复

anderx 8 years ago
parent
commit
ca558513c2

+ 6 - 0
src/main/java/com/goafanti/admin/controller/AdminDemandApiController.java

@@ -244,6 +244,7 @@ public class AdminDemandApiController extends CertifyApiController {
 	public Result userApply(@Valid InputDemand demand, BindingResult bindingResult,
 			@RequestParam(name = "keywords[]", required = false) String[] keywords,
 			String validityPeriodFormattedDate,String coverImg,Integer hot) {
+		
 		Result res = new Result();
 		if (bindingResult.hasErrors()) {
 			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
@@ -262,6 +263,9 @@ public class AdminDemandApiController extends CertifyApiController {
 		}
 		Demand d = new Demand();
 		BeanUtils.copyProperties(demand, d);
+		d.setUrgentDays(demand.getUrgentDays());
+		d.setUrgentMoney(demand.getUrgentMoney());
+		
 		demandService.saveUserDemand(d, validityPeriodFormattedDate, keywords);
 		if (null != hot && hot == 1) { // 属于营销活动
 			int marketHisCount = marketingManagementService.getMarketingCount(MarketingPage.mainDemand.getPageUrl(),
@@ -421,6 +425,8 @@ public class AdminDemandApiController extends CertifyApiController {
 
 		Demand d = new Demand();
 		BeanUtils.copyProperties(demand, d);
+		d.setUrgentDays(demand.getUrgentDays());
+		d.setUrgentMoney(demand.getUrgentMoney());
 		res.setData(demandService.updateUserDemand(d, validityPeriodFormattedDate, keywords, switchSign));
 		// 更新营销活动
 		MarketingManagement mm = marketingManagementService.selectMarket(MarketingPage.mainDemand.getPageUrl(),

+ 3 - 3
src/main/java/com/goafanti/app/bo/ServiceImages.java

@@ -4,11 +4,11 @@ import java.util.ArrayList;
 import java.util.List;
 
 public class ServiceImages {
-	public String imager1="/tmp/1.png";
+	public String imager1="/tmp/1228-1.png";
 	
-	public String imager2="/tmp/2.png";
+	public String imager2="/tmp/1228-2.png";
 	
-	public String imager3="/tmp/3.png";
+	public String imager3="/tmp/1228-3.png";
 	
 	private List<String> imagers=new ArrayList<>();
 	

+ 4 - 0
src/main/java/com/goafanti/common/mapper/BusinessProjectMapper.xml

@@ -684,6 +684,7 @@
   select id,bname as name,min_logo as minLogoUrl,introduce
    from business_project
 	where delete_sign=0 
+	and status=0
 	<if test="id != null"> 
 	and cid=#{id,jdbcType=VARCHAR}
   	</if>
@@ -696,6 +697,7 @@
   			count(0)
   		from business_project
   		where delete_sign=0 
+  		and status=0
   		<if test="id != null"> 
 	and cid=#{id,jdbcType=VARCHAR}
   	</if>
@@ -706,6 +708,7 @@
  		select id,bname as name,min_logo as minLogoUrl,introduce
   		from business_project 
   		where delete_sign=0 
+  		and status=0
   		<if test="page_sql!=null">
 			${page_sql}
 		</if>
@@ -715,6 +718,7 @@
   			count(0)
   		from business_project 
   		where delete_sign=0 
+  		and status=0
   </select>
   
   <select id="selectAppProjectDetail" resultType="com.goafanti.app.bo.ProjectDetailBo">

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

@@ -88,7 +88,7 @@
       employer_address, employer_contacts, employer_contacts_mobile, 
       employer_contacts_mailbox, contacts, status, 
       release_status, release_date, create_time, 
-      principal_id, deleted_sign, audit_status, tech_broker_id,boutique,remark)
+      principal_id, deleted_sign, audit_status, tech_broker_id,boutique,remark,urgent_days,urgent_money)
     values (#{id,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, #{dataCategory,jdbcType=INTEGER}, 
       #{name,jdbcType=VARCHAR}, #{keyword,jdbcType=VARCHAR}, #{infoSources,jdbcType=INTEGER}, 
       #{industryCategoryA,jdbcType=INTEGER}, #{industryCategoryB,jdbcType=INTEGER}, #{industryCategoryC,jdbcType=INTEGER}, 
@@ -101,7 +101,7 @@
       #{employerContactsMailbox,jdbcType=VARCHAR}, #{contacts,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, 
       #{releaseStatus,jdbcType=INTEGER}, #{releaseDate,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, 
       #{principalId,jdbcType=VARCHAR}, #{deletedSign,jdbcType=INTEGER}, #{auditStatus,jdbcType=INTEGER},
-      #{techBrokerId,jdbcType=VARCHAR},#{boutique,jdbcType=INTEGER},#{remark,jdbcType=VARCHAR})
+      #{techBrokerId,jdbcType=VARCHAR},#{boutique,jdbcType=INTEGER},#{remark,jdbcType=VARCHAR},#{urgentDays,jdbcType=VARCHAR},#{urgentMoney,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.Demand" >
     insert into demand
@@ -461,6 +461,12 @@
       <if test="remark != null" >
         remark = #{remark,jdbcType=VARCHAR},
       </if>
+      <if test="urgentDays != null" >
+        urgent_days = #{urgentDays,jdbcType=VARCHAR},
+      </if>
+      <if test="urgentMoney != null" >
+        urgent_money = #{urgentMoney,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -511,7 +517,7 @@
 	  d.id, d.serial_number as serialNumber, d.data_category as dataCategory, 
 	  d.name, d.keyword, d.info_sources as infoSources, 
 	  ui.username, d.demand_type as demandType, d.validity_period as validityPeriod, 
-	  d.employer_name as employerName, ui.province, d.status, 
+	  d.employer_name as employerName, ui.province, d.status, d.urgent_days as urgentDays,d.urgent_money as urgentMoney,
 	  d.release_status as releaseStatus, d.release_date as releaseDate, a.name as techBrokerId,d.create_time as createTime,
 	  d.employer_id as employerId, d.audit_status as auditStatus,d.boutique
 	 <if test="hot != null and hot == 1"><!-- 在首页 -->
@@ -699,7 +705,7 @@
 	  d.id, d.serial_number as serialNumber, d.data_category as dataCategory, 
 	  d.name, d.keyword, d.info_sources as infoSources, 
 	  oi.unit_name as username, d.demand_type as demandType, d.validity_period as validityPeriod, 
-	  d.employer_name as employerName, oi.licence_province as province, d.status, 
+	  d.employer_name as employerName, oi.licence_province as province, d.status, d.urgent_days as urgentDays,d.urgent_money as urgentMoney,
 	  d.release_status as releaseStatus, d.release_date as releaseDate, a.name as techBrokerId,d.create_time as createTime,
 	  d.employer_id as employerId, d.audit_status as auditStatus,
 	  d.tech_broker_id as techBrokerId,d.boutique
@@ -905,11 +911,10 @@
   		u.email as mailbox,  u.mobile as mobile, d.audit_status as auditStatus,
   		d.employer_address as employerAddress, d.employer_contacts_mobile as employerContactsMobile,
   		d.employer_contacts_mailbox as employerContactsMailbox, d.employer_name as employerName,
-  		d.tech_broker_id as techBrokerId,  u.mobile as contactsName,
+  		d.tech_broker_id as techBrokerId,  u.mobile as contactsName,d.urgent_days as urgentDays,d.urgent_money as urgentMoney,
   		d.boutique,ifnull(mm.effective,0) as hot,mm.cover_img as coverImg,d.remark
   	from demand d 
   	left join user_identity ui on ui.uid = d.employer_id
-  	<!-- left join user_info info on info.uid = d.employer_id -->
   	left join user u on u.id = d.employer_id
   	left join marketing_management mm on d.id = mm.product_id
   	where d.data_category = 0 and d.id = #{id,jdbcType=VARCHAR}
@@ -928,7 +933,7 @@
   		d.budget_cost as budgetCost, d.fixed_cycle as fixedCycle, d.people_number as peopleNumber,
   		d.fixed_scheme as fixedScheme, d.cost_escrow as costEscrow, d.employer_id as employerId,
   		oi.postal_address as address, u.email as mailbox,  d.contacts, d.audit_status as auditStatus,
-  		d.tech_broker_id as techBrokerId,d.remark,
+  		d.tech_broker_id as techBrokerId,d.remark,d.urgent_days as urgentDays,d.urgent_money as urgentMoney, 
   		d.employer_address as employerAddress, d.employer_contacts_mobile as employerContactsMobile,
   		d.employer_contacts_mailbox as employerContactsMailbox, d.employer_name as employerName,
   		d.boutique,ifnull(mm.effective,0) as hot,mm.cover_img as coverImg
@@ -1047,7 +1052,7 @@
     	status, release_status, create_time, 
     	keyword, data_category, name,
     	demand_type, problem_des, employer_name,
-    	employer_contacts, employer_contacts_mobile, employer_contacts_mailbox, info_sources,tech_broker_id,remark)
+    	employer_contacts, employer_contacts_mobile, employer_contacts_mailbox, info_sources,tech_broker_id,remark,urgent_days ,urgent_money)
     values 
     <foreach item="item" index="index" collection="list" separator=",">
       (
@@ -1056,7 +1061,7 @@
       	#{item.keyword,jdbcType=VARCHAR}, #{item.dataCategory,jdbcType=INTEGER}, #{item.name,jdbcType=VARCHAR},
       	#{item.demandType,jdbcType=INTEGER}, #{item.problemDes,jdbcType=VARCHAR}, #{item.employerName,jdbcType=VARCHAR},
       	#{item.employerContacts,jdbcType=VARCHAR}, #{item.employerContactsMobile,jdbcType=VARCHAR}, #{item.employerContactsMailbox,jdbcType=VARCHAR},
-      	#{item.infoSources,jdbcType=INTEGER},#{item.techBrokerId,jdbcType=VARCHAR},#{item.remark,jdbcType=VARCHAR}
+      	#{item.infoSources,jdbcType=INTEGER},#{item.techBrokerId,jdbcType=VARCHAR},#{item.remark,jdbcType=VARCHAR},,#{item.urgentDays,jdbcType=VARCHAR},#{item.urgentMoney,jdbcType=VARCHAR}
       )
     </foreach>
   </insert>

+ 7 - 0
src/main/java/com/goafanti/common/model/Demand.java

@@ -595,6 +595,9 @@ public class Demand {
 	public void setUrgentDays(Integer urgentDays) {
 		this.urgentDays = urgentDays;
 	}
+	public void setUrgentDays(String  urgentDays) {
+		this.urgentDays = Integer.valueOf(urgentDays);
+	}
 
 	public Integer getUrgentMoney() {
 		return urgentMoney;
@@ -602,6 +605,10 @@ public class Demand {
 
 	public void setUrgentMoney(Integer urgentMoney) {
 		this.urgentMoney = urgentMoney;
+	} 
+	
+	public void setUrgentMoney(String urgentMoney) {
+		this.urgentMoney =  Integer.valueOf(urgentMoney);
 	}
 
 	

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

@@ -35,8 +35,6 @@ public class DemandManageListBo extends DemandListBo {
 	 */
 	private String	techBrokerId;
 	
-	
-
 	public String getTechBrokerId() {
 		return techBrokerId;
 	}

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

@@ -136,6 +136,12 @@ public class InputDemand {
 	@Size(min = 0, max = 500, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String remark;
 	
+	@Size(min = 0, max = 11, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String urgentDays;
+	
+	@Size(min = 0, max = 16, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String urgentMoney;
+	
 	public String getRemark() {
 		return remark;
 	}
@@ -431,4 +437,20 @@ public class InputDemand {
 	public void setBoutique(Integer boutique) {
 		this.boutique = boutique;
 	}
+
+	public String getUrgentDays() {
+		return urgentDays;
+	}
+
+	public void setUrgentDays(String urgentDays) {
+		this.urgentDays = urgentDays;
+	}
+
+	public String getUrgentMoney() {
+		return urgentMoney;
+	}
+
+	public void setUrgentMoney(String urgentMoney) {
+		this.urgentMoney = urgentMoney;
+	}
 }