Browse Source

管理中心,政策置顶与热门字段新增改动相关接口

anderx 7 years ago
parent
commit
8f8b624849

+ 11 - 0
src/main/java/com/goafanti/app/controller/AppDiscoveryController.java

@@ -88,6 +88,17 @@ 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;
+	}
 	/**
 	 * 专家列表
 	 */

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

@@ -9,7 +9,6 @@ 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;
@@ -89,6 +88,16 @@ 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)

+ 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();
     
 }

+ 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>

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

@@ -355,7 +355,9 @@
 			or a.source like concat('%',#{param},'%')
 			or d.name like concat('%',#{param},'%')
 		</if>	
-		order by create_time desc
+		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>

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

@@ -55,5 +55,7 @@ public interface UserIdentityService {
 	 Pagination<consultantListBo> portalConsultantList(Integer pNo, Integer pSize);
 	
 	consultantListBo portalconsultantDetail(String id);
+
+	List<fieldGlossoryBo> domainList();
 	
 }

+ 6 - 0
src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java

@@ -447,4 +447,10 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
 		return c;
 	}
 
+	@Override
+	public List<fieldGlossoryBo> domainList() {
+		List<fieldGlossoryBo> list=industryCategoryMapper.selectDomainList();
+		return list;
+	}
+
 }