Browse Source

Merge branch 'test' of jishutao/aft into prod

gitadmin 7 years ago
parent
commit
f13b4254df
27 changed files with 362 additions and 62 deletions
  1. 18 5
      src/main/java/com/goafanti/app/bo/HomeImages.java
  2. 47 2
      src/main/java/com/goafanti/app/controller/AppDiscoveryController.java
  3. 35 2
      src/main/java/com/goafanti/app/controller/OpenAppDiscoveryController.java
  4. 2 2
      src/main/java/com/goafanti/app/controller/OpenAppHomeController.java
  5. 1 1
      src/main/java/com/goafanti/app/controller/OpenAppServiceController.java
  6. 1 1
      src/main/java/com/goafanti/app/controller/OpenAppUserController.java
  7. 7 1
      src/main/java/com/goafanti/app/service/AppHomePageService.java
  8. 5 3
      src/main/java/com/goafanti/app/service/impl/AppHomePageServiceImpl.java
  9. 6 8
      src/main/java/com/goafanti/common/dao/ContractMapper.java
  10. 2 0
      src/main/java/com/goafanti/common/dao/IndustryCategoryMapper.java
  11. 22 7
      src/main/java/com/goafanti/common/mapper/ContractMapper.xml
  12. 7 1
      src/main/java/com/goafanti/common/mapper/IndustryCategoryMapper.xml
  13. 1 0
      src/main/java/com/goafanti/common/mapper/MessageFromSystemMapper.xml
  14. 53 4
      src/main/java/com/goafanti/common/mapper/NewsMapper.xml
  15. 3 1
      src/main/java/com/goafanti/common/mapper/NewsMapperExt.xml
  16. 6 0
      src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml
  17. 19 2
      src/main/java/com/goafanti/common/mapper/UserMapperExt.xml
  18. 26 0
      src/main/java/com/goafanti/common/model/News.java
  19. 4 3
      src/main/java/com/goafanti/customer/bo/CustomerListIn.java
  20. 3 3
      src/main/java/com/goafanti/customer/bo/CustomerListOut.java
  21. 26 0
      src/main/java/com/goafanti/news/bo/InputNews.java
  22. 26 1
      src/main/java/com/goafanti/news/bo/NewsPortalList.java
  23. 14 0
      src/main/java/com/goafanti/news/service/NewsService.java
  24. 4 1
      src/main/java/com/goafanti/portal/controller/PortalNewsController.java
  25. 11 12
      src/main/java/com/goafanti/techproject/service/impl/TechProjectServiceImpl.java
  26. 3 1
      src/main/java/com/goafanti/user/service/UserIdentityService.java
  27. 10 1
      src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java

+ 18 - 5
src/main/java/com/goafanti/app/bo/HomeImages.java

@@ -3,7 +3,11 @@ package com.goafanti.app.bo;
 import java.util.ArrayList;
 import java.util.List;
 
+import javax.servlet.http.HttpServletRequest;
+
 public class HomeImages {
+	
+
 	public String img1="/customer_sys_file/1/GGN1.jpg";
 	
 	public String img2="/customer_sys_file/1/GG2.jpg";
@@ -14,11 +18,20 @@ public class HomeImages {
 	
 	private List<HomeImgBo> imagers=new ArrayList<>();
 	
-	public  List<HomeImgBo> getImagers() {
-		imagers.add(new HomeImgBo("065de736-9b40-4678-93bc-e95f5e8c529b",img1,"成果"));
-		imagers.add(new HomeImgBo("739aed36-6ee6-406f-b03e-97d719b484b9",img2,"需求"));
-		imagers.add(new HomeImgBo("af430be8-7752-43ac-ad82-27f02be317e6",img3,"专家"));
-		imagers.add(new HomeImgBo(null,img4,null));
+	public  List<HomeImgBo> getImagers(HttpServletRequest request) {
+		String url=request.getServerName();
+		
+		if (url.contains("uat")) {
+			imagers.add(new HomeImgBo("14bd3573-7d09-4dcd-bfa0-10ad3285e3e9",img1,"成果"));
+			imagers.add(new HomeImgBo("e9c9577f-5b01-446a-b5f8-7667be957b4a",img2,"需求"));
+			imagers.add(new HomeImgBo("2023b591-c5fd-4c24-a5ca-a7eb491e8d9e",img3,"专家"));
+			imagers.add(new HomeImgBo(null,img4,null));
+		}else {
+			imagers.add(new HomeImgBo("065de736-9b40-4678-93bc-e95f5e8c529b",img1,"成果"));
+			imagers.add(new HomeImgBo("739aed36-6ee6-406f-b03e-97d719b484b9",img2,"需求"));
+			imagers.add(new HomeImgBo("af430be8-7752-43ac-ad82-27f02be317e6",img3,"专家"));
+			imagers.add(new HomeImgBo(null,img4,null));
+		}
 		return imagers;
 	}
 	

+ 47 - 2
src/main/java/com/goafanti/app/controller/AppDiscoveryController.java

@@ -9,9 +9,11 @@ import org.springframework.web.bind.annotation.RestController;
 import com.goafanti.achievement.service.AchievementInterestService;
 import com.goafanti.achievement.service.AchievementService;
 import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseApiController;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.demand.service.DemandService;
+import com.goafanti.news.service.NewsService;
 import com.goafanti.user.service.UserIdentityService;
 
 @RestController
@@ -25,6 +27,8 @@ public class AppDiscoveryController extends BaseApiController {
 	private UserIdentityService	userIdentityService;
 	@Resource
 	private AchievementInterestService	achievementInterestService;
+	@Resource
+	private NewsService newsService;
 	
 	/**
 	 * 成果列表
@@ -84,13 +88,24 @@ public class AppDiscoveryController extends BaseApiController {
 		return res;
 	}
 	
+	
+	/**
+	 * 专家领域分类列表
+	 * 
+	 */
+	@RequestMapping(value = "/domainList", method = RequestMethod.GET)
+	public Result domainList() {
+		Result res = new Result();
+		res.setData(userIdentityService.domainList());
+		return res;
+	}
 	/**
 	 * 专家列表
 	 */
 	@RequestMapping(value = "/expertsList", method = RequestMethod.GET)
-	public Result expertsList(String industry, Integer pNo, Integer pSize) {
+	public Result expertsList(String name,String industry, Integer pNo, Integer pSize) {
 		Result res = new Result();
-		res.setData(userIdentityService.expertsList(industry,  pNo,  pSize));
+		res.setData(userIdentityService.expertsList(name,industry,  pNo,  pSize));
 		return res;
 	}
 	
@@ -104,4 +119,34 @@ public class AppDiscoveryController extends BaseApiController {
 		return res;
 	}
 	
+
+	
+	/**
+	 * 政策列表
+	 */
+	@RequestMapping(value = "/listNews", method = RequestMethod.GET)
+	public Result appListNews(String param,Integer pNo,Integer pSize) {
+		Result res = new Result();
+		if (null==pNo) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"页码","页码"));
+			return res;
+		}
+		if (null==pSize) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"页显示数","页显示数"));
+			return res;
+		}
+		res.setData(newsService.appListNews( param ,pNo, pSize));
+		return res;
+	}
+	
+	/**
+	 * 政策详情
+	 */
+	@RequestMapping(value = "/newsDetail", method = RequestMethod.GET)
+	public Result newsDetail(long id) {
+		Result res = new Result();
+		res.setData(newsService.findNewsDetail(id));
+		return res;
+	}
+	
 }

+ 35 - 2
src/main/java/com/goafanti/app/controller/OpenAppDiscoveryController.java

@@ -12,6 +12,7 @@ import com.goafanti.common.bo.Result;
 import com.goafanti.common.controller.BaseApiController;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.demand.service.DemandService;
+import com.goafanti.news.service.NewsService;
 import com.goafanti.user.service.UserIdentityService;
 
 @RestController
@@ -25,6 +26,8 @@ public class OpenAppDiscoveryController extends BaseApiController {
 	private UserIdentityService	userIdentityService;
 	@Resource
 	private AchievementInterestService	achievementInterestService;
+	@Resource
+	private NewsService newsService;
 	
 	/**
 	 * 成果列表
@@ -85,12 +88,22 @@ public class OpenAppDiscoveryController extends BaseApiController {
 	}
 	
 	/**
+	 * 专家领域分类列表
+	 * 
+	 */
+	@RequestMapping(value = "/domainList", method = RequestMethod.GET)
+	public Result domainList() {
+		Result res = new Result();
+		res.setData(userIdentityService.domainList());
+		return res;
+	}
+	/**
 	 * 专家列表
 	 */
 	@RequestMapping(value = "/expertsList", method = RequestMethod.GET)
-	public Result expertsList(String industry, Integer pNo, Integer pSize) {
+	public Result expertsList(String name,String industry, Integer pNo, Integer pSize) {
 		Result res = new Result();
-		res.setData(userIdentityService.expertsList(industry,pNo,pSize));
+		res.setData(userIdentityService.expertsList(name,industry,pNo,pSize));
 		return res;
 	}
 	
@@ -103,4 +116,24 @@ public class OpenAppDiscoveryController extends BaseApiController {
 		res.setData(userIdentityService.advertising());
 		return res;
 	}
+	/**
+	 * 政策列表
+	 */
+	@RequestMapping(value = "/listNews", method = RequestMethod.GET)
+	public Result appListNews(String param,Integer pNo,Integer pSize) {
+		Result res = new Result();
+		res.setData(newsService.appListNews( param ,pNo, pSize));
+		return res;
+		
+	}
+	
+	/**
+	 * 政策详情
+	 */
+	@RequestMapping(value = "/newsDetail", method = RequestMethod.GET)
+	public Result expertsDetail(long id) {
+		Result res = new Result();
+		res.setData(newsService.findNewsDetail( id));
+		return res;
+	}
 }

+ 2 - 2
src/main/java/com/goafanti/app/controller/OpenAppHomeController.java

@@ -12,7 +12,7 @@ import com.goafanti.common.bo.Result;
 import com.goafanti.common.controller.BaseApiController;
 
 @RestController
-@RequestMapping(path = "open/app/home")
+@RequestMapping(path = "/open/app/home")
 public class OpenAppHomeController extends BaseApiController{
 	@Resource
 	private AppHomePageService	appHomePageService;
@@ -22,7 +22,7 @@ public class OpenAppHomeController extends BaseApiController{
 	@RequestMapping(value = "/getHomePageData", method = RequestMethod.GET)
 	public Result getHomePageData(HttpServletRequest  request){
 		Result res = new Result();
-		res.setData(appHomePageService.getAppHomePage());
+		res.setData(appHomePageService.getAppHomePage(request));
 		return res;
 	}
 	

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

@@ -20,7 +20,7 @@ import com.goafanti.user.service.UserIdentityService;
 
 
 @RestController
-@RequestMapping(path = "open/app/service", method = RequestMethod.GET)
+@RequestMapping(path = "/open/app/service", method = RequestMethod.GET)
 public class OpenAppServiceController extends BaseApiController {
 	@Resource
 	private BusinessVarietiesService	adminVarietiesService;

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

@@ -23,7 +23,7 @@ import com.goafanti.user.service.UserInterestService;
 import com.goafanti.user.service.UserService;
 
 @RestController
-@RequestMapping(path = "open/app/user", method = RequestMethod.GET)
+@RequestMapping(path = "/open/app/user", method = RequestMethod.GET)
 public class OpenAppUserController extends BaseApiController {
 	@Resource
 	private UserService userServiceImpl;

+ 7 - 1
src/main/java/com/goafanti/app/service/AppHomePageService.java

@@ -5,6 +5,8 @@ package com.goafanti.app.service;
 
 import java.util.List;
 
+import javax.servlet.http.HttpServletRequest;
+
 import org.springframework.stereotype.Service;
 import com.goafanti.app.bo.AppHomePage;
 
@@ -12,7 +14,11 @@ import com.goafanti.app.bo.AppHomePage;
 @Service
 public interface AppHomePageService {
 	
-	public AppHomePage getAppHomePage();
+	public AppHomePage getAppHomePage(HttpServletRequest request);
 
 	public List<?> getHomeRecommended(Integer type);
+
+	
+
+	
 }

+ 5 - 3
src/main/java/com/goafanti/app/service/impl/AppHomePageServiceImpl.java

@@ -2,6 +2,8 @@ package com.goafanti.app.service.impl;
 
 import java.util.List;
 
+import javax.servlet.http.HttpServletRequest;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.goafanti.app.bo.AppHomePage;
@@ -14,7 +16,7 @@ import com.goafanti.common.dao.UserIdentityMapper;
 import com.goafanti.user.service.UserIdentityService;
 
 @Service
-public class AppHomePageServiceImpl implements AppHomePageService{
+public  class AppHomePageServiceImpl implements AppHomePageService{
 	@Autowired
 	AchievementMapper	achievementMapper;
 	@Autowired
@@ -26,9 +28,9 @@ public class AppHomePageServiceImpl implements AppHomePageService{
 	
 
 	@Override
-	public AppHomePage getAppHomePage() {
+	public AppHomePage getAppHomePage(HttpServletRequest request) {
 		AppHomePage ap=new AppHomePage();
-		ap.setHomeImg(new HomeImages().getImagers());
+		ap.setHomeImg(new HomeImages().getImagers(request));
 		ap.setAdvertising(userIdentityService.advertising());
 		List<HomeAchievemend> h=achievementMapper.getAppHomeAchievement();
 		for (HomeAchievemend ha : h) {

+ 6 - 8
src/main/java/com/goafanti/common/dao/ContractMapper.java

@@ -106,12 +106,10 @@ public interface ContractMapper {
 	 * @param taskDistribution
 	 * @return
 	 */
-	int updateRepairData(@Param("orderNo")String orderNo,@Param("taskDistribution") int taskDistribution);
-	
-	/**
-	 * 判断项目单分配情况
-	 * @param orderNo
-	 * @return
-	 */
-	TmpTable selectTaskDistribution(@Param("orderNo") String orderNo);
+	int updateRepairData(@Param("contractId")String contractId,@Param("taskDistribution") int taskDistribution);
+
+
+	int selectTaskAllCount(@Param("contractId")String contractId);
+
+	int selectTaskDisCount(@Param("contractId")String contractId);
 }

+ 2 - 0
src/main/java/com/goafanti/common/dao/IndustryCategoryMapper.java

@@ -21,5 +21,7 @@ public interface IndustryCategoryMapper {
     List<IndustryCategory> listByPid(Integer pid);
 
 	List<fieldGlossoryBo> selectindustryList();
+
+	List<fieldGlossoryBo> selectDomainList();
     
 }

+ 22 - 7
src/main/java/com/goafanti/common/mapper/ContractMapper.xml

@@ -764,14 +764,29 @@
    </insert>
    
    <update id="updateRepairData">
-		update contract set task_distribution = #{taskDistribution,jdbcType=VARCHAR} where order_no = #{orderNo,jdbcType=VARCHAR} 
+		update contract set task_distribution = #{taskDistribution,jdbcType=VARCHAR} where id = #{contractId,jdbcType=VARCHAR} 
    </update>
+  
+   <select id="selectTaskAllCount" parameterType="java.lang.String"  resultType="java.lang.Integer">
+		select
+			count( 0 ) as all_count
+		from
+			contract_task a left join contract b on
+			a.contract_id = b.id
+		where
+			a.deleted_sign <![CDATA[ <> ]]> 1
+			and a.contract_id = #{contractId,jdbcType=VARCHAR}	
+   </select>
    
-   <select id="selectTaskDistribution" parameterType="java.lang.String" resultType="com.goafanti.common.model.TmpTable">
-		select x.order_no as orderNO,x.all_count as allCount,y.dis_count as disCount from (
-			select b.order_no,count(0) as all_count from contract_task a left join contract b on a.contract_id = b.id where a.deleted_sign <![CDATA[ <> ]]> 1 group by b.order_no) x 
-		inner join (
-			select b.order_no,count(0) as dis_count from contract_task a left join contract b on a.contract_id = b.id where a.deleted_sign <![CDATA[ <> ]]> 1 and a.task_status = 1 group by b.order_no)y
-		on x.order_no = y.order_no and x.order_no = #{orderNo,jdbcType=VARCHAR}
+   <select id="selectTaskDisCount" parameterType="java.lang.String"  resultType="java.lang.Integer">
+		select
+			count( 0 ) as dis_count
+		from
+			contract_task a left join contract b on
+			a.contract_id = b.id
+		where
+			a.deleted_sign <![CDATA[ <> ]]> 1
+			and a.task_status <![CDATA[ <> ]]> 0
+			and a.contract_id = #{contractId,jdbcType=VARCHAR}
    </select>
 </mapper>

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

@@ -89,6 +89,12 @@
   <select id="selectindustryList" resultType="com.goafanti.common.bo.fieldGlossoryBo">
   	SELECT id, name, pid, `level`
 	FROM aft.field_glossory
-	WHERE level=1;
+	WHERE level=1
+  </select>
+  
+  <select id="selectDomainList" resultType="com.goafanti.common.bo.fieldGlossoryBo">
+  	SELECT id,name,pid
+	FROM aft.industry_category
+	WHERE pid=0
   </select>
 </mapper>

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

@@ -671,6 +671,7 @@
 			<if test="resourceType != null">
 				and b.resource_type = #{resourceType,jdbcType=INTEGER}
 			</if>
+			order by b.create_time DESC
 			<if test="page_sql!=null">
 				${page_sql}
 			</if>

+ 53 - 4
src/main/java/com/goafanti/common/mapper/NewsMapper.xml

@@ -43,7 +43,9 @@
     jmrh_flag as jmrhFlag,
     province_id as provinceId,
     audit_status as auditStatus,
-    release_status as releaseStatus
+    release_status as releaseStatus,
+    top_number as topNumber,
+    hotspot
     from news
     where id = #{id,jdbcType=BIGINT}
   </select>
@@ -55,13 +57,13 @@
     insert into news (id, create_time, edit_time, 
       title, title_img, author, 
       type, hot, source, 
-      source_url, summary, content,jmrh_flag,province_id
+      source_url, summary, content,jmrh_flag,province_id,top_number,hotspot
       )
     values (#{id,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{editTime,jdbcType=TIMESTAMP}, 
       #{title,jdbcType=VARCHAR}, #{titleImg,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR}, 
       #{type,jdbcType=INTEGER}, #{hot,jdbcType=INTEGER}, #{source,jdbcType=VARCHAR}, 
       #{sourceUrl,jdbcType=VARCHAR}, #{summary,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR},
-      #{jmrhFlag,jdbcType=INTEGER}, #{provinceId,jdbcType=INTEGER}
+      #{jmrhFlag,jdbcType=INTEGER}, #{provinceId,jdbcType=INTEGER}, #{topNumber,jdbcType=INTEGER}, #{hotspot,jdbcType=INTEGER}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.News">
@@ -213,7 +215,9 @@
       jmrh_flag = #{jmrhFlag,jdbcType=INTEGER},
       province_id = #{provinceId,jdbcType=INTEGER},
       audit_status = #{auditStatus,jdbcType=INTEGER},
-      release_status = #{releaseStatus,jdbcType=INTEGER}
+      release_status = #{releaseStatus,jdbcType=INTEGER},
+      top_number = #{topNumber,jdbcType=INTEGER},
+      hotspot = #{hotspot,jdbcType=INTEGER}
     where id = #{id,jdbcType=BIGINT}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.News">
@@ -329,5 +333,50 @@
 	</select>
 	
 	
+	<select id="appNewsList" resultType="com.goafanti.news.bo.NewsPortalList">
+		select
+			a.id,
+			DATE_FORMAT(a.create_time,'%Y-%m-%d') as createTime,
+			a.title,
+			a.title_img as titleImg,
+			a.type,
+			a.hot,
+			a.summary,
+			a.source,
+			a.content,
+			top_number as topNumber,
+    		hotspot
+		from news a
+		left join district_glossory d on a.province_id=d.id
+		where
+		a.type != 1 and a.type != 2
+		<if test="param != null">
+			and a.title like concat('%',#{param},'%')
+			or a.source like concat('%',#{param},'%')
+			or d.name like concat('%',#{param},'%')
+		</if>	
+		order by  IF(ISNULL(top_number),1,0) ,top_number asc,
+				 IF(ISNULL(hotspot),1,0),hotspot  asc,
+				create_time desc
+		<if test="page_sql != null">
+			${page_sql}
+		</if>
+	</select>
+	
+	<select id="appNewsCount" resultType="java.lang.Integer">
+		select 
+			count(0)
+		from news a
+		left join district_glossory d on a.province_id=d.id
+		where 
+		a.type != 1 and a.type != 2
+		<if test="param != null">
+			and a.title like concat('%',#{param},'%')
+			or a.source like concat('%',#{param},'%')
+			or d.name like concat('%',#{param},'%')
+		</if>	
+	</select>
+	
+	
 	
 </mapper>

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

@@ -67,7 +67,9 @@
   		source,
   		summary,
   		audit_status as auditStatus,
-  		release_status as releaseStatus
+  		release_status as releaseStatus,
+  		top_number as topNumber,
+    	hotspot
   	from news
   	where 1 =1
   	<if test="auditStatus != null">

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

@@ -1045,6 +1045,9 @@
 	<if test="industry != null">
         and t.industry = #{industry,jdbcType=VARCHAR}
     </if>
+    <if test="name != null">
+        and u.nickname like concat('%',#{name},'%')
+    </if>
     <if test="page_sql!=null">
         ${page_sql}
     </if>
@@ -1061,6 +1064,9 @@
     <if test="industry != null">
         and t.industry = #{industry,jdbcType=VARCHAR}
     </if>
+    <if test="name != null">
+        and u.nickname like concat('%',#{name},'%')
+    </if>
   </select>
   
   <select id="countInterest" resultType="java.lang.Integer">

+ 19 - 2
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -172,7 +172,7 @@
 			a.lvl,
 			a.is_member as isMember,
 			a.society_tag as societyTag,
-			share_type as shareType,
+			a.share_type as shareType,
 			b.contacts,
 			b.contact_mobile as contactMobile,
 			b.international,
@@ -184,7 +184,24 @@
 			dg3.name as area,
 			c.name as industry,
 			d.name as adminName		
-		from user a inner join organization_identity b on a.id = b.uid
+		from 
+		(	select 
+				id,
+				aid,
+				type,
+				status, 
+				create_time,
+				business_audit,
+				current_member_status,
+				identify_name,
+				lvl,
+				is_member,
+				society_tag,
+				share_type,
+				audit_status
+			from user order by create_time desc
+		)a
+		inner join organization_identity b on a.id = b.uid
 		left join district_glossory dg1 on b.location_province = dg1.id
 		left join district_glossory dg2 on b.location_city = dg2.id
 		left join district_glossory dg3 on b.location_area = dg3.id

+ 26 - 0
src/main/java/com/goafanti/common/model/News.java

@@ -95,6 +95,16 @@ public class News {
 	 */
 	private Integer releaseStatus;
 	
+	/**
+	 * 置顶
+	 */
+	private Integer topNumber;
+	
+	/**
+	 * 热门
+	 */
+	private Integer hotspot;
+	
 	@JsonFormat(shape = Shape.STRING)
 	public Long getId() {
 		return id;
@@ -243,6 +253,22 @@ public class News {
 	public void setCreateTimeS(String createTimeS) {
 		CreateTimeS = createTimeS;
 	}
+
+	public Integer getTopNumber() {
+		return topNumber;
+	}
+
+	public void setTopNumber(Integer topNumber) {
+		this.topNumber = topNumber;
+	}
+
+	public Integer getHotspot() {
+		return hotspot;
+	}
+
+	public void setHotspot(Integer hotspot) {
+		this.hotspot = hotspot;
+	}
 	
 	
 }

+ 4 - 3
src/main/java/com/goafanti/customer/bo/CustomerListIn.java

@@ -78,13 +78,14 @@ public class CustomerListIn {
 	private String consultant;
 	
 	/** 专家审核状态 **/
-	private Integer expertAudit ;
+	private String expertAudit ;
 
-	public Integer getExpertAudit() {
+	
+	public String getExpertAudit() {
 		return expertAudit;
 	}
 
-	public void setExpertAudit(Integer expertAudit) {
+	public void setExpertAudit(String expertAudit) {
 		this.expertAudit = expertAudit;
 	}
 

+ 3 - 3
src/main/java/com/goafanti/customer/bo/CustomerListOut.java

@@ -17,7 +17,7 @@ public class CustomerListOut extends CustomerListIn{
 	private String adminName;
 	
 	/** 专家发布状态**/
-	private Integer releaseStatus;
+	private String releaseStatus;
 	
 	/** 审核意见**/
 	private String auditOpinion;
@@ -30,11 +30,11 @@ public class CustomerListOut extends CustomerListIn{
 		this.auditOpinion = auditOpinion;
 	}
 
-	public Integer getReleaseStatus() {
+	public String getReleaseStatus() {
 		return releaseStatus;
 	}
 
-	public void setReleaseStatus(Integer releaseStatus) {
+	public void setReleaseStatus(String releaseStatus) {
 		this.releaseStatus = releaseStatus;
 	}
 

+ 26 - 0
src/main/java/com/goafanti/news/bo/InputNews.java

@@ -55,6 +55,16 @@ public class InputNews {
 	 * 是否发布
 	 */
 	private Integer releaseStatus;
+	
+	/**
+	 * 置顶
+	 */
+	private Integer topNumber;
+	
+	/**
+	 * 热门
+	 */
+	private Integer hotspot;
 
 	public Integer getAuditStatus() {
 		return auditStatus;
@@ -168,4 +178,20 @@ public class InputNews {
 		this.provinceId = provinceId;
 	}
 
+	public Integer getTopNumber() {
+		return topNumber;
+	}
+
+	public void setTopNumber(Integer topNumber) {
+		this.topNumber = topNumber;
+	}
+
+	public Integer getHotspot() {
+		return hotspot;
+	}
+
+	public void setHotspot(Integer hotspot) {
+		this.hotspot = hotspot;
+	}
+
 }

+ 26 - 1
src/main/java/com/goafanti/news/bo/NewsPortalList.java

@@ -9,7 +9,16 @@ public class NewsPortalList extends NewsSummary {
 	
 	private String DataS;
 
-	private String source;
+	private String source;
+	/**
+	 * 置顶
+	 */
+	private Integer topNumber;
+	
+	/**
+	 * 热门
+	 */
+	private Integer hotspot;
 
 	public String getTitle() {
 		return title;
@@ -42,6 +51,22 @@ public class NewsPortalList extends NewsSummary {
 	public void setDataS(String dataS) {
 		DataS = dataS;
 	}
+
+	public Integer getTopNumber() {
+		return topNumber;
+	}
+
+	public void setTopNumber(Integer topNumber) {
+		this.topNumber = topNumber;
+	}
+
+	public Integer getHotspot() {
+		return hotspot;
+	}
+
+	public void setHotspot(Integer hotspot) {
+		this.hotspot = hotspot;
+	}
 	
 	
 

+ 14 - 0
src/main/java/com/goafanti/news/service/NewsService.java

@@ -203,5 +203,19 @@ public class NewsService extends BaseMybatisDao<NewsMapper> {
 		
 		return newsMapper.portalNewsQuestion();
 	}
+	@SuppressWarnings("unchecked")
+	public Pagination<NewsPortalList> appListNews(String param,Integer pNo,Integer pSize){
+		Map<String, Object> params=new HashMap<>();
+		if (StringUtils.isNotBlank(param)) {
+			params.put("param", param);
+		}
+		if (pNo == null || pNo < 0) {
+			pNo = 1;
+		}
+		if (pSize == null || pSize < 0 || pSize > 10) {
+			pSize = 10;
+		}
+		return (Pagination<NewsPortalList>) findPage("appNewsList", "appNewsCount", params, pNo, pSize);
+	}
 	
 }

+ 4 - 1
src/main/java/com/goafanti/portal/controller/PortalNewsController.java

@@ -158,8 +158,11 @@ public class PortalNewsController extends BaseController {
 	@RequestMapping(value = "/portal/news/appCognizance", method = RequestMethod.GET)
 	public ModelAndView appCognizance(HttpServletRequest request, ModelAndView modelview,String id) {
 		ProjectDetailBo bo = businessProjectService.orgProject(id);
-		bo.setIntroduce(bo.getIntroduce().replace("\n", "</br>"));
+		if (StringUtils.isNotBlank(bo.getIntroduce())) 
+			bo.setIntroduce(bo.getIntroduce().replace("\n", "</br>"));
+		if (StringUtils.isNotBlank(bo.getValueEffect())) 
 		bo.setValueEffect(bo.getValueEffect().replace("\n", "</br>"));
+		if (StringUtils.isNotBlank(bo.getClientSize())) 
 		bo.setClientSize(bo.getClientSize().replace("\n", "</br>"));
 		modelview.addObject("bo", bo);
 		modelview.setViewName("/portal/news/appCognizance");

+ 11 - 12
src/main/java/com/goafanti/techproject/service/impl/TechProjectServiceImpl.java

@@ -379,8 +379,7 @@ public class TechProjectServiceImpl extends BaseMybatisDao<TechProjectMapper> im
 			task.setDeletedSign(DeleteStatus.UNDELETE.getCode());
 			contractTaskMapper.insert(task);
 		}
-		Contract contract = contractMapper.selectByPrimaryKey(contractId);
-		return setTaskDistribution(contract);
+		return setTaskDistribution(contractId);
 	}
 
 	@Override
@@ -429,8 +428,7 @@ public class TechProjectServiceImpl extends BaseMybatisDao<TechProjectMapper> im
 				throw new BusinessException(new Error(ErrorConstants.NOT_ACCORD_WITH_NEXT, taskId, ""));
 		}
 		contractTaskMapper.deleteByPrimaryKey(taskId);
-		Contract contract = contractMapper.selectByPrimaryKey(task.getContractId());
-		return setTaskDistribution(contract);
+		return setTaskDistribution(task.getContractId());
 	}
 
 	@Override
@@ -483,16 +481,18 @@ public class TechProjectServiceImpl extends BaseMybatisDao<TechProjectMapper> im
 		return contractMapper.updateByPrimaryKeySelective(contract);
 	}
 
-	private int setTaskDistribution(Contract contract){
-		TmpTable tt = contractMapper.selectTaskDistribution(contract.getOrderNo());
+	private int setTaskDistribution(String contractId){
+		int allCount = contractMapper.selectTaskAllCount(contractId);
+		int disCount = contractMapper.selectTaskDisCount(contractId);
 		int taskDistribution = TaskDistributionState.NOT_DISTRIBUTION.getCode();
-		if (tt.getAllCount() == tt.getDisCount())
+		if (allCount == disCount)
 			taskDistribution = TaskDistributionState.ALL_DISTRIBUTION.getCode();
-		else if (tt.getAllCount() > tt.getDisCount() && tt.getDisCount() != 0)
+		else if (allCount > disCount && disCount != 0)
 			taskDistribution = TaskDistributionState.PART_DISTRIBUTION.getCode();
-		else if (tt.getAllCount() > tt.getDisCount() && tt.getDisCount() == 0)
+		else if (allCount > disCount && disCount == 0)
 			taskDistribution = TaskDistributionState.NOT_DISTRIBUTION.getCode();
-		return contractMapper.updateRepairData(tt.getOrderNo(), taskDistribution);
+			contractMapper.updateRepairData(contractId, taskDistribution);
+		return 1;
 	}
 
 	@Override
@@ -505,8 +505,7 @@ public class TechProjectServiceImpl extends BaseMybatisDao<TechProjectMapper> im
 			task.setTaskDistributionTime(new Date());
 			task.setTaskStatus(TaskState.DISTRIBUTION.getCode());
 			contractTaskMapper.updateByPrimaryKeySelective(task);
-			Contract contract = contractMapper.selectByPrimaryKey(task.getContractId());
-			return setTaskDistribution(contract);
+			return setTaskDistribution(task.getContractId());
 		}
 		return 0;
 	}

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

@@ -42,7 +42,7 @@ public interface UserIdentityService {
 	
 	UserIdentityBo expertsDetail(String uid);
 
-	Pagination<UserIdentityBo> expertsList(String industry, Integer pNo, Integer pSize);
+	Pagination<UserIdentityBo> expertsList(String name,String industry, Integer pNo, Integer pSize);
 
 	List<fieldGlossoryBo> industryList();
 
@@ -55,5 +55,7 @@ public interface UserIdentityService {
 	 Pagination<consultantListBo> portalConsultantList(Integer pNo, Integer pSize);
 	
 	consultantListBo portalconsultantDetail(String id);
+
+	List<fieldGlossoryBo> domainList();
 	
 }

+ 10 - 1
src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java

@@ -335,11 +335,14 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<UserIdentityBo> expertsList(String industry, Integer pNo, Integer pSize) {
+	public Pagination<UserIdentityBo> expertsList(String name,String industry, Integer pNo, Integer pSize) {
 		Map<String, Object> params = new HashMap<>();
 		if (StringUtils.isNotBlank(industry)) {
 			params.put("industry", industry);
 		}
+		if (StringUtils.isNotBlank(name)) {
+			params.put("name", name);
+		}
 		if (pNo == null || pNo < 0) {
 			pNo = 1;
 		}
@@ -444,4 +447,10 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
 		return c;
 	}
 
+	@Override
+	public List<fieldGlossoryBo> domainList() {
+		List<fieldGlossoryBo> list=industryCategoryMapper.selectDomainList();
+		return list;
+	}
+
 }