Commit 211390f9 by 兰国旗

laolan

parents a9b342f5 ee22c06d
......@@ -266,8 +266,16 @@ class Consultation extends APIBase {
case "HAINAN":
pobj.area = "海南";
break;
case "GUANGZHOU":
pobj.area = "广州";
break;
case "SHENZHEN":
pobj.area = "深圳";
break;
case "QUANGUO":
pobj.area = "全国";
break;
default:
pobj.area = "";
break;
}
}
......
......@@ -172,7 +172,6 @@ class Order extends APIBase {
pobj.area = "34";
break;
default:
pobj.area = "";
break;
}
}
......
......@@ -48,6 +48,7 @@ class Need extends APIBase {
opResult = await this.utilsNeedSve.needDetailByChannelNo(pobj, pobj.actionBody);
break;
case "getItemByChannelNeedNo":
case "getSolutionByChannelSolutionNo":
opResult = await this.utilsNeedSve.getItemByChannelNeedNo(pobj, pobj.actionBody);
break;
case "getItemByNeedNo":
......
......@@ -49,7 +49,10 @@ const cityLetter = {
"内蒙古":"NEIMENGGU",
"西藏":"XIZANG",
"外资":"WAIZI",
"海南":"HAINAN"
"海南":"HAINAN",
"广州":"GUANGZHOU",
"深圳":"SHENZHEN",
"全国":"QUANGUO"
}
//baidu pinyinzhuanyong 2020-11-6
......@@ -209,7 +212,7 @@ class BaseCenterOrderService extends AppServiceBase {
if (actionBody.channelSolutionNo) {
pushObj["BizId"] = actionBody.channelSolutionNo;
}
pushRes = await this.pushIcpSolution(pushObj, actionBody.solutionNo, actionBody.appInfo, self);
pushRes = await this.pushIcpSolution(pushObj, actionBody.solutionNo, pobj.appInfo, self);
}
if(actionBody.uapp_id == uappId.baidu){
//推送数据至baidu
......@@ -224,7 +227,7 @@ class BaseCenterOrderService extends AppServiceBase {
if (actionBody.channelSolutionNo) {
pushObj["bizId"] = actionBody.channelSolutionNo;
}
pushRes = await this.pushBaiduIcpSolution(pushObj, actionBody.solutionNo, actionBody.appInfo, self);
pushRes = await this.pushBaiduIcpSolution(pushObj, actionBody.solutionNo, pobj.appInfo, self);
}
this.logCtl.info({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
......
......@@ -629,6 +629,12 @@ class CenterorderService extends AppServiceBase {
} else if (pobj.actionBody.channelItemCode == '7') {
pobj.actionBody.regType = "baidu.edi";
}
else if (pobj.actionBody.channelItemCode == 'NC') {
pobj.actionBody.regType = "baidu.wangwen";
}
else if (pobj.actionBody.channelItemCode == 'RT') {
pobj.actionBody.regType = "baidu.radiotv";
}
var fqobj = {
actionBody: {
area: pobj.actionBody.province,
......
......@@ -51,6 +51,7 @@ class SignService{
if (!params.sign) {
return system.getResult(null, "请求参数sign为空");
}
delete params.requestId;
var signArr = [];
var keys = Object.keys(params).sort();
if (keys.length == 0) {
......@@ -157,21 +158,21 @@ module.exports = SignService;
// "status":"16"
// }
// var obj = {
// "bizId":"OD2020110629779501",
// "companyInfo":{
// "companyName":"苏州磐荣信息科技有限公司",
// "taxpayerTypeEnum":"NORMAL_TAXPAYER",
// "acctgSystemId":"10001",
// "enterpriseFormEnum":"1",
// "taxIndustryId":1,
// "taxNo":"123456789",
// "serviceTypeEnum":"ACCOUTING",
// "taxClaimMethodEnum":"TAX_DECLARATION"
// },
// "contactMobile":"18550295628",
// "contactName":"范锋华",
// "timeUnit":"year",
// "quantity":1
// "bizId": "OD2020111241779233",
// "companyInfo": {
// "corpName": "上海王勇商务软件系统有限公司",
// "taxpayerTypeEnum": "NORMAL_TAXPAYER",
// "acctgSystemId": "10008",
// "enterpriseFormEnum": "OTHERS",
// "taxIndustryId": 10000,
// "taxNo": "91310114772112002K",
// "serviceTypeEnum": "ACCOUTING",
// "taxClaimMethodEnum": "TAX_DECLARATION"
// },
// "contactMobile": "16710500888",
// "contactName": "王勇",
// "quantity": 1,
// "timeUnit": "year"
// }
// }
......
......@@ -22,6 +22,14 @@ class UtilsChannelPartnerService extends AppServiceBase {
}
var actionbody = pobj.actionBody;
var interface_params_info = verifyResult.data;
var signRes = await this.signSve.createSign({ "identifyCode": interface_params_info.identifyCode,actionBody:pobj.actionBody,actionType: interface_params_info.actionType},pobj.appInfo.uapp_secret);
if(signRes && signRes.status==0){
verifyResult.sign=signRes.data;
}else{
var createSignResult = system.getResult(null, "creatSign fail!,100470");
return await this.disposePushResultFail(pobj, createSignResult, "deliver->pushBusiness2Channel->verifyResult", this.pushlogFailType.FQ);
}
if(interface_params_info.headData){
interface_params_info.headData.appcode = pobj.appInfo.app_code;
interface_params_info.headData.sign = verifyResult.sign;
......@@ -78,12 +86,12 @@ class UtilsChannelPartnerService extends AppServiceBase {
if(!pobj || !pobj.appInfo || !pobj.appInfo.app_code){
verify = system.getResult(null, "appInfo can not be empty,100450");
}
var signRes = await this.signSve.createSign({actionBody:pobj.actionBody,actionType: interface_params_info.actionType},pobj.appInfo.uapp_secret);
if(signRes && signRes.status==0){
verify.sign=signRes.data;
}else{
verify = system.getResult(null, "creatSign fail!,100470");
}
// var signRes = await this.signSve.createSign({actionBody:pobj.actionBody,actionType: interface_params_info.actionType},pobj.appInfo.uapp_secret);
// if(signRes && signRes.status==0){
// verify.sign=signRes.data;
// }else{
// verify = system.getResult(null, "creatSign fail!,100470");
// }
verify.data = interface_params_info;
console.log(verify,"app/base/service/impl/utilsSve/utilsChannelPartnerSve.js____verifyParam___________________");
return verify;
......
......@@ -189,6 +189,19 @@ class UtilsNeedService extends AppServiceBase {
return itemResult;
}
/**
* 获取方案详情
* @param {*} pobj
* @param {*} actionBody needNo 需求号
*/
async getSolutionByChannelSolutionNo(pobj, actionBody) {
if (!actionBody.bizId) {
return system.getResult(null, "actionBody.bizId can not be empty,100390");
}
var reqUrl = this.centerOrderUrl + "action/need/springBoard";
var itemResult = await this.restPostUrl(pobj, reqUrl);
return itemResult;
}
/**
* 获取需求详情
* @param {*} pobj
* @param {*} actionBody bizId 渠道方案号
......@@ -384,6 +397,7 @@ class UtilsNeedService extends AppServiceBase {
pobj.actionType = "receiveIcpStatusNotify";
var url = settings.centerOrderUrl() + "action/qcapi/springBoard";
var rtn = await this.restPostUrl(pobj, url);
console.log("receiveIcpStatusNotify-->",rtn)
if (actionBody.status == 2) {
var deliveryObj = {
actionBody: {
......@@ -1322,9 +1336,9 @@ class UtilsNeedService extends AppServiceBase {
* @param {*} actionBody
*/
async submitNeed2(pobj, actionBody) {
if (actionBody.type == "esp.wangwen" || actionBody.type == "esp.food") {
actionBody.area = this.wangwenAreaChange(actionBody.area)
}
// if (actionBody.type == "esp.wangwen" || actionBody.type == "esp.food") {
// actionBody.area = this.wangwenAreaChange(actionBody.area)
// }
if (!actionBody.intentionBizId) {
return system.getResult(null, "actionBody.intentionBizId can not be empty,100380");
}
......@@ -1348,8 +1362,10 @@ class UtilsNeedService extends AppServiceBase {
pobj.actionBody.type = "baidu.icp";
} else if (pobj.actionBody.channel_type_code == 7) {
pobj.actionBody.type = "baidu.edi";
} else if (pobj.actionBody.channel_type_code == "tmjy") {
pobj.actionBody.type = "baidu.tmd";
} else if (pobj.actionBody.channel_type_code == "NC") {
pobj.actionBody.type = "baidu.wangwen";
} else if (pobj.actionBody.channel_type_code == "RT") {
pobj.actionBody.type = "baidu.radiotv";
}
if (pobj.actionBody.description && pobj.actionBody.description.indexOf("备#") < 0) {
pobj.actionBody.level = "A";
......
......@@ -6,14 +6,16 @@ class dingClient {
}
//推送峰擎异常提醒
async gatewayPushError(err) {
let c = `注意提醒:阿里->推送峰擎异常,老板们加油,加油,加油 !!!${JSON.stringify(err)}`
let t = new Date().toLocaleString()
this.execClient.execPost({
"msgtype": "text",
"text": {"content": t + c}
}, this.gatewayurl).catch(alierr=>{
console.log(alierr)
});
if (process.env.APP_ENV === "prod") {
let c = `注意提醒:阿里->推送峰擎异常,老板们加油,加油,加油 !!!${JSON.stringify(err)}`
let t = new Date().toLocaleString()
this.execClient.execPost({
"msgtype": "text",
"text": {"content": t + c}
}, this.gatewayurl).catch(alierr => {
console.log(alierr)
});
}
}
}
module.exports = dingClient;
......@@ -3,7 +3,11 @@ var settings = {
host: "39.107.234.14",
port: 6379,
password: "123123",
<<<<<<< HEAD
db: 4,
=======
db: 5,
>>>>>>> ee22c06d663d0b78a7cdead69c8849172aa9fa5a
},
database: {
dbname: "igirl_api",
......
......@@ -381,6 +381,11 @@ var settings = {
}
} else {
// 2020 1106 lin 正式环境还未给出
// 2020 1119 lin 正式环境已经给出,鲁班说不变 后期可能换成动态的
return {
appid: "10015683988",
appkey: "b74b73acf78cc2851aa559e93c84f7888adq23we"
}
}
},
pannongUrl: function() {
......@@ -388,6 +393,8 @@ var settings = {
return "http://39.101.172.142:8980/"
} else {
// 2020 1106 lin 正式环境还未给出
// 2020 1119 lin 正式环境已经给出,鲁班发的ip
return "http://139.196.159.202:8980/"
}
}
};
......
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