Commit 4e3345b9 by lixinming

no message

parent 7ed20eb8
......@@ -7,7 +7,7 @@
import moment = require("moment");
import { BaseParamUpdateConfig } from "../../config/checkParamConfig";
import { findEnterpriseCountByFuHuaQiUscc, groupFindEnterprise } from "../../data/enterprise/enterprise";
import { findFuHuaQiByUSCC, findFuHuaQiList } from "../../data/fuHuaQi/fuhuaqi";
import { findFuHuaQiByUSCC, findFuHuaQiCount, findFuHuaQiList } from "../../data/fuHuaQi/fuhuaqi";
import * as tools from "../../util/tools";
import { FuHuaQiBaseListConfig } from "../../config/ojbectResultKeyConfig";
......@@ -81,6 +81,7 @@ export async function homeData(uscc:string) {
* @param lv 孵化器等级
* @param institutionalNature 机构性质
* @param industry 领域
* @param page 页数
* @returns
*/
export async function fuHuaQiBaseList(lv:number, institutionalNature:number, industry:number, page:number) {
......@@ -91,6 +92,7 @@ export async function fuHuaQiBaseList(lv:number, institutionalNature:number, ind
let enterpriseMap = await groupFindEnterprise();
let dataBaseList = await findFuHuaQiList(selectParam, (page-1)*10 );
let count = await findFuHuaQiCount(selectParam);
let dataList = [];
dataBaseList.forEach( info => {
let changeData = tools.extractData(FuHuaQiBaseListConfig, info);
......@@ -98,5 +100,5 @@ export async function fuHuaQiBaseList(lv:number, institutionalNature:number, ind
dataList.push(changeData);
});
return {dataList};
return {count, dataList};
}
\ No newline at end of file
......@@ -100,8 +100,18 @@ export async function findFuHuaQiByToken(token:string) {
/**
* 获取所有孵化器
* @param selectParam 查询参数
* @param skipCount 跳过数量
* @returns [] 孵化器列表
*/
export async function findFuHuaQiList(selectParam, skipCount) {
return await fuHuaQiModel.find(selectParam).skip(skipCount).limit(10);
}
/**
* 获取所有孵化器
* @param selectParam 查询参数
* @returns number 数据数量
*/
export async function findFuHuaQiCount(selectParam) {
return await fuHuaQiModel.find(selectParam).count();
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment