Browse Source

权威咨询师、咨询师详情更换显示数据

anderx 8 years ago
parent
commit
d2f60a9f5d

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

@@ -87,7 +87,7 @@ public class OpenAppServiceController extends BaseApiController {
 		return res;
 	}
 	/**
-	 * 一对一
+	 * 权威咨询师
 	 */
 	@RequestMapping(value = "/consultantList", method = RequestMethod.GET)
 	public Result consultantList(Integer pNo,Integer pSize) {

+ 36 - 41
src/main/java/com/goafanti/common/mapper/AchievementMapper.xml

@@ -1213,47 +1213,42 @@
 	</select>
   
   <select id="selectUserOwnerDetail" parameterType="java.lang.String" resultType="com.goafanti.achievement.bo.AchievementUserOwnerDetailBo">
-     	
-  	select  
-		  	a.id, a.serial_number as serialNumber, a.data_category as dataCategory, 
-		  	a.name, a.keyword, a.category, 
-		  	a.summary, a.introduction, a.technical_picture_url as technicalPictureUrl, 
-		  	a.field_a as fieldA, a.field_b as fieldB, a.field_c as fieldC, f.name as field1, f2.name as field2,
-		  	a.maturity, a.maturity_picture_url as maturityPictureUrl, a.maturity_text_file_url as maturityTextFileUrl, 
-		  	a.maturity_video_url as maturityVideoUrl, a.innovation, a.owner_id as ownerId, 
-		  	a.owner_name as ownerName, a.owner_type as ownerType, a.owner_id_number as ownerIdNumber, 
-		    a.owner_mobile as ownerMobile, a.owner_email as ownerEmail, a.owner_postal_address as ownerPostalAddress, 
-		    a.cooperation_mode as cooperationMode, a.transfer_mode as transferMode, a.bargaining_mode as bargainingMode, 
-		    a.transfer_price as transferPrice, a.technical_scene as technicalScene, a.breakthrough, 
-		    a.patent_case as patentCase, a.awards, a.team_des as teamDes, 
-		    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, 
-		    a.create_time as createTime, a.release_status as releaseStatus, 
-		    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,
-			ui.id_number as iOwnerIdNumber, u.mobile as iOwnerMobile,j.easemob_name as easemobName,
-			ifnull(t.x,0) as orderIntentionCount ,ifnull(t2.x,0) as orderCount
-
-			ui.id_number as iOwnerIdNumber, u.mobile as iOwnerMobile,j.easemob_name as easemobName,a.remark,
-			ifnull(t.x,0) as orderIntentionCount ,ifnull(t2.x,0) as orderCount,ifnull(mm.effective,0) hot,a.boutique,
-			a.international_flag as internationalFlag
-
-    from achievement a
-    left join user_identity ui on a.owner_id = ui.uid
-    left join field_glossory f on a.field_a=f.id
-  	left join field_glossory f2 on a.field_b=f2.id
-    left join (select count(0) as x,tl.commodity_id from t_order tr
-				left join t_order_detail tl on tl.order_no=tr.order_no
-				where order_status != 4
-				group by  tl.commodity_id ) t on a.id=t.commodity_id 
-	left join (select count(0) as x,tl.commodity_id from t_order tr
-				left join t_order_detail tl on tl.order_no=tr.order_no
-				where tr.order_status != 4 and tr.order_status != 0
-				group by  tl.commodity_id) t2 on a.id=t2.commodity_id 
-    left join jpush_easemob_account j on a.owner_id=j.uid
-    left join user u on u.id = a.owner_id
-    left join marketing_management mm on a.id = mm.product_id
-  where a.id =#{id,jdbcType=VARCHAR}
+    select  
+	  	a.id, a.serial_number as serialNumber, a.data_category as dataCategory, 
+	  	a.name, a.keyword, a.category, 
+	  	a.summary, a.introduction, a.technical_picture_url as technicalPictureUrl, 
+	  	a.field_a as fieldA, a.field_b as fieldB, a.field_c as fieldC, f.name as field1, f2.name as field2,
+	  	a.maturity, a.maturity_picture_url as maturityPictureUrl, a.maturity_text_file_url as maturityTextFileUrl, 
+	  	a.maturity_video_url as maturityVideoUrl, a.innovation, a.owner_id as ownerId, 
+	  	a.owner_name as ownerName, a.owner_type as ownerType, a.owner_id_number as ownerIdNumber, 
+	    a.owner_mobile as ownerMobile, a.owner_email as ownerEmail, a.owner_postal_address as ownerPostalAddress, 
+	    a.cooperation_mode as cooperationMode, a.transfer_mode as transferMode, a.bargaining_mode as bargainingMode, 
+	    a.transfer_price as transferPrice, a.technical_scene as technicalScene, a.breakthrough, 
+	    a.patent_case as patentCase, a.awards, a.team_des as teamDes, 
+	    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, 
+	    a.create_time as createTime, a.release_status as releaseStatus, 
+	    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,
+		ui.id_number as iOwnerIdNumber, u.mobile as iOwnerMobile,j.easemob_name as easemobName,a.remark,
+		ifnull(t.x,0) as orderIntentionCount ,ifnull(t2.x,0) as orderCount,ifnull(mm.effective,0) hot,a.boutique,
+		a.international_flag as internationalFlag
+	from achievement a
+	    left join user_identity ui on a.owner_id = ui.uid
+	    left join field_glossory f on a.field_a=f.id
+	  	left join field_glossory f2 on a.field_b=f2.id
+	    left join (select count(0) as x,tl.commodity_id from t_order tr
+					left join t_order_detail tl on tl.order_no=tr.order_no
+					where order_status != 4
+					group by  tl.commodity_id ) t on a.id=t.commodity_id 
+		left join (select count(0) as x,tl.commodity_id from t_order tr
+					left join t_order_detail tl on tl.order_no=tr.order_no
+					where tr.order_status != 4 and tr.order_status != 0
+					group by  tl.commodity_id) t2 on a.id=t2.commodity_id 
+	    left join jpush_easemob_account j on a.owner_id=j.uid
+	    left join user u on u.id = a.owner_id
+	    left join marketing_management mm on a.id = mm.product_id
+	  where a.id =#{id,jdbcType=VARCHAR}
   </select>
   
    <select id="selectOrgOwnerDetail" parameterType="java.lang.String" resultType="com.goafanti.achievement.bo.AchievementOrgOwnerDetailBo">

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

@@ -1097,16 +1097,15 @@
   </select>
   
   <select id="findConsultantListByPage" resultType="com.goafanti.app.bo.consultantListBo">
-  
-  select t.uid as id,u.nickname as username ,u.head_portrait_url as headPortraitUrl,u.introduction ,
-  t.consultant,ifnull(x.n,0) as reservationCount
-  from user_identity t
-  left join `user` u on t.uid=u.id
-  left join ( select y.x  as n, y.seller_id
+	 select t.uid as id,t.username as username ,u.head_portrait_url as headPortraitUrl,u.introduction ,
+	  t.consultant,t.celebrity,ifnull(x.n,0) as reservationCount
+	  from user_identity t
+	  left join `user` u on t.uid=u.id
+	  left join ( select y.x  as n, y.seller_id
 	from (select count( 0 ) as x,seller_id from t_order
 			where order_status != 4
 			group by seller_id)y)x on t.uid=x.seller_id 
-  where t.consultant=1
+  where t.celebrity=1
    <if test="page_sql!=null">
 			${page_sql}
 	</if>
@@ -1121,15 +1120,16 @@
   
   
   <select id="selectconsultantByUid" parameterType="java.lang.String" resultType="com.goafanti.app.bo.consultantListBo">
-  	select 
-  		t.uid as id ,u.nickname as username ,t.consultant,u.head_portrait_url as headPortraitUrl,u.introduction,ifnull(o.x,0) as reservationCount,j.easemob_name as easemobName
+  	 	select 
+  		t.uid as id ,t.username as username ,t.consultant,u.head_portrait_url as headPortraitUrl,
+  		u.introduction,ifnull(o.x,0) as reservationCount,j.easemob_name as easemobName,t.celebrity
   	from  user_identity t 
   	left join user u on t.uid =u.id
   	 left join jpush_easemob_account j on t.uid=j.uid
   	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
+  	where t.celebrity = 1
   	and t.uid = #{uid,jdbcType=VARCHAR}
   </select>
 </mapper>