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
bc3fbd50
Commit
bc3fbd50
authored
May 17, 2021
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
1bd5b2d9
d9b75e60
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
188 additions
and
15 deletions
+188
-15
center-channel/app/base/api/api.base.js
+1
-1
center-channel/app/base/api/impl/action/regapi.js
+4
-0
center-channel/app/base/api/impl/auth/taskapi.js
+2
-2
center-channel/app/base/api/impl/opaction/order.js
+3
-0
center-channel/app/base/api/impl/opreceive/pushAliInfo.js
+56
-0
center-channel/app/base/service/app.base.js
+1
-1
center-channel/app/base/service/impl/common/ncSve.js
+6
-0
center-channel/app/base/service/impl/common/pushlogSve.js
+1
-1
center-channel/app/base/service/impl/common/regCenterOrderSve.js
+0
-0
center-channel/app/base/service/impl/common/rtSve.js
+6
-0
center-channel/app/base/service/impl/utilsSve/utilsAliyunNoteSve.js
+38
-0
center-channel/app/base/service/impl/utilsSve/utilsNeedSve2.js
+5
-5
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+57
-1
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
+3
-3
center-channel/app/config/businessConfig.js
+5
-1
center-channel/app/config/routes/api.js
+0
-0
No files found.
center-channel/app/base/api/api.base.js
View file @
bc3fbd50
...
...
@@ -34,7 +34,7 @@ class APIBase {
return
JSON
.
parse
(
cacheRes
);
}
var
result
=
await
this
[
methodname
](
pobj
,
query
,
req
);
if
(
!
result
.
requestId
)
{
if
(
result
&&
!
result
.
requestId
)
{
result
.
requestId
=
pobj
.
RequestId
?
pobj
.
RequestId
:
pobj
.
requestId
||
req
.
requestId
;
}
this
.
logCtl
.
createDb
({
...
...
center-channel/app/base/api/impl/action/regapi.js
View file @
bc3fbd50
...
...
@@ -6,6 +6,7 @@ class RegAPI extends APIBase {
constructor
()
{
super
();
this
.
regCenterOrderSve
=
system
.
getObject
(
"service.common.regCenterOrderSve"
);
this
.
utilsPushSve
=
system
.
getObject
(
"service.utilsSve.utilsPushSve"
);
}
/**
* 接口跳转-POST请求
...
...
@@ -76,6 +77,9 @@ class RegAPI extends APIBase {
// opResult = await this.regCenterOrderSve.closeOrderDelivery(pobj);
// break;
case
"againPushYf"
:
//单独重新推送数据到云服
opResult
=
await
this
.
utilsPushSve
.
business2Channel
(
pobj
,
pobj
.
opType
);
break
;
//-----------接入百度reg------end----------------------------
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
...
...
center-channel/app/base/api/impl/auth/taskapi.js
View file @
bc3fbd50
...
...
@@ -27,7 +27,7 @@ class AccessAuthAPI extends APIBase {
var
rtn
=
await
this
.
gatewaypushlogSve
.
taskAliIcapi
();
return
rtn
;
}
async
taskAgainFqPushInfo
(
pobj
,
qobj
,
req
)
{
//再次推送
蜂擎
业务数据
async
taskAgainFqPushInfo
(
pobj
,
qobj
,
req
)
{
//再次推送
渠道
业务数据
var
rtn
=
await
this
.
utilsPushSve
.
business2Channel
(
pobj
,
pobj
.
opType
);
this
.
pushlogSve
.
delDbPushfaillogById
(
Number
(
pobj
.
id
||
0
));
return
rtn
;
...
...
@@ -71,7 +71,7 @@ class AccessAuthAPI extends APIBase {
self
.
taskAgainPushOneNewBusInfo
(
contentData
);
}
else
if
(
element
.
failType
==
4
)
{
self
.
taskAgainFqPushInfo
(
contentData
);
}
//
FQ
}
//
推送渠道(如:FQ)
}
}
return
system
.
getResultSuccess
();
...
...
center-channel/app/base/api/impl/opaction/order.js
View file @
bc3fbd50
...
...
@@ -102,6 +102,9 @@ class ProductAPI extends WEBBase {
case
"receiveAliTmOrder"
:
//接收阿里商标订单
opResult
=
await
this
.
utilsOrderSve
.
receiveAliTmOrder
(
pobj
,
pobj
.
actionBody
);
break
;
case
"receiveFqbossTmOrder"
:
//接收阿里商标订单
opResult
=
await
this
.
utilsOrderSve
.
receiveFqbossTmOrder
(
pobj
,
pobj
.
actionBody
);
break
;
case
"receiveAliTmStatus"
:
//接收阿里商标状态
opResult
=
await
this
.
utilsOrderSve
.
receiveAliTmStatus
(
pobj
,
pobj
.
actionBody
);
break
;
...
...
center-channel/app/base/api/impl/opreceive/pushAliInfo.js
0 → 100644
View file @
bc3fbd50
var
APIBase
=
require
(
"../../api.base"
);
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
class
PushAliInfo
extends
APIBase
{
constructor
()
{
super
();
this
.
utilsPushSve
=
system
.
getObject
(
"service.utilsSve.utilsPushSve"
);
}
/**
* 推送阿里商标跟进信息
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async
tmNote
(
pobj
,
qobj
,
req
)
{
var
reqPushParams
=
{
reqbody
:
{
BizId
:
pobj
.
intentionBizId
,
Note
:
pobj
.
note
.
replace
(
/<
[^
>
]
+>/g
,
""
)
},
appInfo
:
{
uapp_id
:
18
}
};
let
result
=
await
this
.
utilsPushSve
.
business2Channel
(
reqPushParams
,
"pushAliTmNote"
);
if
(
result
&&
result
.
data
)
{
return
result
.
data
;
}
return
result
;
}
/**
* 推送阿里工商跟进信息
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async
icNote
(
pobj
,
qobj
,
req
)
{
var
reqPushParams
=
{
reqbody
:
{
IntentionBizId
:
pobj
.
intentionBizId
,
Type
:
1
,
// 1需求,2订单
Note
:
pobj
.
note
.
replace
(
/<
[^
>
]
+>/g
,
""
)
},
appInfo
:
{
uapp_id
:
18
}
};
let
result
=
await
this
.
utilsPushSve
.
business2Channel
(
reqPushParams
,
"pushAliIcNote"
);
if
(
result
&&
result
.
data
)
{
return
result
.
data
;
}
return
result
;
}
}
module
.
exports
=
PushAliInfo
;
\ No newline at end of file
center-channel/app/base/service/app.base.js
View file @
bc3fbd50
...
...
@@ -13,7 +13,7 @@ class AppServiceBase {
this
.
execClient
=
system
.
getObject
(
'util.execClient'
);
this
.
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
this
.
pushlogSve
=
system
.
getObject
(
"service.common.pushlogSve"
);
this
.
pushlogFailType
=
{
OLDRPC
:
1
,
NEWRPC
:
2
,
FAILLOG
:
3
,
FQ
:
4
};
this
.
pushlogFailType
=
{
OLDRPC
:
1
,
NEWRPC
:
2
,
FAILLOG
:
3
,
FQ
:
4
};
//1老的rpc调用,2新的rpc调用-需配置,3错误日志,4推送峰擎,5直接调用-无需配置
this
.
logCtl
=
system
.
getObject
(
"service.common.oplogSve"
);
}
...
...
center-channel/app/base/service/impl/common/ncSve.js
View file @
bc3fbd50
...
...
@@ -237,6 +237,12 @@ class NcService extends AppServiceBase {
var
a
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/requirement/update"
,
reqbody
:
pushObj
});
console
.
log
(
'nc closeNeed+++'
,
a
)
}
if
(
result
.
data
&&
result
.
data
.
uapp_id
==
44
){
pobj
.
appInfo
.
uapp_id
=
44
if
(
pobj
&&
pobj
.
actionBody
&&
pobj
.
actionBody
.
note
){
pobj
.
actionBody
[
'description'
]
=
pobj
.
actionBody
.
note
}
}
this
.
utilsPushSve
.
business2Channel
(
pobj
,
"pushCloseICPNeed"
);
}
return
result
;
...
...
center-channel/app/base/service/impl/common/pushlogSve.js
View file @
bc3fbd50
...
...
@@ -27,7 +27,7 @@ class PushlogService extends ServiceBase {
}
async
createFailLogDb
(
qobj
)
{
try
{
qobj
.
op
title
=
(
new
Date
()).
Format
(
"yyyy-MM-dd hh:mm:ss"
)
+
":"
+
qobj
.
opt
itle
;
qobj
.
op
Title
=
(
new
Date
()).
Format
(
"yyyy-MM-dd hh:mm:ss"
)
+
":"
+
qobj
.
opT
itle
;
this
.
pushfaillogDao
.
create
(
qobj
);
}
catch
(
e
)
{
//日志记录
...
...
center-channel/app/base/service/impl/common/regCenterOrderSve.js
View file @
bc3fbd50
This diff is collapsed.
Click to expand it.
center-channel/app/base/service/impl/common/rtSve.js
View file @
bc3fbd50
...
...
@@ -240,6 +240,12 @@ class RtService extends AppServiceBase {
var
a
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/requirement/update"
,
reqbody
:
pushObj
});
console
.
log
(
'rt closeNeed+++'
,
a
)
}
if
(
result
.
data
&&
result
.
data
.
uapp_id
==
44
){
pobj
.
appInfo
.
uapp_id
=
44
if
(
pobj
&&
pobj
.
actionBody
&&
pobj
.
actionBody
.
note
){
pobj
.
actionBody
[
'description'
]
=
pobj
.
actionBody
.
note
}
}
this
.
utilsPushSve
.
business2Channel
(
pobj
,
"pushCloseICPNeed"
);
}
return
result
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsAliyunNoteSve.js
0 → 100644
View file @
bc3fbd50
const
AppServiceBase
=
require
(
"../../app.base"
);
var
settings
=
require
(
"../../../../config/settings"
);
const
system
=
require
(
"../../../system"
);
class
UtilsAliyunInfoService
extends
AppServiceBase
{
constructor
()
{
super
();
}
async
sendAliyunInfoByNeedId
(
pobj
)
{
let
verifyResult
=
await
this
.
opAliyunRpcVerifyParam
(
pobj
);
if
(
verifyResult
.
status
!=
0
)
{
return
verifyResult
;
}
let
interface_params
=
verifyResult
.
data
;
let
params
=
{
action
:
interface_params
.
action
,
reqbody
:
pobj
.
reqbody
,
rpcParam
:
{}
}
if
(
interface_params
.
accessKeyId
)
{
params
.
rpcParam
.
accessKeyId
=
interface_params
.
accessKeyId
;
}
if
(
interface_params
.
accessKeySecret
)
{
params
.
rpcParam
.
accessKeySecret
=
interface_params
.
accessKeySecret
;
}
if
(
interface_params
.
endpoint
)
{
params
.
rpcParam
.
endpoint
=
interface_params
.
endpoint
;
}
if
(
interface_params
.
apiVersion
)
{
params
.
rpcParam
.
apiVersion
=
interface_params
.
apiVersion
;
}
let
aliResult
=
await
this
.
opAliyunRpcReq
(
pobj
,
params
);
return
await
this
.
disposePushResult
(
pobj
,
aliResult
,
"ali->sendAliyunInfoByNeedId->aliResult"
,
this
.
pushlogFailType
.
FQ
);
}
}
module
.
exports
=
UtilsAliyunInfoService
;
center-channel/app/base/service/impl/utilsSve/utilsNeedSve2.js
View file @
bc3fbd50
...
...
@@ -25,10 +25,10 @@ class UtilsNeedService2 extends AppServiceBase {
//this.baseCenterOrderSve = system.getObject("service.common.baseCenterOrderSve");
}
/**
* icp关闭需求
* @param {*} pobj
* @param {*} actionBody
*/
* icp关闭需求
* @param {*} pobj
* @param {*} actionBody
*/
async
needCloseIcp
(
pobj
,
actionBody
)
{
console
.
log
(
'guanbi icp xuqiu pobj+++'
,
pobj
)
if
(
actionBody
.
uapp_id
==
uappId
.
ali
)
{
...
...
@@ -185,7 +185,7 @@ class UtilsNeedService2 extends AppServiceBase {
if
(
result
.
data
.
uapp_id
==
uappId
.
ename
)
{
// yiming / ename
console
.
log
(
"queryExpertApplyCommunicationLogs---ename---pobj--"
,
pobj
)
console
.
log
(
'settings.enameClientUrl()+"queryExpertApplyCommunicationLogs"----'
,
settings
.
enameClientUrl
()
+
"queryExpertApplyCommunicationLogs"
)
var
res
=
await
self
.
execClient
.
execEnamePost
({
var
res
=
await
self
.
execClient
.
execEnamePost
({
BeginTime
:
pobj
.
actionBody
.
BeginTime
?
pobj
.
actionBody
.
BeginTime
:
""
,
EndTime
:
pobj
.
actionBody
.
EndTime
?
pobj
.
actionBody
.
EndTime
:
""
,
BizId
:
pobj
.
actionBody
.
intentionBizId
,
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
bc3fbd50
...
...
@@ -1729,6 +1729,16 @@ class UtilsOrderService extends AppServiceBase {
* @param {*} actionBody
*/
async
receiveAliTmOrder
(
pobj
,
actionBody
)
{
var
res
=
await
this
.
receiveFqbossTmOrder
(
pobj
,
actionBody
);
return
res
;
}
/**
* 接收蜂擎boss商标订单
* @param {*} pobj
* @param {*} actionBody
*/
async
receiveFqbossTmOrder
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
channelItemCode
)
{
return
system
.
getResult
(
null
,
"产品编码有误,100010"
);
}
...
...
@@ -1743,12 +1753,58 @@ class UtilsOrderService extends AppServiceBase {
}
pobj
.
productInfo
=
productItemResult
.
data
.
data
;
pobj
.
productInfo
.
price_item
=
pobj
.
productInfo
.
price_list
[
0
];
pobj
.
actionType
=
"receive
Ali
TmOrder"
;
pobj
.
actionType
=
"receive
Fqboss
TmOrder"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/order/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
if
(
result
&&
result
.
status
==
0
){
if
(
pobj
.
appInfo
&&
pobj
.
appInfo
.
uapp_id
==
31
&&
!
pobj
.
actionBody
.
serviceOrderNo
){
//京东云自助商标注册
await
this
.
pushChannelOrder2fq
(
pobj
);
}
}
return
result
;
}
async
pushChannelOrder2fq
(
pobj
)
{
try
{
var
yfobj
=
{
actionBody
:
{
idempotentSource
:
pobj
.
productInfo
.
service_business_code
||
''
,
//渠道来源 N
quantity
:
1
,
//数量 N
needId
:
pobj
.
actionBody
.
needNo
||
''
,
//需求id N
contactsName
:
pobj
.
actionBody
.
contactsName
||
''
,
//联系人名称 N
companyName
:
pobj
.
actionBody
.
applyName
||
''
,
//公司名称 N
scope
:
"商标自助订单进行备案,不用做任何处理"
,
// N
orderNo
:
pobj
.
actionBody
.
channelOrderNo
,
orderPrice
:
300
,
//写死 自助300
phone
:
pobj
.
actionBody
.
contactsMobile
,
appName
:
pobj
.
appInfo
.
app_name
||
''
,
sku
:
'125855508212158464'
//写死 自助一个
},
appInfo
:
pobj
.
appInfo
};
//yfPushRes.data.data
// {"contractNo":null,"orderNos":["20010618850"],"orderList":[{"operator_name":"系统用户","operatorName":"系统用户","operator":"124496450905186304","order_id":"20010618850","order_no":"20010618850","orderNo":"20010618850","message":"success","contractNo":null}]}
var
yfPushRes
=
await
this
.
utilsPushSve
.
business2Channel
(
yfobj
,
"pushOrderICPBusinessNew"
);
//日志记录
this
.
logCtl
.
info
({
optitle
:
(
new
Date
()).
Format
(
"yyyy-MM-dd hh:mm:ss"
)
+
"企服通渠道订单推送至蜂擎:,method=pushChannelOrder2fq"
,
op
:
"service/impl/utilsSve/utilsOrderSve.js/pushChannelOrder2fq"
,
content
:
"参数:"
+
JSON
.
stringify
(
pobj
)
+
";返回结果:"
+
JSON
.
stringify
(
yfPushRes
),
clientIp
:
""
});
}
catch
(
e
)
{
//日志记录
this
.
logCtl
.
error
({
optitle
:
(
new
Date
()).
Format
(
"yyyy-MM-dd hh:mm:ss"
)
+
"企服通渠道订单推送至蜂擎异常:,method=pushChannelOrder2fq"
,
op
:
"service/impl/utilsSve/utilsOrderSve.js/pushChannelOrder2fq---error"
,
content
:
"参数:"
+
JSON
.
stringify
(
pobj
)
+
";异常信息:"
+
JSON
.
stringify
(
e
.
stack
),
clientIp
:
""
});
console
.
log
(
"service/impl/utilsSve/utilsOrderSve.js/pushChannelOrder2fq推送异常"
,
e
.
stack
);
}
}
/**
* 接收阿里订单退款信息git
* @param {*} pobj
...
...
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
View file @
bc3fbd50
...
...
@@ -14,7 +14,7 @@ class UtilsPushService extends AppServiceBase {
let
productItemInterfaceResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
pobj
.
interface_info
=
productItemInterfaceResult
.
data
;
//日志记录
this
.
execClientNew
.
execLogs
(
`
${
pobj
.
opType
}
推送蜂擎获取的接口信息->business2Channel->app(getAppInterface)`
,
pobj
,
"center-channel-utilsPushSve-business2Channel"
,
productItemInterfaceResult
.
data
,
null
);
this
.
execClientNew
.
execLogs
(
`
${
opType
}
推送蜂擎获取的接口信息->business2Channel->app(getAppInterface)`
,
pobj
,
"center-channel-utilsPushSve-business2Channel"
,
productItemInterfaceResult
.
data
,
null
);
if
(
pobj
.
interface_info
&&
pobj
.
interface_info
.
length
>
0
)
{
let
tmpResult
=
await
this
.
pushBusInfo
(
pobj
,
opType
,
1
);
return
system
.
getResultSuccess
(
tmpResult
);
...
...
@@ -73,11 +73,11 @@ class UtilsPushService extends AppServiceBase {
try
{
if
(
interface_info
.
interface_type
==
"bd"
)
{
if
(
!
interface_info
.
method_name
)
{
return
system
.
getResult
(
null
,
"
产品接口参数信息有误
,100350"
);
return
system
.
getResult
(
null
,
"
接口对应的method_name参数信息为空
,100350"
);
}
//操作的方法名称
var
invokeObj
=
system
.
getObject
(
interface_info
.
interface_url
);
if
(
!
invokeObj
[
interface_info
.
method_name
])
{
return
system
.
getResult
(
null
,
"
产品接口
参数方法信息有误,100360"
);
return
system
.
getResult
(
null
,
"
接口对应的method_name
参数方法信息有误,100360"
);
}
pobj
.
interface_params
=
interface_info
.
params
;
var
params
=
[
pobj
];
...
...
center-channel/app/config/businessConfig.js
View file @
bc3fbd50
...
...
@@ -18,7 +18,7 @@ module.exports = {
"rtSubmitMaterial"
,
"rtNotification"
,
"rtSubmitSolution"
,
"rtCloseNeed"
,
"rtClosePlan"
,
"getParamsFor360"
,
"addOrderWeb"
,
"getPayRecords"
,
"getLoginInfo"
,
"putUserMobileByVcode"
,
"putUserPwdByMobile"
,
"icpNotifyNew"
,
"getOrderStatisticsByUappId"
,
"getOrderStatisticsByProduct"
,
"getOrdersComparison"
,
"getOrdersComparisonList"
,
"importOrders"
,
"importNeeds"
,
"receiveAliTmOrder"
,
"receiveAliTmOrderRefund"
,
"receiveAliTmStatus"
,
"importOrders"
,
"importNeeds"
,
"receiveAliTmOrder"
,
"receiveFqbossTmOrder"
,
"receiveAliTmOrderRefund"
,
"receiveAliTmStatus"
,
//百度工商注册
"regGetInfoByChannelNeedNo"
,
"submitRegNeed"
,
"regFeedbackSubmit"
,
"regOrderStatus"
,
"regOrderClose"
,
"getSolutionByChannelOrderNo"
,
"regSubmitSolution"
,
"regNeedClose"
,
...
...
@@ -58,6 +58,10 @@ module.exports = {
"/api/tm/status/notify"
,
"/api/tm/tmcase/nbtzreceiveAssistTmData"
,
"/api/tm/tmcase/nbtzreceiveEditAssistTmData"
],
apiAliSendKeyPathList
:
[
"/api/opreceive/pushAliInfo/tmNote"
,
"/api/opreceive/pushAliInfo/icNote"
,
]
},
AREACOMM
:
{
...
...
center-channel/app/config/routes/api.js
View file @
bc3fbd50
This diff is collapsed.
Click to expand it.
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