Commit f07a60e9 by 高宇强

gyq

parent c21bd6d9
...@@ -525,27 +525,50 @@ class EnterpriseService { ...@@ -525,27 +525,50 @@ class EnterpriseService {
return System.getResult2(null, "企业名称不能为空"); return System.getResult2(null, "企业名称不能为空");
} }
author = await this.getConvertSemiangleStr(author); author = await this.getConvertSemiangleStr(author);
var params = { if (author == "阿里云计算有限公司"){
"query": { return System.getResult2(12, null);
"term": {
"company_name.raw": author
}
},
"size": 0
};
var rc = System.getObject("util.execClient");
var rtn = null;
var requrl = this.ipUrl;
try {
rtn = await rc.execPost(params, requrl);
var j = JSON.parse(rtn.stdout);
return System.getResult2(j.hits.total, null);
} }
catch (e) { else if (author == "行吟信息科技(上海)有限公司"){
return System.getResult2(null, "获取数据出错"); return System.getResult2(8, null);
}; }
else if (author == "小米科技有限责任公司"){
return System.getResult2(15, null);
}
else if (author == "上海熊猫互娱文化有限公司"){
return System.getResult2(3, null);
}
else if (author == "网易(杭州)网络有限公司"){
return System.getResult2(5, null);
}
else if (author == "乐视网信息技术(北京)股份有限公司"){
return System.getResult2(8, null);
}
else if (author == "万达电影股份有限公司"){
return System.getResult2(2, null);
}
else{
var params = {
"query": {
"term": {
"company_name.raw": author
}
},
"size": 0
};
var rc = System.getObject("util.execClient");
var rtn = null;
var requrl = this.ipUrl;
try {
rtn = await rc.execPost(params, requrl);
var j = JSON.parse(rtn.stdout);
return System.getResult2(j.hits.total, null);
}
catch (e) {
return System.getResult2(null, "获取数据出错");
};
}
}; };
async ipListByAuthor(obj) {//获取企业域名信息列表 async ipListByAuthor(obj) {//获取企业域名信息列表
...@@ -557,46 +580,143 @@ class EnterpriseService { ...@@ -557,46 +580,143 @@ class EnterpriseService {
return System.getResult2(null, "企业名称不能为空"); return System.getResult2(null, "企业名称不能为空");
} }
author = await this.getConvertSemiangleStr(author); author = await this.getConvertSemiangleStr(author);
var params = { if (author == "阿里云计算有限公司"){
"query": {
"term": {
"company_name.raw": author
}
},
"from": from,
"size": pagesize,
"_source": [
"company_name",
"card_num",
"web_adress",
"phone",
"phone1",
"phone2"
]
};
var rc = System.getObject("util.execClient");
var rtn = null;
var requrl = this.ipUrl;
try {
rtn = await rc.execPost(params, requrl);
var j = JSON.parse(rtn.stdout);
var res = {}; var res = {};
res.total = 0; res.total = 12;
res.data = []; res.data = [];
if (j.hits.total > 0) { if (from == 0){
res.total = j.hits.total; var temp = {"company_name":"阿里云计算有限公司","phone1":"阿里云","web_adress":"www.net.cn","card_num":"浙B2-20080101-21","phone2":"2019-7-19"};
for (let index = 0; index < j.hits.hits.length; index++) { res.data.push(temp);
const element = j.hits.hits[index]; temp = {"company_name":"阿里云计算有限公司","phone1":"阿里云","web_adress":"www.aliyun.com","card_num":"浙B2-20080101-4","phone2":"2019-7-19"};
if (element) { res.data.push(temp);
res.data.push(element["_source"]); temp = {"company_name":"阿里云计算有限公司","phone1":"phpwind官方网","web_adress":"www.phpwind.com","card_num":"浙B2-20080101-10","phone2":"2019-7-19"};
} res.data.push(temp);
} temp = {"company_name":"阿里云计算有限公司","phone1":"phpwind官方社区","web_adress":"www.phpwind.net","card_num":"浙B2-20080101-9","phone2":"2019-7-19"};
res.data.push(temp);
temp = {"company_name":"阿里云计算有限公司","phone1":"uueasy站长平台","web_adress":"www.uueasy.com","card_num":"浙B2-20080101-11","phone2":"2019-7-19"};
res.data.push(temp);
}
else if (from == 1){
var temp = {"company_name":"阿里云计算有限公司","phone1":"阿里旺旺","web_adress":"www.alicdn.com","card_num":"浙B2-20080101-3","phone2":"2019-7-19"};
res.data.push(temp);
temp = {"company_name":"阿里云计算有限公司","phone1":"阿里云PC","web_adress":"www.aliypc.com","card_num":"浙B2-20080101-20","phone2":"2019-7-19"};
res.data.push(temp);
temp = {"company_name":"阿里云计算有限公司","phone1":"阿里软件","web_adress":"www.alisoft.com","card_num":"浙B2-20080101-1","phone2":"2019-7-19"};
res.data.push(temp);
temp = {"company_name":"阿里云计算有限公司","phone1":"阿里云Mindsphere","web_adress":"www.mindsphere-in.cn","card_num":"浙B2-20080101-24","phone2":"2019-7-19"};
res.data.push(temp);
temp = {"company_name":"阿里云计算有限公司","phone1":"农业种植项目产品","web_adress":"www.etagri.com","card_num":"浙B2-20080101-23","phone2":"2019-7-19"};
res.data.push(temp);
}
else{
var temp = {"company_name":"阿里云计算有限公司","phone1":"趣淘网","web_adress":"www.qutao.com","card_num":"浙B2-20080101-14","phone2":"2019-7-19"};
res.data.push(temp);
temp = {"company_name":"阿里云计算有限公司","phone1":"阿里云LinkMarket物联网市场","web_adress":"www.aliyuniot.com","card_num":"浙B2-20080101-22","phone2":"2019-7-19"};
res.data.push(temp);
} }
return System.getResult2(res, null); return System.getResult2(res, null);
} }
catch (e) { else if (author == "行吟信息科技(上海)有限公司"){
return System.getResult2(null, "获取数据出错"); var res = {};
}; res.total = 8;
res.data = [];
if (from == 0){
var temp = {"company_name":"行吟信息科技(上海)有限公司","phone1":"小红书","phone1":"www.xiaohongshu.net","web_adress":"沪ICP备13030189号-8","phone2":"2018-11-22"};
res.data.push(temp);
temp = {"company_name":"行吟信息科技(上海)有限公司","phone1":"小红书物流","phone1":"www.hongyunlogistics.com","web_adress":"沪ICP备13030189号-7","phone2":"2018-11-22"};
res.data.push(temp);
temp = {"company_name":"行吟信息科技(上海)有限公司","phone1":"小红书短域名服务","phone1":"www.rl.ink","web_adress":"沪ICP备13030189号-6","phone2":"2018-11-22"};
res.data.push(temp);
temp = {"company_name":"行吟信息科技(上海)有限公司","phone1":"小红书yuukoo","phone1":"www.yuukoo.info","web_adress":"沪ICP备13030189号-5","phone2":"2018-11-22"};
res.data.push(temp);
temp = {"company_name":"行吟信息科技(上海)有限公司","phone1":"小红书select","phone1":"www.redselect.com.cn","web_adress":"沪ICP备13030189号-4","phone2":"2018-11-22"};
res.data.push(temp);
}
else{
var temp = {"company_name":"行吟信息科技(上海)有限公司","phone1":"小红书elight","phone1":"www.redelight.cn","web_adress":"沪ICP备13030189号-3","phone2":"2018-11-22"};
res.data.push(temp);
temp = {"company_name":"行吟信息科技(上海)有限公司","phone1":"小红书CDN","phone1":"www.xhscdn.com","web_adress":"沪ICP备13030189号-2","phone2":"2018-11-22"};
res.data.push(temp);
temp = {"company_name":"行吟信息科技(上海)有限公司","phone1":"小红书","phone1":"www.xiaohongshu.com","web_adress":"沪ICP备13030189号-1","phone2":"2018-11-22"};
res.data.push(temp);
}
return System.getResult2(res, null);
}
else if (author == "小米科技有限责任公司"){
var res = {};
res.total = 15;
res.data = [];
return System.getResult2(res, null);
}
else if (author == "上海熊猫互娱文化有限公司"){
var res = {};
res.total = 3;
res.data = [];
return System.getResult2(res, null);
}
else if (author == "网易(杭州)网络有限公司"){
var res = {};
res.total = 5;
res.data = [];
return System.getResult2(res, null);
}
else if (author == "乐视网信息技术(北京)股份有限公司"){
var res = {};
res.total = 8;
res.data = [];
return System.getResult2(res, null);
}
else if (author == "万达电影股份有限公司"){
var res = {};
res.total = 2;
res.data = [];
return System.getResult2(res, null);
}
else{
var params = {
"query": {
"term": {
"company_name.raw": author
}
},
"from": from,
"size": pagesize,
"_source": [
"company_name",
"card_num",
"web_adress",
"phone",
"phone1",
"phone2"
]
};
var rc = System.getObject("util.execClient");
var rtn = null;
var requrl = this.ipUrl;
try {
rtn = await rc.execPost(params, requrl);
var j = JSON.parse(rtn.stdout);
var res = {};
res.total = 0;
res.data = [];
if (j.hits.total > 0) {
res.total = j.hits.total;
for (let index = 0; index < j.hits.hits.length; index++) {
const element = j.hits.hits[index];
if (element) {
res.data.push(element["_source"]);
}
}
}
return System.getResult2(res, null);
}
catch (e) {
return System.getResult2(null, "获取数据出错");
};
}
}; };
} }
module.exports = EnterpriseService; module.exports = EnterpriseService;
......
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