Browse Source

APP服务等接口字段补全

anderx 8 years ago
parent
commit
28d62c2d43

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

@@ -137,6 +137,9 @@ public class AchievementListBo {
 	
 	private Date createTime;
 	
+	
+	private String buyIntention;
+	
 	public String getOrgId() {
 		return orgId;
 	}
@@ -415,4 +418,12 @@ public class AchievementListBo {
 		}
 
 	}
+
+	public String getBuyIntention() {
+		return buyIntention;
+	}
+
+	public void setBuyIntention(String buyIntention) {
+		this.buyIntention = buyIntention;
+	}
 }

+ 9 - 0
src/main/java/com/goafanti/achievement/bo/AchievementPartnerListBo.java

@@ -95,6 +95,7 @@ public class AchievementPartnerListBo {
 	
 	private String countInterest;
 	
+	private String buyIntention;
 	
 	public Integer getFieldA() {
 		return fieldA;
@@ -258,6 +259,14 @@ public class AchievementPartnerListBo {
 	public void setBoutique(Integer boutique) {
 		this.boutique = boutique;
 	}
+
+	public String getBuyIntention() {
+		return buyIntention;
+	}
+
+	public void setBuyIntention(String buyIntention) {
+		this.buyIntention = buyIntention;
+	}
 	
 	
 	

+ 19 - 0
src/main/java/com/goafanti/achievement/bo/AchievementUserOwnerDetailBo.java

@@ -26,6 +26,25 @@ public class AchievementUserOwnerDetailBo extends AchievementOrgOwnerDetailBo {
 	private String[] technicalPictureUrls;
 	
 	private String easemobName;
+	private String orderCount;
+	private String orderIntentionCount;      	
+	public String getOrderIntentionCount() {
+		return orderIntentionCount;
+	}
+
+	public void setOrderIntentionCount(String orderIntentionCount) {
+		this.orderIntentionCount = orderIntentionCount;
+	}
+
+	public String getOrderCount() {
+		return orderCount;
+	}
+
+	public void setOrderCount(String orderCount) {
+		this.orderCount = orderCount;
+	}
+
+	
 	
 	public String getEasemobName() {
 		return easemobName;

+ 2 - 3
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -401,7 +401,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 
 	@Override
 	public AchievementUserOwnerDetailBo selectUserOwnerDetail(String id) {
-		System.out.println("``````````````"+id);
+		
 		AchievementUserOwnerDetailBo a=achievementMapper.selectUserOwnerDetail(id);
 		int i=achievementMapper.countInterest(a.getId());
 		a.setCountInterest(String.valueOf(i));
@@ -748,8 +748,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		if (StringUtils.isNotBlank(TokenManager.getUserId())) {
 			params.put("ownerId", TokenManager.getUserId());
 		}
-		params.put("ownerId", "46433140-0a90-471e-a32f-6bc89c562e3d");
-		
+		//params.put("ownerId", "46433140-0a90-471e-a32f-6bc89c562e3d");
 		return (Pagination<AchievementPartnerListBo>) findPage("findMyAchievementListByPage", "findMyAchievementCount",
 				params,pNo, pSize);
 	}

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

@@ -28,7 +28,7 @@ import com.goafanti.user.service.UserIdentityService;
 import com.goafanti.user.service.UserInterestService;
 
 @RestController
-@RequestMapping(path = "/api/open/achievementDemand", method = RequestMethod.GET)
+@RequestMapping(path = "/open/api/open/achievementDemand", method = RequestMethod.GET)
 public class AppAchievementDemandController extends BaseApiController {
 	@Resource
 	private BannersService		bannersService;

+ 13 - 4
src/main/java/com/goafanti/common/mapper/AchievementMapper.xml

@@ -1154,7 +1154,7 @@
 		    a.patent_case as patentCase, a.awards, a.team_des as teamDes,  a.international_flag as internationalFlag,
 		    a.parameter, a.tech_plan_url as techPlanUrl, a.business_plan_url as businessPlanUrl, 
 		    a.contacts, a.manager_id as managerId, a.salesman_id as salesmanId, f.name as field1,f2.name as field2,
-		    a.create_time as createTime, a.release_status as releaseStatus, 
+		    a.create_time as createTime, a.release_status as releaseStatus, ifnull(t.x,0) as orderIntentionCount,ifnull(t2.x,0) as orderCount,
 		    a.release_date as releaseDate, a.audit_status as auditStatus, a.tech_broker_id as techBrokerId,
 		    ui.username as iOwnerName, ui.province, ui.city, ui.area, u.email as iOwnerEmail,j.easemob_name as easemobName,
 		    ui.id_number as iOwnerIdNumber, u.mobile as iOwnerMobile,a.boutique,ifnull(mm.effective,0) as hot,mm.cover_img as coverImg
@@ -1164,6 +1164,12 @@
     left join field_glossory f2 on a.field_b=f2.id
     left join user_identity ui on a.owner_id = ui.uid
     left join user u on u.id = a.owner_id
+     left join (select count(0) as x,commodity_id from t_order
+				where order_status != 4
+				group by  commodity_id ) t on a.id=t.commodity_id
+    left join (select count(0) as x,commodity_id from t_order
+				where order_status != 4 and order_status != 0
+				group by  commodity_id ) t2 on a.id=t.commodity_id
     left join marketing_management mm on a.id = mm.product_id
     where a.id = #{id,jdbcType=VARCHAR}
   </select>
@@ -1716,11 +1722,14 @@
   	
   	 <select id="findMyAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
   	select 
-	  a.id, a.boutique,a.name, a.audit_status as auditStatus,
+	  a.id, a.boutique,a.name, a.audit_status as auditStatus,ifnull(t.x,0) as buyIntention,
 	  a.release_date as releaseDate
 	from  achievement a 
+	left join (select count(0) as x,commodity_id from t_order
+				where order_status != 4
+				group by  commodity_id ) t on a.id=t.commodity_id 
 	where a.deleted_sign = 0
-  	<if test="ownerId != null">
+	<if test="ownerId != null">
   	and a.owner_id = #{ownerId,jdbcType=VARCHAR}
   	</if>
   	<if test="page_sql!=null">
@@ -1734,7 +1743,7 @@
   	from  achievement a 
 	where a.deleted_sign = 0
 	<if test="ownerId != null">
-  	and i.uid = #{ownerId,jdbcType=VARCHAR}
+  	and  a.owner_id  = #{ownerId,jdbcType=VARCHAR}
   	</if>
   	</select>
   	

+ 19 - 4
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -55,10 +55,22 @@
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
-    <include refid="Base_Column_List" />
-    from demand 
+    d.id, d.serial_number AS serialNumber, d.data_category AS dataCategory, 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,
+    d.audit_status AS auditStatus, d.tech_broker_id AS techBrokerId,d.boutique,d.urgent_money AS urgentDoney,d.urgent_days as urgentDays
+    ,ifnull(t.x,0) as orderIntentionCount,ifnull(t2.x,0) as orderCount
+    from demand d
+    left join (select count(0) as x,commodity_id from t_order
+				where order_status != 4
+				group by  commodity_id ) t on d.id=t.commodity_id
+    left join (select count(0) as x,commodity_id from t_order
+				where order_status != 4 and order_status != 0
+				group by  commodity_id ) t2 on d.id=t.commodity_id 
     where id = #{id,jdbcType=VARCHAR}
-    
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
     delete from demand
@@ -1542,9 +1554,12 @@
   
   <select id="findAppMyDemandListByPage" parameterType="String" resultType="com.goafanti.demand.bo.DemandListBo">
   		select 
-	  d.id, d.boutique,d.name, d.audit_status as auditStatus,
+	  d.id, d.boutique,d.name, d.audit_status as auditStatus,ifnull(t.x,0) as orderCount,
 	  d.release_date as releaseDate
 	from  demand d 
+	left join (select count(0) as x,commodity_id from t_order
+				where order_status != 4 and order_status != 0
+				group by  commodity_id ) t on d.id=t.commodity_id
 	where d.deleted_sign = 0 
 	<if test="employerId != null">
 	and d.employer_id = #{employerId, jdbcType=VARCHAR}

+ 17 - 8
src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml

@@ -1020,18 +1020,24 @@
 		limit 0,6	
 	</select> 
 	 <select id="selectUserIdentityByUid" resultType="com.goafanti.user.bo.UserIdentityBo">
-	 	select 	t.id ,t.uid,t.username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,t.industry,t.city,u.introduction,u.head_portrait_url as headPortraitUrl
-	from user_identity t left JOIN user u
-	on t.uid = u.id
+	 	select 	t.id ,t.uid,t.username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,
+			t.industry,t.city,u.introduction,u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount
+	from user_identity t left JOIN user u on t.uid = u.id
+	left join (select count(0) as x,seller_id from t_order
+				where order_status != 4
+				group by  seller_id ) o on t.uid=o.seller_id
 	where t.uid=#{uid,jdbcType=VARCHAR}
 	 </select>
 	 
 	 <select id="findUserIdentityListByPage" parameterType="String" resultType="com.goafanti.user.bo.UserIdentityBo">
-  	select 	t.id ,t.uid,t.username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,t.industry,t.city,u.introduction,u.head_portrait_url as headPortraitUrl
-	from user_identity t left JOIN user u
-	on t.uid = u.id
+  	select 	t.id ,t.uid,t.username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,t.industry,t.city,
+			u.introduction,u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount
+	from user_identity t left JOIN user u on t.uid = u.id
+	left join (select count(0) as x,seller_id from t_order
+				where order_status != 4
+				group by  seller_id ) o on t.uid=o.seller_id
 	where 1=1
-    <if test="industry != null">
+	<if test="industry != null">
         and t.industry = #{industry,jdbcType=VARCHAR}
     </if>
     <if test="page_sql!=null">
@@ -1075,9 +1081,12 @@
   
   <select id="selectconsultantByUid" parameterType="java.lang.String" resultType="com.goafanti.app.bo.consultantListBo">
   	select 
-  		t.uid as id ,t.username ,t.consultant,u.head_portrait_url as headPortraitUrl,u.introduction
+  		t.uid as id ,t.username ,t.consultant,u.head_portrait_url as headPortraitUrl,u.introduction,ifnull(o.x,0) as reservationCount
   	from  user_identity t 
   	left join user u on t.uid =u.id
+  	left join (select count(0) as x,seller_id from t_order
+				where order_status != 4
+				group by  seller_id ) o on t.uid=o.seller_id
   	where t.consultant = 1
   	and t.uid = #{uid,jdbcType=VARCHAR}
   </select>

+ 19 - 2
src/main/java/com/goafanti/common/model/Demand.java

@@ -213,9 +213,26 @@ public class Demand {
 	 */
     private Integer urgentMoney;
 	
-	
+    private String orderCount;
+	private String orderIntentionCount; 
+
+    public String getOrderCount() {
+		return orderCount;
+	}
+
+	public void setOrderCount(String orderCount) {
+		this.orderCount = orderCount;
+	}
+
+	public String getOrderIntentionCount() {
+		return orderIntentionCount;
+	}
+
+	public void setOrderIntentionCount(String orderIntentionCount) {
+		this.orderIntentionCount = orderIntentionCount;
+	}
 
-    public String getRemark() {
+	public String getRemark() {
 		return remark;
 	}
 

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

@@ -107,6 +107,12 @@ public class DemandListBo {
 	 * 环信ID
 	 */
 	private String easemobName;
+	/**
+	 * 接单数
+	 */
+	private String orderCount;
+	
+	private String orderIntentionCount; 
 	
 	
 	
@@ -413,6 +419,22 @@ public class DemandListBo {
 		this.easemobName = easemobName;
 	}
 
+	public String getOrderCount() {
+		return orderCount;
+	}
+
+	public void setOrderCount(String orderCount) {
+		this.orderCount = orderCount;
+	}
+
+	public String getOrderIntentionCount() {
+		return orderIntentionCount;
+	}
+
+	public void setOrderIntentionCount(String orderIntentionCount) {
+		this.orderIntentionCount = orderIntentionCount;
+	}
+
 	
 
 	

+ 12 - 0
src/main/java/com/goafanti/portal/bo/DemandSearchListBo.java

@@ -86,6 +86,10 @@ public class DemandSearchListBo {
 	private Integer urgentMoney;
 	
 	private String 		cityname;
+	/**
+	 * 接单数
+	 */
+	private String orderCount;
 	
 	public String getEmployerName() {
 		return employerName;
@@ -247,5 +251,13 @@ public class DemandSearchListBo {
 		this.cityname = cityname;
 	}
 
+	public String getOrderCount() {
+		return orderCount;
+	}
+
+	public void setOrderCount(String orderCount) {
+		this.orderCount = orderCount;
+	}
+
 	
 }

+ 9 - 0
src/main/java/com/goafanti/user/bo/UserIdentityBo.java

@@ -15,6 +15,7 @@ public class UserIdentityBo extends UserIdentity {
 	private String industry0;
 	private String countInterest;
 	private String interest;
+	private String reservationCount;
 	public String getProvince0() {
 		return province0;
 	}
@@ -122,6 +123,14 @@ public class UserIdentityBo extends UserIdentity {
 		this.interest = interest;
 	}
 
+	public String getReservationCount() {
+		return reservationCount;
+	}
+
+	public void setReservationCount(String reservationCount) {
+		this.reservationCount = reservationCount;
+	}
+