Browse Source

Merge branch 'test' of git@git.coding.net:aft/AFT.git into test

Conflicts:
	src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml
wanghui 8 years ago
parent
commit
d044cf047b

+ 20 - 0
src/main/java/com/goafanti/app/bo/AdvertisingBo.java

@@ -0,0 +1,20 @@
+package com.goafanti.app.bo;
+
+import java.util.List;
+
+public class AdvertisingBo {
+	private String picture;
+	private List<String> slogan;
+	public String getPicture() {
+		return picture;
+	}
+	public void setPicture(String picture) {
+		this.picture = picture;
+	}
+	public List<String> getSlogan() {
+		return slogan;
+	}
+	public void setSlogan(List<String> slogan) {
+		this.slogan = slogan;
+	}
+}

+ 7 - 0
src/main/java/com/goafanti/app/bo/ProjectDetailBo.java

@@ -7,6 +7,7 @@ public class ProjectDetailBo {
 	private String valueEffect;
 	private String clientSize;
 	private String interest;
+	private String maxLogo;
 	public String getId() {
 		return id;
 	}
@@ -43,4 +44,10 @@ public class ProjectDetailBo {
 	public void setInterest(String interest) {
 		this.interest = interest;
 	}
+	public String getMaxLogo() {
+		return maxLogo;
+	}
+	public void setMaxLogo(String maxLogo) {
+		this.maxLogo = maxLogo;
+	}
 }

+ 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.jpg";
+	public String imager1="/tmp/1.png";
 	
-	public String imager2="/tmp/2.jpg";
+	public String imager2="/tmp/2.png";
 	
-	public String imager3="/tmp/3.jpg";
+	public String imager3="/tmp/3.png";
 	
 	private List<String> imagers=new ArrayList<>();
 	

+ 7 - 0
src/main/java/com/goafanti/app/bo/consultantListBo.java

@@ -8,6 +8,7 @@ public class consultantListBo {
 	private String consultant;
 	private String interest;
 	private String reservationCount;
+	private String easemobName;
 	public String getId() {
 		return id;
 	}
@@ -51,4 +52,10 @@ public class consultantListBo {
 	public void setReservationCount(String reservationCount) {
 		this.reservationCount = reservationCount;
 	}
+	public String getEasemobName() {
+		return easemobName;
+	}
+	public void setEasemobName(String easemobName) {
+		this.easemobName = easemobName;
+	}
 }

+ 9 - 0
src/main/java/com/goafanti/app/controller/AppPortalController.java

@@ -95,5 +95,14 @@ public class AppPortalController extends BaseApiController {
 		return res;
 	}
 	
+	/**
+	 * 发现页面广告
+	 */
+	@RequestMapping(value = "/advertising", method = RequestMethod.GET)
+	public Result advertising() {
+		Result res = new Result();
+		res.setData(userIdentityService.advertising());
+		return res;
+	}
 	
 }

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

@@ -718,7 +718,7 @@
   </select>
   
   <select id="selectAppProjectDetail" resultType="com.goafanti.app.bo.ProjectDetailBo">
-  	select p.id,p.bname as name,p.introduce ,p.Value_effect as valueEffect ,p.client_size as clientSize
+  	select p.id,p.bname as name,p.introduce ,p.Value_effect as valueEffect ,p.client_size as clientSize,p.max_logo as maxLogo
 from business_project p 
 where id=#{id,jdbcType=VARCHAR}
   </select>

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

@@ -1036,22 +1036,24 @@
 	</select> 
 	 <select id="selectUserIdentityByUid" resultType="com.goafanti.user.bo.UserIdentityBo">
 	 	select 	t.id ,t.uid,u.nickname as 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
+			t.industry,t.city,u.introduction,u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount,j.easemob_name as easemobName
 	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.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,
+ <select id="findUserIdentityListByPage" parameterType="String" resultType="com.goafanti.user.bo.UserIdentityBo">
+  	select 	t.id ,t.uid,u.nickname as 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
+	where expert=1
+	and u.status !=1
 	<if test="industry != null">
         and t.industry = #{industry,jdbcType=VARCHAR}
     </if>
@@ -1070,14 +1072,14 @@
     </if>
   </select>
   
-  <select id="countInterest" resultType="java.lang.Integer">
+  <select id="countInterest"  resultType="java.lang.Integer">
   select count(0)
   	from user_interest 
   	where to_uid=#{uid,jdbcType=VARCHAR}
   </select>
   
-  <select id="findConsultantListByPage" resultType="com.goafanti.app.bo.consultantListBo">
-  select t.uid as id,t.username ,u.head_portrait_url as headPortraitUrl,u.introduction ,t.consultant
+  <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
   from user_identity t
   left join `user` u on t.uid=u.id
   where t.consultant=1
@@ -1086,7 +1088,7 @@
 	</if>
   </select>
   
-  <select id="findConsultantCount" resultType="java.lang.Integer">
+  <select id = "findConsultantCount"  resultType="java.lang.Integer">
    	select count(0) 
   from user_identity t
   left join `user` u on t.uid=u.id
@@ -1096,9 +1098,10 @@
   
   <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,ifnull(o.x,0) as reservationCount
+  		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
   	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

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

@@ -16,6 +16,7 @@ public class UserIdentityBo extends UserIdentity {
 	private String countInterest;
 	private String interest;
 	private String reservationCount;
+	private String easemobName;
 	public String getProvince0() {
 		return province0;
 	}
@@ -131,6 +132,14 @@ public class UserIdentityBo extends UserIdentity {
 		this.reservationCount = reservationCount;
 	}
 
+	public String getEasemobName() {
+		return easemobName;
+	}
+
+	public void setEasemobName(String easemobName) {
+		this.easemobName = easemobName;
+	}
+
 	
 	
 

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

@@ -2,6 +2,7 @@ package com.goafanti.user.service;
 
 import java.util.List;
 
+import com.goafanti.app.bo.AdvertisingBo;
 import com.goafanti.app.bo.consultantListBo;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.bo.fieldGlossoryBo;
@@ -49,4 +50,6 @@ public interface UserIdentityService {
 	 Pagination<consultantListBo> consultantList(Integer pNo, Integer pSize) ;
 
 	 consultantListBo consultantDetail(String id);
+	 
+	 AdvertisingBo advertising();
 }

+ 12 - 2
src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java

@@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.stereotype.Service;
 
+import com.goafanti.app.bo.AdvertisingBo;
 import com.goafanti.app.bo.consultantListBo;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.bo.fieldGlossoryBo;
@@ -34,7 +35,6 @@ import com.goafanti.common.enums.UserLevel;
 import com.goafanti.common.model.Notice;
 import com.goafanti.common.model.User;
 import com.goafanti.common.model.UserIdentity;
-import com.goafanti.common.model.UserInterest;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
@@ -305,7 +305,7 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
 
 	@Override
 	public UserIdentityBo expertsDetail(String uid) {
-		System.out.println(uid);
+		
 		UserIdentityBo u=userIdentityMapper.selectUserIdentityByUid(uid);
 		if (null!=u.getProvince()) {
 			u.setProvince0(districtGlossoryMapper.selectByPrimaryKey(u.getProvince()).getName());
@@ -403,4 +403,14 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
 	return  c;
 	}
 
+	@Override
+	public AdvertisingBo advertising() {
+		AdvertisingBo advertising=new AdvertisingBo();
+		advertising.setPicture("/customer_sys_file/1/GG1.jpg");		
+		List<String> list=new ArrayList<>();
+		list.add("快速响应您的需求 只为助您成就一流企业");
+		advertising.setSlogan(list);
+		return advertising;
+	}
+
 }