Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
fe95d608
Commit
fe95d608
authored
Apr 13, 2021
by
兰国旗
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
e15e2a1e
692ffec2
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
273 additions
and
191 deletions
+273
-191
center-channel/app/base/api/impl/action/icbcTools.js
+5
-2
center-channel/app/base/api/impl/opaction/order.js
+7
-0
center-channel/app/base/api/impl/opreceive/need.js
+0
-3
center-channel/app/base/service/app.base.js
+31
-107
center-channel/app/base/service/impl/trademark/icbcSve.js
+92
-1
center-channel/app/base/service/impl/utilsSve/utils360Sve.js
+1
-1
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
+5
-1
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+10
-20
center-channel/app/base/service/impl/utilsSve/utilsProductSve.js
+41
-2
center-channel/app/base/system.js
+72
-39
center-channel/app/base/utils/dingClient.js
+5
-5
center-channel/app/config/businessConfig.js
+1
-1
center-channel/app/config/localsettings.js
+3
-3
center-channel/app/config/settings.js
+0
-6
No files found.
center-channel/app/base/api/impl/action/icbcTools.js
View file @
fe95d608
...
@@ -36,8 +36,11 @@ class IcbcToolsAPI extends WEBBase {
...
@@ -36,8 +36,11 @@ class IcbcToolsAPI extends WEBBase {
case
"getCompanyIcpByName"
:
//工商icp证照查询
case
"getCompanyIcpByName"
:
//工商icp证照查询
opResult
=
await
this
.
icbcSve
.
getCompanyIcpByName
(
action_body
,
req
);
opResult
=
await
this
.
icbcSve
.
getCompanyIcpByName
(
action_body
,
req
);
break
;
break
;
case
"searchCertification"
:
//企业证书查询
// case "searchCertification"://企业证书查询
opResult
=
await
this
.
icbcSve
.
searchCertification
(
action_body
,
req
);
// opResult = await this.icbcSve.searchCertification(action_body,req);
// break;
case
"searchCertification"
:
//企业证书查询(综合)
opResult
=
await
this
.
icbcSve
.
getLicenseList
(
action_body
,
req
);
break
;
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
...
...
center-channel/app/base/api/impl/opaction/order.js
View file @
fe95d608
...
@@ -6,6 +6,7 @@ class ProductAPI extends WEBBase {
...
@@ -6,6 +6,7 @@ class ProductAPI extends WEBBase {
constructor
()
{
constructor
()
{
super
();
super
();
this
.
utilsOrderSve
=
system
.
getObject
(
"service.utilsSve.utilsOrderSve"
);
this
.
utilsOrderSve
=
system
.
getObject
(
"service.utilsSve.utilsOrderSve"
);
this
.
utilsProductSve
=
system
.
getObject
(
"service.utilsSve.utilsProductSve"
);
}
}
/**
/**
...
@@ -41,6 +42,9 @@ class ProductAPI extends WEBBase {
...
@@ -41,6 +42,9 @@ class ProductAPI extends WEBBase {
case
"getOrderInfo"
:
//获取订单列表信息
case
"getOrderInfo"
:
//获取订单列表信息
opResult
=
await
this
.
utilsOrderSve
.
getOrderInfo
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsOrderSve
.
getOrderInfo
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
case
"getPathName"
:
opResult
=
await
this
.
utilsProductSve
.
getAllPathName
(
pobj
);
break
;
case
"getOrderStatisticsByUappId"
:
case
"getOrderStatisticsByUappId"
:
opResult
=
await
this
.
utilsOrderSve
.
getOrdersStatisticsByUappId
(
pobj
);
opResult
=
await
this
.
utilsOrderSve
.
getOrdersStatisticsByUappId
(
pobj
);
break
;
break
;
...
@@ -95,6 +99,9 @@ class ProductAPI extends WEBBase {
...
@@ -95,6 +99,9 @@ class ProductAPI extends WEBBase {
case
"receiveAliTmOrder"
:
//接收阿里商标订单
case
"receiveAliTmOrder"
:
//接收阿里商标订单
opResult
=
await
this
.
utilsOrderSve
.
receiveAliTmOrder
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsOrderSve
.
receiveAliTmOrder
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
case
"receiveAliTmStatus"
:
//接收阿里商标状态
opResult
=
await
this
.
utilsOrderSve
.
receiveAliTmStatus
(
pobj
,
pobj
.
actionBody
);
break
;
case
"receiveAliTmOrderRefund"
:
//接收阿里商标订单退款信息
case
"receiveAliTmOrderRefund"
:
//接收阿里商标订单退款信息
opResult
=
await
this
.
utilsOrderSve
.
receiveAliTmOrderRefund
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsOrderSve
.
receiveAliTmOrderRefund
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
...
...
center-channel/app/base/api/impl/opreceive/need.js
View file @
fe95d608
...
@@ -50,9 +50,6 @@ class Need extends APIBase {
...
@@ -50,9 +50,6 @@ class Need extends APIBase {
opResult
=
await
this
.
utilsNeedSve
.
getItemByChannelNeedNo
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsNeedSve
.
getItemByChannelNeedNo
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
case
"getSolutionByChannelSolutionNo"
:
case
"getSolutionByChannelSolutionNo"
:
opResult
=
await
this
.
utilsNeedSve
.
getItemByChannelNeedNo
(
pobj
,
pobj
.
actionBody
);
break
case
"getSolutionByChannelSolutionNo"
:
opResult
=
await
this
.
utilsNeedSve
.
getSolutionByChannelSolutionNo
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsNeedSve
.
getSolutionByChannelSolutionNo
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
case
"getItemByNeedNo"
:
case
"getItemByNeedNo"
:
...
...
center-channel/app/base/service/app.base.js
View file @
fe95d608
...
@@ -60,18 +60,9 @@ class AppServiceBase {
...
@@ -60,18 +60,9 @@ class AppServiceBase {
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
return
result
;
return
result
;
}
catch
(
e
)
{
}
catch
(
e
)
{
var
errorMsg
=
"error:"
+
e
.
stack
;
const
stackStr
=
e
.
stack
?
e
.
stack
:
JSON
.
stringify
(
e
);
//日志记录
this
.
execClientNew
.
execLogs
(
`推送操作异常-api-center-channel-url:
${
url
}
`
,
pobj
,
"center-channel-restPostUrl"
,
null
,
stackStr
);
this
.
logCtl
.
error
({
return
system
.
getResult
(
null
,
stackStr
);
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/app.base.js/restPostUrl"
,
content
:
errorMsg
,
// clientIp: pobj.clientIp,
optitle
:
pobj
.
opType
+
"推送操作异常->restPostUrl"
,
});
return
system
.
getResult
(
null
,
errorMsg
);
}
}
}
}
...
@@ -87,18 +78,9 @@ class AppServiceBase {
...
@@ -87,18 +78,9 @@ class AppServiceBase {
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
return
result
;
return
result
;
}
catch
(
e
)
{
}
catch
(
e
)
{
var
errorMsg
=
"error:"
+
e
.
stack
;
const
stackStr
=
e
.
stack
?
e
.
stack
:
JSON
.
stringify
(
e
);
//日志记录
this
.
execClientNew
.
execLogs
(
`操作异常-api-center-channel-url:
${
url
}
`
,
pobj
,
"center-channel-restPostWithHValueUrl"
,
null
,
stackStr
);
this
.
logCtl
.
error
({
return
system
.
getResult
(
null
,
stackStr
);
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/app.base.js/restPostWithHValueUrl"
,
content
:
errorMsg
,
// clientIp: pobj.clientIp,
optitle
:
pobj
.
opType
+
"推送操作异常->restPostWithHValueUrl"
,
});
return
system
.
getResult
(
null
,
errorMsg
);
}
}
}
}
...
@@ -111,18 +93,9 @@ class AppServiceBase {
...
@@ -111,18 +93,9 @@ class AppServiceBase {
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
return
result
;
return
result
;
}
catch
(
e
)
{
}
catch
(
e
)
{
var
errorMsg
=
"error:"
+
e
.
stack
;
const
stackStr
=
e
.
stack
?
e
.
stack
:
JSON
.
stringify
(
e
);
//日志记录
this
.
execClientNew
.
execLogs
(
`操作异常-api-center-channel-url:
${
url
}
`
,
pobj
,
"center-channel-restPostWithHAuthorizationUrl"
,
null
,
stackStr
);
this
.
logCtl
.
error
({
return
system
.
getResult
(
null
,
stackStr
);
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/app.base.js/restPostWithHAuthorizationUrl"
,
content
:
errorMsg
,
// clientIp: pobj.clientIp,
optitle
:
pobj
.
opType
+
"推送操作异常->restPostWithHAuthorizationUrl"
,
});
return
system
.
getResult
(
null
,
errorMsg
);
}
}
}
}
...
@@ -135,18 +108,9 @@ class AppServiceBase {
...
@@ -135,18 +108,9 @@ class AppServiceBase {
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
return
result
;
return
result
;
}
catch
(
e
)
{
}
catch
(
e
)
{
var
errorMsg
=
"error:"
+
e
.
stack
;
const
stackStr
=
e
.
stack
?
e
.
stack
:
JSON
.
stringify
(
e
);
//日志记录
this
.
execClientNew
.
execLogs
(
`操作异常-api-center-channel-url:
${
url
}
`
,
pobj
,
"center-channel-restPostWithHAuthorizationUrl"
,
null
,
stackStr
);
this
.
logCtl
.
error
({
return
system
.
getResult
(
null
,
stackStr
);
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/app.base.js/execPostUrl"
,
content
:
errorMsg
,
// clientIp: pobj.clientIp,
optitle
:
pobj
.
opType
+
"基类操作异常->execPostUrl"
,
});
return
system
.
getResult
(
null
,
errorMsg
);
}
}
}
}
...
@@ -177,49 +141,13 @@ class AppServiceBase {
...
@@ -177,49 +141,13 @@ class AppServiceBase {
var
rtn
=
await
aliyunClient
.
reqCustomByGet
(
params
);
var
rtn
=
await
aliyunClient
.
reqCustomByGet
(
params
);
return
rtn
;
return
rtn
;
}
catch
(
e
)
{
}
catch
(
e
)
{
var
errorMsg
=
"error:"
+
e
.
stack
;
params
.
appInfo
=
pobj
.
appInfo
;
//日志记录
const
stackStr
=
e
.
stack
?
e
.
stack
:
JSON
.
stringify
(
e
);
this
.
logCtl
.
error
({
this
.
execClientNew
.
execLogs
(
`推送操作异常-api-center-channel`
,
params
,
"center-channel-opAliyunRpcReq"
,
null
,
stackStr
);
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
return
system
.
getResult
(
null
,
stackStr
);
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/impl/utilsSve/opAliyunClientPost.js/opAliyunRpcReq"
,
content
:
errorMsg
,
// clientIp: pobj.clientIp,
optitle
:
pobj
.
opType
+
"推送操作异常->opAliyunRpcReq"
,
});
return
system
.
getResult
(
null
,
errorMsg
);
}
}
}
}
// /**
// * 阿里RPC调用-post请求
// * @param {*} pobj {action: rpcParam.action,reqbody: pobj.actionBody,rpcParam: rpcParam}
// * @param {*} params {为阿里的接口参数}
// */
// async opAliyunRpcReqByPost(pobj, params) {
// try {
// // var action = obj.action;
// // var reqbody = obj.reqbody;
// // var rpcParam = obj.rpcParam;
// var aliyunClient = system.getObject("util.aliyunClient");
// var rtn = await aliyunClient.reqCustomByPost(params);
// return rtn;
// } catch (e) {
// var errorMsg = "error:" + e.stack;
// //日志记录
// this.logCtl.error({
// appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
// appkey: pobj.appInfo ? pobj.appInfo.uapp_key || "" : "",
// requestId: pobj.requestId || "",
// op: "service/impl/utilsSve/opAliyunClientPost.js/opAliyunRpcReqByPost",
// content: errorMsg,
// // clientIp: pobj.clientIp,
// optitle: pobj.opType + "推送操作异常->opAliyunRpcReqByPost",
// });
// return system.getResult(null, errorMsg);
// }
// }
/**
/**
* 处理成功后的信息
* 处理成功后的信息
* @param {*} pobj
* @param {*} pobj
...
@@ -249,7 +177,7 @@ class AppServiceBase {
...
@@ -249,7 +177,7 @@ class AppServiceBase {
let
url
=
settings
.
centerOrderUrl
()
+
'action/opNeed/springBoard'
;
let
url
=
settings
.
centerOrderUrl
()
+
'action/opNeed/springBoard'
;
this
.
execPostByTimeOut
(
null
,
pobj
,
url
,
null
,
null
,
60
);
this
.
execPostByTimeOut
(
null
,
pobj
,
url
,
null
,
null
,
60
);
}
}
if
([
"pushOrder"
,
"pushOrderBusiness"
,
"pushOrderICPBusiness"
].
includes
(
opType
)
&&
pobj
.
actionBody
&&
pobj
.
actionBody
.
orderNo
)
{
if
([
"pushOrder"
,
"pushOrderBusiness"
,
"pushOrderICPBusiness"
,
"pushOrderICPBusinessNew"
].
includes
(
opType
)
&&
pobj
.
actionBody
&&
pobj
.
actionBody
.
orderNo
)
{
pobj
.
actionBody
.
pushNumber
=
pobj
.
pushNumber
||
1
;
pobj
.
actionBody
.
pushNumber
=
pobj
.
pushNumber
||
1
;
pobj
.
actionBody
.
pushStatus
=
3
;
//推送状态0待推送2推送失败3已成功推送
pobj
.
actionBody
.
pushStatus
=
3
;
//推送状态0待推送2推送失败3已成功推送
this
.
disposeOrderPush
(
pobj
);
this
.
disposeOrderPush
(
pobj
);
...
@@ -267,6 +195,14 @@ class AppServiceBase {
...
@@ -267,6 +195,14 @@ class AppServiceBase {
async
disposePushResultFail
(
pobj
,
result
,
opTitleDesc
,
failType
)
{
//处理失败的结果信息--内部使用
async
disposePushResultFail
(
pobj
,
result
,
opTitleDesc
,
failType
)
{
//处理失败的结果信息--内部使用
var
opType
=
pobj
.
opType
||
""
;
var
opType
=
pobj
.
opType
||
""
;
let
pushNumber
=
pobj
.
pushNumber
||
1
;
let
pushNumber
=
pobj
.
pushNumber
||
1
;
if
(
pushNumber
==
10
)
{
pobj
.
actionBody
.
pushNumber
=
pushNumber
;
pobj
.
actionBody
.
pushStatus
=
2
;
//推送状态0待推送2推送失败3已成功推送
this
.
disposeOrderPush
(
pobj
);
if
(
result
.
errorMsg
&&
result
.
errorMsg
==
"订单产品查询出来产品与传递得产品数量不一致"
)
{
this
.
disposeOrderPushFailSendDing
(
pobj
);
}
}
let
resultInfo
=
JSON
.
stringify
(
result
);
let
resultInfo
=
JSON
.
stringify
(
result
);
this
.
pushlogSve
.
createFailLogDb
({
this
.
pushlogSve
.
createFailLogDb
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
...
@@ -280,12 +216,6 @@ class AppServiceBase {
...
@@ -280,12 +216,6 @@ class AppServiceBase {
pushNumber
:
pushNumber
pushNumber
:
pushNumber
});
});
result
.
data
=
null
;
result
.
data
=
null
;
if
(
pushNumber
==
10
&&
resultInfo
.
indexOf
(
"订单产品查询出来产品与传递得产品数量不一致,请重新选择"
)
>=
0
)
{
pobj
.
actionBody
.
pushNumber
=
pushNumber
;
pobj
.
actionBody
.
pushStatus
=
2
;
//推送状态0待推送2推送失败3已成功推送
this
.
disposeOrderPushFailSendDing
(
pobj
);
this
.
disposeOrderPush
(
pobj
);
}
return
result
;
return
result
;
}
}
...
@@ -309,11 +239,11 @@ class AppServiceBase {
...
@@ -309,11 +239,11 @@ class AppServiceBase {
}
}
async
getAliossjavaFileUrl
(
pobj
,
params
)
{
//上传ali oss 文件调用
async
getAliossjavaFileUrl
(
pobj
,
params
)
{
//上传ali oss 文件调用
var
opType
=
pobj
.
opType
||
""
;
let
opType
=
pobj
.
opType
||
""
;
try
{
try
{
var
aliOssFileInfo
=
await
this
.
execPostUrl
(
params
,
settings
.
aliossjavaUrl
());
let
aliOssFileInfo
=
await
this
.
execPostUrl
(
params
,
settings
.
aliossjavaUrl
());
if
(
aliOssFileInfo
==
true
)
{
if
(
aliOssFileInfo
==
true
)
{
var
fileUrl
=
params
.
filedir
+
"/"
+
params
.
objectName
;
let
fileUrl
=
params
.
filedir
+
"/"
+
params
.
objectName
;
return
system
.
getResultSuccess
(
fileUrl
);
return
system
.
getResultSuccess
(
fileUrl
);
}
}
this
.
pushlogSve
.
createFailLogDb
({
this
.
pushlogSve
.
createFailLogDb
({
...
@@ -329,15 +259,9 @@ class AppServiceBase {
...
@@ -329,15 +259,9 @@ class AppServiceBase {
});
});
return
system
.
getResult
(
null
,
"java ali oss upload fail"
);
return
system
.
getResult
(
null
,
"java ali oss upload fail"
);
}
catch
(
e
)
{
}
catch
(
e
)
{
this
.
logCtl
.
error
({
params
.
appInfo
=
pobj
.
appInfo
;
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
const
stackStr
=
e
.
stack
?
e
.
stack
:
JSON
.
stringify
(
e
);
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
this
.
execClientNew
.
execLogs
(
`aliossjava-upload阿里上传文件操作异常-api-center-channel`
,
params
,
"center-channel-getAliossjavaFileUrl"
,
null
,
stackStr
);
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/app.base.js/getAliossjavaFileUrl"
,
content
:
"error:"
+
e
.
stack
,
// clientIp: pobj.clientIp,
optitle
:
pobj
.
opType
||
""
+
"aliossjava-upload阿里上传文件操作异常->getAliossjavaFileUrl"
,
});
return
system
.
getResult
(
-
200
,
"java ali oss upload error"
);
return
system
.
getResult
(
-
200
,
"java ali oss upload error"
);
}
}
}
}
...
...
center-channel/app/base/service/impl/trademark/icbcSve.js
View file @
fe95d608
...
@@ -85,6 +85,7 @@ class IcbcService extends AppServiceBase {
...
@@ -85,6 +85,7 @@ class IcbcService extends AppServiceBase {
"accessKey"
:
"111"
,
"accessKey"
:
"111"
,
"accessSecret"
:
"222"
"accessSecret"
:
"222"
}
}
req
.
headers
.
token
=
'sss'
let
ret
=
await
this
.
opReqResult
(
url
,
params
,
req
);
let
ret
=
await
this
.
opReqResult
(
url
,
params
,
req
);
if
(
ret
.
status
!=
1
)
{
if
(
ret
.
status
!=
1
)
{
return
system
.
getResultFail
(
-
1
,
'获取开放平台token失败'
);
return
system
.
getResultFail
(
-
1
,
'获取开放平台token失败'
);
...
@@ -94,8 +95,10 @@ class IcbcService extends AppServiceBase {
...
@@ -94,8 +95,10 @@ class IcbcService extends AppServiceBase {
url
=
settings
.
icNameUrl
()
+
"openPlatform/busenterprise/cloudapi"
;
url
=
settings
.
icNameUrl
()
+
"openPlatform/busenterprise/cloudapi"
;
//资质查询
//资质查询
let
data
=
{
let
data
=
{
// "path": "/apis/dst/patents/getLicense",
"path"
:
"/apis/dst/patents/certificate"
,
"path"
:
"/apis/dst/patents/certificate"
,
"name"
:
queryobj
.
companyName
"name"
:
queryobj
.
companyName
,
"pageNum"
:
1
};
};
let
rtn
=
await
this
.
execClient
.
restGetWithHAuthorizationUrl
(
token
,
url
,
data
);
let
rtn
=
await
this
.
execClient
.
restGetWithHAuthorizationUrl
(
token
,
url
,
data
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
if
(
!
rtn
||
!
rtn
.
stdout
)
{
...
@@ -121,6 +124,94 @@ class IcbcService extends AppServiceBase {
...
@@ -121,6 +124,94 @@ class IcbcService extends AppServiceBase {
}
}
/**
* 获取资质证书(集合)
* @param obj
* @param req
* @returns {Promise<void>}
*/
async
getLicenseList
(
obj
,
req
){
let
companyName
=
obj
.
companyName
;
let
url
=
settings
.
icNameUrl
()
+
'openPlatform/platform/getToken'
;
let
params
=
{
"accessKey"
:
"111"
,
"accessSecret"
:
"222"
}
req
.
headers
.
token
=
'sss'
let
ret
=
await
this
.
opReqResult
(
url
,
params
,
req
);
if
(
ret
.
status
!=
1
)
{
return
system
.
getResultFail
(
-
1
,
'获取开放平台token失败'
);
}
let
token
=
ret
.
data
;
let
url2
=
settings
.
icNameUrl
()
+
"/openPlatform/busenterprise/cloudapi"
;
let
params1
=
{
"path"
:
"/apis/dst/patents/certificate"
,
"name"
:
companyName
,
"pageNum"
:
1
}
let
params2
=
{
"path"
:
"/apis/dst/patents/getLicense"
,
"name"
:
companyName
,
"pageNum"
:
1
}
let
params3
=
{
"companyName"
:
companyName
}
let
funcs
=
[];
funcs
.
push
(
this
.
execClient
.
restGetWithHAuthorizationUrl
(
token
,
url2
,
params1
));
funcs
.
push
(
this
.
execClient
.
restGetWithHAuthorizationUrl
(
token
,
url2
,
params2
));
funcs
.
push
(
this
.
getCompanyIcpByName
(
params3
,
req
));
let
results
=
await
Promise
.
all
(
funcs
);
if
(
results
.
length
==
0
){
return
system
.
getResultFail
(
-
1
,
'查询失败,请稍后再试'
);
}
let
ret1
=
JSON
.
parse
(
results
[
0
].
stdout
);
let
ret2
=
JSON
.
parse
(
results
[
1
].
stdout
);
let
ret3
=
results
[
2
];
let
resultData
=
[];
if
(
ret1
.
error_code
==
0
&&
ret1
.
result
.
items
.
length
>
0
){
for
(
let
i
=
0
;
i
<
ret1
.
result
.
items
.
length
;
i
++
){
let
d
=
ret1
.
result
.
items
[
i
];
let
obj
=
{
licencenumber
:
d
.
certNo
,
licencename
:
d
.
certificateName
,
startDate
:
d
.
startDate
,
endDate
:
d
.
endDate
,
detail
:
d
.
detail
};
resultData
.
push
(
obj
);
}
}
if
(
ret2
.
error_code
==
0
&&
ret2
.
result
.
items
.
length
>
0
){
for
(
let
i
=
0
;
i
<
ret2
.
result
.
items
.
length
;
i
++
){
let
d
=
ret2
.
result
.
items
[
i
];
let
obj
=
{
licencenumber
:
d
.
licencenumber
,
licencename
:
d
.
licencename
,
startDate
:
d
.
fromdate
,
endDate
:
d
.
todate
,
detail
:
d
.
detail
};
if
(
!
resultData
.
includes
(
obj
)){
resultData
.
push
(
obj
);
}
}
}
if
(
ret3
.
status
==
0
&&
ret3
.
data
.
list
.
length
>
0
){
for
(
let
i
=
0
;
i
<
ret3
.
data
.
list
.
length
;
i
++
){
let
d
=
ret3
.
data
.
list
[
i
];
let
obj
=
{
licencenumber
:
d
.
liscense
,
licencename
:
"icp备案"
,
examine_date
:
d
.
examine_date
};
resultData
.
push
(
obj
);
}
}
return
system
.
getResultSuccess
(
resultData
);
}
...
...
center-channel/app/base/service/impl/utilsSve/utils360Sve.js
View file @
fe95d608
...
@@ -82,7 +82,7 @@ class utils360Sve extends AppServiceBase {
...
@@ -82,7 +82,7 @@ class utils360Sve extends AppServiceBase {
content
:
JSON
.
stringify
(
pushObj
),
//推送的参数信息
content
:
JSON
.
stringify
(
pushObj
),
//推送的参数信息
resultInfo
:
JSON
.
stringify
(
result
),
resultInfo
:
JSON
.
stringify
(
result
),
returnType
:
'1'
,
returnType
:
'1'
,
logLevel
:
'1'
,
logLevel
:
1
,
opTitle
:
"推送360信息返回成功"
opTitle
:
"推送360信息返回成功"
});
});
}
else
{
}
else
{
...
...
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
View file @
fe95d608
...
@@ -121,7 +121,11 @@ class UtilsFqAliyunService extends AppServiceBase {
...
@@ -121,7 +121,11 @@ class UtilsFqAliyunService extends AppServiceBase {
if
(
rtn
.
success
&&
rtn
.
code
==
200
)
{
if
(
rtn
.
success
&&
rtn
.
code
==
200
)
{
return
system
.
getResultSuccess
(
rtn
.
data
,
"推送成功"
);
return
system
.
getResultSuccess
(
rtn
.
data
,
"推送成功"
);
}
else
{
}
else
{
return
system
.
getResultFail
(
-
1
,
`推送失败,失败原因11:
${
JSON
.
stringify
(
rtn
)}
`
);
let
errorMsg
=
""
;
if
(
rtn
.
errorMessage
&&
rtn
.
errorMessage
.
indexOf
(
"订单产品查询出来产品与传递得产品数量不一致"
)
>=
0
)
{
errorMsg
=
"订单产品查询出来产品与传递得产品数量不一致"
;
}
return
system
.
getResultNewFail
(
-
1
,
`推送失败,失败原因11:
${
JSON
.
stringify
(
rtn
)}
`
,
null
,
errorMsg
);
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
const
stackStr
=
e
.
stack
?
e
.
stack
:
JSON
.
stringify
(
e
);
const
stackStr
=
e
.
stack
?
e
.
stack
:
JSON
.
stringify
(
e
);
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
fe95d608
...
@@ -293,24 +293,9 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -293,24 +293,9 @@ class UtilsOrderService extends AppServiceBase {
let
arr
=
[];
let
arr
=
[];
let
reArr
=
[];
let
reArr
=
[];
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
data
[
i
].
typeCode
==
'10202010202001'
)
{
if
((
temp
!=
data
[
i
].
pathName
&&
temp
!=
""
))
{
data
[
i
].
typeCode
=
'zzsbzc'
;
}
if
(
data
[
i
].
typeCode
==
'10202010202002'
)
{
data
[
i
].
typeCode
=
'fzsbzc'
;
}
if
(
data
[
i
].
typeCode
==
'10202010202003'
)
{
data
[
i
].
typeCode
=
'dbsbzc'
;
}
if
(
data
[
i
].
typeCode
==
'10202010204002'
)
{
data
[
i
].
typeCode
=
'icpsq'
;
}
if
(
data
[
i
].
typeCode
==
'10202010204001'
)
{
data
[
i
].
typeCode
=
'edisq'
;
}
if
((
temp
!=
data
[
i
].
typeCode
&&
temp
!=
""
))
{
let
obj
=
{
let
obj
=
{
type_cod
e
:
temp
,
pathNam
e
:
temp
,
data
:
arr
data
:
arr
}
}
reArr
.
push
(
obj
);
reArr
.
push
(
obj
);
...
@@ -321,10 +306,10 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -321,10 +306,10 @@ class UtilsOrderService extends AppServiceBase {
count
:
data
[
i
].
count
count
:
data
[
i
].
count
}
}
arr
.
push
(
dArr
);
arr
.
push
(
dArr
);
temp
=
data
[
i
].
typeCod
e
;
temp
=
data
[
i
].
pathNam
e
;
if
(
i
==
data
.
length
-
1
)
{
if
(
i
==
data
.
length
-
1
)
{
let
obj
=
{
let
obj
=
{
type_cod
e
:
temp
,
pathNam
e
:
temp
,
data
:
arr
data
:
arr
}
}
reArr
.
push
(
obj
);
reArr
.
push
(
obj
);
...
@@ -1263,7 +1248,7 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -1263,7 +1248,7 @@ class UtilsOrderService extends AppServiceBase {
};
};
this
.
utils360Sve
.
pushOrderStatus
(
pobj
);
this
.
utils360Sve
.
pushOrderStatus
(
pobj
);
//钉钉机器人
//钉钉机器人
this
.
dingClient
.
gatewayPush
ByChannel
(
params
.
orderNo
,
pobj
.
appInf
o
);
this
.
dingClient
.
gatewayPush
To360
(
params
.
orderN
o
);
}
}
opOrderResult
.
data
=
null
;
opOrderResult
.
data
=
null
;
return
opOrderResult
;
return
opOrderResult
;
...
@@ -1732,6 +1717,11 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -1732,6 +1717,11 @@ class UtilsOrderService extends AppServiceBase {
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
return
result
;
return
result
;
}
}
async
receiveAliTmStatus
(
pobj
,
actionBody
)
{
var
reqUrl
=
this
.
centerOrderUrl
+
"action/order/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
return
result
;
}
}
}
module
.
exports
=
UtilsOrderService
;
module
.
exports
=
UtilsOrderService
;
center-channel/app/base/service/impl/utilsSve/utilsProductSve.js
View file @
fe95d608
...
@@ -153,6 +153,44 @@ class UtilsProductService extends AppServiceBase {
...
@@ -153,6 +153,44 @@ class UtilsProductService extends AppServiceBase {
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
return
result
;
return
result
;
}
}
}
module
.
exports
=
UtilsProductService
;
/**
* 根据path_name 聚合
* @param pobj
* @returns {Promise<{msg: string, data, bizmsg: *|string, status: number}|any>}
*/
async
getAllPathName
(
pobj
){
let
url
=
settings
.
centerAppUrl
()
+
'action/opProduct/springBoard'
;
pobj
.
actionType
=
'getAllPathName'
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
result
.
status
!=
0
){
return
system
.
getResultFail
(
-
1
,
'获取数据失败,请稍后再试!'
);
}
let
data
=
result
.
data
;
let
map
=
new
Map
();
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
){
let
item
=
data
[
i
];
let
strs
=
item
.
path_name
.
split
(
'/'
);
let
classOne
=
strs
[
1
];
let
classTwo
=
strs
[
2
];
if
(
map
.
has
(
classOne
)){
let
val
=
map
.
get
(
classOne
);
val
.
push
(
classTwo
)
map
.
set
(
classOne
,
val
);
}
else
{
let
arr
=
[];
arr
.
push
(
classTwo
)
map
.
set
(
classOne
,
arr
);
}
}
let
resultData
=
[];
map
.
forEach
((
v
,
k
)
=>
{
let
obj
=
{};
obj
[
'key'
]
=
k
;
obj
[
'data'
]
=
v
;
resultData
.
push
(
obj
)
})
return
system
.
getResult
(
resultData
);
}
}
module
.
exports
=
UtilsProductService
;
\ No newline at end of file
center-channel/app/base/system.js
View file @
fe95d608
var
fs
=
require
(
"fs"
);
var
fs
=
require
(
"fs"
);
var
objsettings
=
require
(
"../config/objsettings"
);
var
objsettings
=
require
(
"../config/objsettings"
);
var
settings
=
require
(
"../config/settings"
);
var
settings
=
require
(
"../config/settings"
);
class
System
{
class
System
{
static
declare
(
ns
)
{
static
declare
(
ns
)
{
var
ar
=
ns
.
split
(
'.'
);
var
ar
=
ns
.
split
(
'.'
);
...
@@ -15,6 +16,7 @@ class System {
...
@@ -15,6 +16,7 @@ class System {
}
}
}
}
}
}
static
register
(
key
,
ClassObj
)
{
static
register
(
key
,
ClassObj
)
{
if
(
System
.
objTable
[
key
]
!=
null
)
{
if
(
System
.
objTable
[
key
]
!=
null
)
{
throw
new
Error
(
"相同key的对象已经存在"
);
throw
new
Error
(
"相同key的对象已经存在"
);
...
@@ -25,6 +27,7 @@ class System {
...
@@ -25,6 +27,7 @@ class System {
return
System
.
objTable
[
key
];
return
System
.
objTable
[
key
];
}
}
static
getResult
(
data
,
opmsg
=
"操作成功"
,
req
)
{
static
getResult
(
data
,
opmsg
=
"操作成功"
,
req
)
{
return
{
return
{
status
:
!
data
?
-
1
:
0
,
status
:
!
data
?
-
1
:
0
,
...
@@ -33,9 +36,11 @@ class System {
...
@@ -33,9 +36,11 @@ class System {
bizmsg
:
req
&&
req
.
session
&&
req
.
session
.
bizmsg
?
req
.
session
.
bizmsg
:
"empty"
bizmsg
:
req
&&
req
.
session
&&
req
.
session
.
bizmsg
?
req
.
session
.
bizmsg
:
"empty"
};
};
}
}
static
getErrResult2
(
errmsg
)
{
static
getErrResult2
(
errmsg
)
{
return
this
.
getResult2
(
null
,
null
,
null
,
errmsg
);
return
this
.
getResult2
(
null
,
null
,
null
,
errmsg
);
}
}
static
getResult2
(
data
,
req
,
okmsg
=
"操作成功"
,
errmsg
=
"操作失败"
)
{
static
getResult2
(
data
,
req
,
okmsg
=
"操作成功"
,
errmsg
=
"操作失败"
)
{
var
result
=
{
var
result
=
{
status
:
0
,
status
:
0
,
...
@@ -54,11 +59,12 @@ class System {
...
@@ -54,11 +59,12 @@ class System {
}
}
return
result
;
return
result
;
}
}
static
getResult3
(
data
,
req
,
okmsg
=
"操作成功"
,
errmsg
=
"操作失败"
)
{
static
getResult3
(
data
,
req
,
okmsg
=
"操作成功"
,
errmsg
=
"操作失败"
)
{
var
total
=
data
.
total
;
var
total
=
data
.
total
;
data
=
data
.
hits
;
data
=
data
.
hits
;
var
sources
=
[];
var
sources
=
[];
data
.
forEach
(
function
(
d
)
{
data
.
forEach
(
function
(
d
)
{
sources
.
push
(
d
.
_source
);
sources
.
push
(
d
.
_source
);
})
})
var
result
=
{
var
result
=
{
...
@@ -80,20 +86,21 @@ class System {
...
@@ -80,20 +86,21 @@ class System {
}
}
return
result
;
return
result
;
}
}
static
getResult4
(
j
,
req
,
okmsg
=
"操作成功"
,
errmsg
=
"操作失败"
)
{
static
getResult4
(
j
,
req
,
okmsg
=
"操作成功"
,
errmsg
=
"操作失败"
)
{
var
aggs
=
j
.
aggregations
;
var
aggs
=
j
.
aggregations
;
var
codes_count
=
aggs
.
ncl_one_codes_count
;
var
codes_count
=
aggs
.
ncl_one_codes_count
;
var
bucketlist
=
codes_count
.
buckets
;
var
bucketlist
=
codes_count
.
buckets
;
var
bucklist
=
[];
var
bucklist
=
[];
bucketlist
.
forEach
(
function
(
d
)
{
bucketlist
.
forEach
(
function
(
d
)
{
bucklist
.
push
(
d
);
bucklist
.
push
(
d
);
})
})
var
data
=
j
.
hits
;
var
data
=
j
.
hits
;
var
total
=
data
.
total
;
var
total
=
data
.
total
;
var
hit
=
data
.
hits
;
var
hit
=
data
.
hits
;
var
sources
=
[];
var
sources
=
[];
hit
.
forEach
(
function
(
d
)
{
hit
.
forEach
(
function
(
d
)
{
sources
.
push
(
d
.
_source
);
sources
.
push
(
d
.
_source
);
})
})
var
result
=
{
var
result
=
{
...
@@ -115,13 +122,14 @@ class System {
...
@@ -115,13 +122,14 @@ class System {
}
}
return
result
;
return
result
;
}
}
static
getResultjuhe4
(
j
,
req
,
okmsg
=
"操作成功"
,
errmsg
=
"操作失败"
)
{
static
getResultjuhe4
(
j
,
req
,
okmsg
=
"操作成功"
,
errmsg
=
"操作失败"
)
{
var
aggs
=
j
.
aggregations
;
var
aggs
=
j
.
aggregations
;
var
codes_count
=
aggs
.
ncl_one_codes_count
;
var
codes_count
=
aggs
.
ncl_one_codes_count
;
var
bucketlist
=
codes_count
.
buckets
;
var
bucketlist
=
codes_count
.
buckets
;
var
bucklist
=
[];
var
bucklist
=
[];
bucketlist
.
forEach
(
function
(
d
)
{
bucketlist
.
forEach
(
function
(
d
)
{
bucklist
.
push
(
d
);
bucklist
.
push
(
d
);
})
})
var
result
=
{
var
result
=
{
...
@@ -135,44 +143,47 @@ class System {
...
@@ -135,44 +143,47 @@ class System {
}
}
return
result
;
return
result
;
}
}
static
getResultjuhetwo
(
j
,
req
,
okmsg
=
"操作成功"
,
errmsg
=
"操作失败"
)
{
static
getResultjuhetwo
(
j
,
req
,
okmsg
=
"操作成功"
,
errmsg
=
"操作失败"
)
{
var
aggs
=
j
.
aggregations
;
var
aggs
=
j
.
aggregations
;
var
notice_count
=
aggs
.
notice_count
;
var
notice_count
=
aggs
.
notice_count
;
var
bucketlist
=
notice_count
.
buckets
;
var
bucketlist
=
notice_count
.
buckets
;
var
bucklist
=
[];
var
bucklist
=
[];
bucketlist
.
forEach
(
function
(
d
)
{
bucketlist
.
forEach
(
function
(
d
)
{
var
notice_issue
=
d
.
key
;
var
notice_issue
=
d
.
key
;
var
date
=
d
.
date_max
.
value
;
var
date
=
d
.
date_max
.
value
;
var
data
=
{
var
data
=
{
notice_issue
:
notice_issue
,
notice_issue
:
notice_issue
,
date
:
date
date
:
date
}
bucklist
.
push
(
data
);
})
var
result
=
{
status
:
0
,
msg
:
okmsg
,
buckets
:
bucklist
,
};
if
(
!
bucklist
)
{
result
.
status
=
-
1
;
result
.
msg
=
errmsg
;
}
}
return
result
;
bucklist
.
push
(
data
);
})
var
result
=
{
status
:
0
,
msg
:
okmsg
,
buckets
:
bucklist
,
};
if
(
!
bucklist
)
{
result
.
status
=
-
1
;
result
.
msg
=
errmsg
;
}
}
/**
return
result
;
* 请求返回成功
}
* @param {*} data 操作成功返回的数据
* @param {*} okmsg 操作成功的描述
/**
*/
* 请求返回成功
* @param {*} data 操作成功返回的数据
* @param {*} okmsg 操作成功的描述
*/
static
getResultSuccess
(
data
,
okmsg
=
"success"
)
{
static
getResultSuccess
(
data
,
okmsg
=
"success"
)
{
return
{
return
{
status
:
0
,
status
:
0
,
msg
:
okmsg
,
msg
:
okmsg
,
data
:
data
||
"成功"
data
:
data
||
"成功"
};
};
}
}
// 2020 0916 lin 新增返回格式 成功status为1
// 2020 0916 lin 新增返回格式 成功status为1
static
getResultRedisQueueSuccess
(
data
,
okmsg
=
"success"
)
{
static
getResultRedisQueueSuccess
(
data
,
okmsg
=
"success"
)
{
return
{
return
{
status
:
1
,
status
:
1
,
...
@@ -207,6 +218,24 @@ class System {
...
@@ -207,6 +218,24 @@ class System {
data
:
data
,
data
:
data
,
};
};
}
}
/**
* 请求返回失败
* @param status
* @param errmsg
* @param data
* @param errorMsg
* @returns {{msg: string, data: string, status: number, errorMsg: *}}
*/
static
getResultNewFail
(
status
=
-
1
,
errmsg
=
"fail"
,
data
=
""
,
errorMsg
)
{
return
{
status
:
status
,
msg
:
errmsg
,
errorMsg
:
errorMsg
,
data
:
data
,
};
}
static
getObject
(
objpath
)
{
static
getObject
(
objpath
)
{
var
pathArray
=
objpath
.
split
(
"."
);
var
pathArray
=
objpath
.
split
(
"."
);
var
packageName
=
pathArray
[
0
];
var
packageName
=
pathArray
[
0
];
...
@@ -230,6 +259,7 @@ class System {
...
@@ -230,6 +259,7 @@ class System {
return
System
.
register
(
objabspath
,
ClassObj
);
return
System
.
register
(
objabspath
,
ClassObj
);
}
}
}
}
static
getUiConfig
(
appid
)
{
static
getUiConfig
(
appid
)
{
var
configPath
=
settings
.
basepath
+
"/app/base/db/metadata/"
+
appid
+
"/index.js"
;
var
configPath
=
settings
.
basepath
+
"/app/base/db/metadata/"
+
appid
+
"/index.js"
;
if
(
settings
.
env
==
"dev"
)
{
if
(
settings
.
env
==
"dev"
)
{
...
@@ -238,6 +268,7 @@ class System {
...
@@ -238,6 +268,7 @@ class System {
var
configValue
=
require
(
configPath
);
var
configValue
=
require
(
configPath
);
return
configValue
;
return
configValue
;
}
}
static
getUiConfig2
(
appid
)
{
static
getUiConfig2
(
appid
)
{
var
configPath
=
settings
.
basepath
+
"/app/base/db/metadata/index.js"
;
var
configPath
=
settings
.
basepath
+
"/app/base/db/metadata/index.js"
;
// if(settings.env=="dev"){
// if(settings.env=="dev"){
...
@@ -248,6 +279,7 @@ class System {
...
@@ -248,6 +279,7 @@ class System {
var
configValue
=
require
(
configPath
);
var
configValue
=
require
(
configPath
);
return
configValue
[
appid
];
return
configValue
[
appid
];
}
}
static
get_client_ip
(
req
)
{
static
get_client_ip
(
req
)
{
var
ip
=
req
.
headers
[
'x-forwarded-for'
]
||
var
ip
=
req
.
headers
[
'x-forwarded-for'
]
||
req
.
ip
||
req
.
ip
||
...
@@ -296,7 +328,8 @@ class System {
...
@@ -296,7 +328,8 @@ class System {
}
}
}
}
}
}
Date
.
prototype
.
Format
=
function
(
fmt
)
{
//author: meizz
Date
.
prototype
.
Format
=
function
(
fmt
)
{
//author: meizz
var
o
=
{
var
o
=
{
"M+"
:
this
.
getMonth
()
+
1
,
//月份
"M+"
:
this
.
getMonth
()
+
1
,
//月份
"d+"
:
this
.
getDate
(),
//日
"d+"
:
this
.
getDate
(),
//日
...
...
center-channel/app/base/utils/dingClient.js
View file @
fe95d608
...
@@ -5,6 +5,7 @@ class dingClient {
...
@@ -5,6 +5,7 @@ class dingClient {
this
.
execClient
=
system
.
getObject
(
'util.execClient'
);
this
.
execClient
=
system
.
getObject
(
'util.execClient'
);
this
.
gatewayurl
=
"https://oapi.dingtalk.com/robot/send?access_token=2f1ada261ea84f6c621db487ac18d11eba8984202bd82adda8810770a8240572"
this
.
gatewayurl
=
"https://oapi.dingtalk.com/robot/send?access_token=2f1ada261ea84f6c621db487ac18d11eba8984202bd82adda8810770a8240572"
this
.
businessToFqUrl
=
"https://oapi.dingtalk.com/robot/send?access_token=9e215f0f1d77980ee6b39e88a82a7c6e5d290775f76d9a8346e97697f8df9788"
this
.
businessToFqUrl
=
"https://oapi.dingtalk.com/robot/send?access_token=9e215f0f1d77980ee6b39e88a82a7c6e5d290775f76d9a8346e97697f8df9788"
this
.
businessTo360Url
=
"https://oapi.dingtalk.com/robot/send?access_token=2947bdf6163288a5a5c654640e78ea718d21fcae6601efbb4edd53209abc1c45"
;
}
}
//推送峰擎异常提醒
//推送峰擎异常提醒
...
@@ -22,15 +23,14 @@ class dingClient {
...
@@ -22,15 +23,14 @@ class dingClient {
}
}
//渠道钉钉提醒
//渠道钉钉提醒
async
gatewayPushByChannel
(
orderNo
,
appInfo
)
{
async
gatewayPushTo360
(
orderNo
)
{
let
gatewayUrl
=
setttings
.
dingRobotUrl
(
appInfo
.
uapp_id
);
if
(
process
.
env
.
APP_ENV
!=
"dev"
)
{
if
(
settings
.
env
!=
"dev"
&&
gatewayUrl
)
{
let
c
=
`注意提醒:360云商机->有订单待处理,订单号
${
orderNo
}
,老板们加油,加油,加油 !!!`
let
c
=
`注意提醒:
${
appInfo
.
app_name
}
->有订单待处理,订单号
${
orderNo
}
,老板们加油,加油,加油 !!!`
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
}
},
gateway
Url
).
catch
(
err
=>
{
},
this
.
businessTo360
Url
).
catch
(
err
=>
{
console
.
log
(
err
)
console
.
log
(
err
)
});
});
}
}
...
...
center-channel/app/config/businessConfig.js
View file @
fe95d608
...
@@ -18,7 +18,7 @@ module.exports = {
...
@@ -18,7 +18,7 @@ module.exports = {
"rtSubmitMaterial"
,
"rtNotification"
,
"rtSubmitSolution"
,
"rtCloseNeed"
,
"rtClosePlan"
,
"rtSubmitMaterial"
,
"rtNotification"
,
"rtSubmitSolution"
,
"rtCloseNeed"
,
"rtClosePlan"
,
"getParamsFor360"
,
"addOrderWeb"
,
"getPayRecords"
,
"getLoginInfo"
,
"putUserMobileByVcode"
,
"getParamsFor360"
,
"addOrderWeb"
,
"getPayRecords"
,
"getLoginInfo"
,
"putUserMobileByVcode"
,
"putUserPwdByMobile"
,
"icpNotifyNew"
,
"getOrderStatisticsByUappId"
,
"getOrderStatisticsByProduct"
,
"getOrdersComparison"
,
"getOrdersComparisonList"
,
"putUserPwdByMobile"
,
"icpNotifyNew"
,
"getOrderStatisticsByUappId"
,
"getOrderStatisticsByProduct"
,
"getOrdersComparison"
,
"getOrdersComparisonList"
,
"importOrders"
,
"importNeeds"
,
"receiveAliTmOrder"
,
"receiveAliTmOrderRefund"
,
"importOrders"
,
"importNeeds"
,
"receiveAliTmOrder"
,
"receiveAliTmOrderRefund"
,
"receiveAliTmStatus"
,
//百度工商注册
//百度工商注册
"regGetInfoByChannelNeedNo"
,
"submitRegNeed"
,
"regFeedbackSubmit"
,
"regOrderStatus"
,
"regOrderClose"
,
"regGetInfoByChannelNeedNo"
,
"submitRegNeed"
,
"regFeedbackSubmit"
,
"regOrderStatus"
,
"regOrderClose"
,
"getSolutionByChannelOrderNo"
,
"regSubmitSolution"
,
"regNeedClose"
,
"getSolutionByChannelOrderNo"
,
"regSubmitSolution"
,
"regNeedClose"
,
...
...
center-channel/app/config/localsettings.js
View file @
fe95d608
var
settings
=
{
var
settings
=
{
redis
:
{
redis
:
{
host
:
"
39.107.234.14
"
,
host
:
"
59.110.125.77
"
,
port
:
63
79
,
port
:
304
79
,
password
:
"
12312
3"
,
password
:
"
havzMSYc3aBZXOjpG
3"
,
db
:
5
,
db
:
5
,
},
},
database
:
{
database
:
{
...
...
center-channel/app/config/settings.js
View file @
fe95d608
...
@@ -450,12 +450,6 @@ var settings = {
...
@@ -450,12 +450,6 @@ var settings = {
// 2020 1119 lin 正式环境已经给出,鲁班发的ip
// 2020 1119 lin 正式环境已经给出,鲁班发的ip
return
"http://139.196.159.202:8980/"
return
"http://139.196.159.202:8980/"
}
}
},
dingRobotUrl
:
function
(
uapp_id
)
{
if
(
uapp_id
==
50
){
//360云商机
return
"https://oapi.dingtalk.com/robot/send?access_token=2947bdf6163288a5a5c654640e78ea718d21fcae6601efbb4edd53209abc1c45"
;
}
return
""
;
}
}
};
};
module
.
exports
=
settings
;
module
.
exports
=
settings
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment