Commit 211390f9 by 兰国旗

laolan

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