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
f03a67e7
Commit
f03a67e7
authored
Apr 19, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
5868d6e3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
66 additions
and
19 deletions
+66
-19
center-channel/app/base/api/impl/auth/taskapi.js
+6
-0
center-channel/app/base/api/impl/opaction/opOrder.js
+2
-2
center-channel/app/base/service/app.base.js
+45
-0
center-channel/app/base/service/impl/utilsSve/utilsOpOrderSve.js
+6
-12
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+1
-1
center-channel/app/base/service/impl/utilsSve/utilsTmAliyunSve.js
+0
-0
center-channel/app/config/settings.js
+1
-1
center-channel/提示编码使用
+5
-3
No files found.
center-channel/app/base/api/impl/auth/taskapi.js
View file @
f03a67e7
...
@@ -8,6 +8,7 @@ class AccessAuthAPI extends APIBase {
...
@@ -8,6 +8,7 @@ class AccessAuthAPI extends APIBase {
this
.
utilsPushSve
=
system
.
getObject
(
"service.utilsSve.utilsPushSve"
);
this
.
utilsPushSve
=
system
.
getObject
(
"service.utilsSve.utilsPushSve"
);
this
.
pushlogSve
=
system
.
getObject
(
"service.common.pushlogSve"
);
this
.
pushlogSve
=
system
.
getObject
(
"service.common.pushlogSve"
);
this
.
aliclient
=
system
.
getObject
(
"util.aliyunClient"
);
this
.
aliclient
=
system
.
getObject
(
"util.aliyunClient"
);
this
.
utilsTmAliyunSve
=
system
.
getObject
(
"service.utilsSve.utilsTmAliyunSve"
);
}
}
async
taskAliIcapi
()
{
async
taskAliIcapi
()
{
var
rtn
=
await
this
.
gatewaypushlogSve
.
taskAliIcapi
();
var
rtn
=
await
this
.
gatewaypushlogSve
.
taskAliIcapi
();
...
@@ -28,6 +29,11 @@ class AccessAuthAPI extends APIBase {
...
@@ -28,6 +29,11 @@ class AccessAuthAPI extends APIBase {
var
rtn
=
await
this
.
aliclient
.
reqbyget
(
pobj
)
var
rtn
=
await
this
.
aliclient
.
reqbyget
(
pobj
)
return
rtn
;
return
rtn
;
}
}
async
taskAliTmUpdate
(
pobj
,
qobj
,
req
)
{
//操作阿里商标更新
var
rtn
=
await
this
.
utilsTmAliyunSve
.
taskAliTmUpdate
()
return
rtn
;
}
// async taskAgainPushNewBusInfo(pobj, qobj, req) {//再次推送新rpc业务数据
// async taskAgainPushNewBusInfo(pobj, qobj, req) {//再次推送新rpc业务数据
// var rtn = await this.utilsPushSve.againPushBusInfo(pobj);
// var rtn = await this.utilsPushSve.againPushBusInfo(pobj);
// return rtn;
// return rtn;
...
...
center-channel/app/base/api/impl/opaction/opOrder.js
View file @
f03a67e7
...
@@ -29,7 +29,7 @@ class ProductAPI extends WEBBase {
...
@@ -29,7 +29,7 @@ class ProductAPI extends WEBBase {
var
opResult
=
null
;
var
opResult
=
null
;
switch
(
action_type
)
{
switch
(
action_type
)
{
case
"opAliDingInterfaceManage"
:
//操作阿里钉钉接口管理---actionBody:{为阿里需要的参数}
case
"opAliDingInterfaceManage"
:
//操作阿里钉钉接口管理---actionBody:{为阿里需要的参数}
var
pushInterfaceResult
=
await
this
.
utilsOpOrderSve
.
get
ProductInterface
(
pobj
.
appInfo
,
pobj
.
product_id
);
var
pushInterfaceResult
=
await
this
.
utilsOpOrderSve
.
get
OpInterfaceByProductId
(
pobj
.
appInfo
,
pobj
.
product_id
);
if
(
pushInterfaceResult
.
status
!=
0
)
{
if
(
pushInterfaceResult
.
status
!=
0
)
{
return
pushInterfaceResult
;
return
pushInterfaceResult
;
}
}
...
@@ -41,7 +41,7 @@ class ProductAPI extends WEBBase {
...
@@ -41,7 +41,7 @@ class ProductAPI extends WEBBase {
opResult
=
await
this
.
utilsTmAliyunSve
.
opAliDingInterfaceManage
(
pobj
);
opResult
=
await
this
.
utilsTmAliyunSve
.
opAliDingInterfaceManage
(
pobj
);
break
;
break
;
// case "checkTmNameByAli"://检测商标名称是否合规
// case "checkTmNameByAli"://检测商标名称是否合规
// var pushInterfaceResult = await this.utilsOpOrderSve.get
ProductInterface
(pobj, pobj.actionBody.product_id);
// var pushInterfaceResult = await this.utilsOpOrderSve.get
OpInterfaceByProductId
(pobj, pobj.actionBody.product_id);
// if (pushInterfaceResult.status != 0) {
// if (pushInterfaceResult.status != 0) {
// pobj.actionBody.product_info.interface_info = pushInterfaceResult.data;
// pobj.actionBody.product_info.interface_info = pushInterfaceResult.data;
// this.utilsPushSve.pushBusInfo(pobj, "closeAliTmApply", 1);
// this.utilsPushSve.pushBusInfo(pobj, "closeAliTmApply", 1);
...
...
center-channel/app/base/service/app.base.js
View file @
f03a67e7
...
@@ -243,6 +243,51 @@ class AppServiceBase {
...
@@ -243,6 +243,51 @@ class AppServiceBase {
return
system
.
getResult
(
-
200
,
"java ali oss upload error"
);
return
system
.
getResult
(
-
200
,
"java ali oss upload error"
);
}
}
}
}
async
opDownFileInfo
(
docUrl
,
result
)
{
//从oss下载到本地并上传到自己oss,之后删除本地文件
/*docUrl下载链接,全路径,如:https://XXXXXX.pdf?XXXXX */
try
{
var
tmpFileName
=
docUrl
.
substring
(
0
,
docUrl
.
lastIndexOf
(
"?"
));
var
fileName
=
tmpFileName
.
substr
(
tmpFileName
.
lastIndexOf
(
"/"
)
+
1
,
tmpFileName
.
lenght
);
var
fileType
=
tmpFileName
.
substr
(
tmpFileName
.
lastIndexOf
(
"."
)
+
1
,
tmpFileName
.
lenght
);
//解码后的文件全名:xxx.pdf
var
fileAllName
=
decodeURIComponent
(
fileName
);
//为xxx.pdf
var
saveFilePath
=
'/tmp/'
+
fileAllName
;
// 下载文件到指定的路径
var
tmpp
=
await
this
.
restClient
.
execDownload
(
"'"
+
docUrl
+
"'"
,
saveFilePath
);
//上传 saveFilePath的文件 到ossClient
var
uuid
=
uuidv4
();
var
u
=
uuid
.
replace
(
/
\-
/g
,
""
);
var
upFileName
=
"alifile_"
+
u
+
"."
+
fileType
;
var
rtn
=
await
this
.
ossClient
.
upfile
(
upFileName
,
saveFilePath
);
result
.
data
=
rtn
;
//删除本地文件
fs
.
unlink
(
saveFilePath
,
function
(
err
)
{
});
}
catch
(
e
)
{
result
.
code
=
-
200
;
result
.
message
=
"通过flowId获取到的文件url下载操作异常异常error"
;
console
.
log
(
e
.
stack
);
//日志记录
logCtl
.
error
({
optitle
:
"e签宝通过flowId获取到的文件url下载操作异常异常error"
,
op
:
"base/service/impl/utilesignbaoSve/opDownFileInfo"
,
content
:
"请求参数:docUrl="
+
docUrl
+
",异常信息error:"
+
e
.
stack
,
clientIp
:
""
});
}
return
result
;
}
async
getOpInterfaceByProductId
(
appInfo
,
product_id
)
{
//获取产品调用接口
var
getProductInterfaceUrl
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
getProductInterfaceObj
=
{
"actionType"
:
"getProductInterface"
,
"appInfo"
:
appInfo
,
"actionBody"
:
{
"product_id"
:
product_id
}
};
var
productItemInterfaceResult
=
await
this
.
restPostUrl
(
getProductInterfaceObj
,
getProductInterfaceUrl
);
return
productItemInterfaceResult
;
}
/*
/*
返回20位业务订单号
返回20位业务订单号
prefix:业务前缀
prefix:业务前缀
...
...
center-channel/app/base/service/impl/utilsSve/utilsOpOrderSve.js
View file @
f03a67e7
...
@@ -9,16 +9,7 @@ class UtilsOpOrderService extends AppServiceBase {
...
@@ -9,16 +9,7 @@ class UtilsOpOrderService extends AppServiceBase {
this
.
centerOrderUrl
=
settings
.
centerOrderUrl
();
this
.
centerOrderUrl
=
settings
.
centerOrderUrl
();
this
.
utilsPushSve
=
system
.
getObject
(
"service.utilsSve.utilsPushSve"
);
this
.
utilsPushSve
=
system
.
getObject
(
"service.utilsSve.utilsPushSve"
);
}
}
async
getProductInterface
(
appInfo
,
product_id
)
{
//获取产品调用接口
var
getProductInterfaceUrl
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
getProductInterfaceObj
=
{
"actionType"
:
"getProductInterface"
,
"appInfo"
:
appInfo
,
"actionBody"
:
{
"product_id"
:
product_id
}
};
var
productItemInterfaceResult
=
await
this
.
restPostUrl
(
getProductInterfaceObj
,
getProductInterfaceUrl
);
return
productItemInterfaceResult
;
}
async
updateContacts
(
pobj
,
actionBody
)
{
//修改联系人
async
updateContacts
(
pobj
,
actionBody
)
{
//修改联系人
if
(
!
actionBody
.
orderNo
)
{
if
(
!
actionBody
.
orderNo
)
{
return
system
.
getResult
(
null
,
"actionBody.orderNo can not be empty,100310"
);
return
system
.
getResult
(
null
,
"actionBody.orderNo can not be empty,100310"
);
...
@@ -47,7 +38,10 @@ class UtilsOpOrderService extends AppServiceBase {
...
@@ -47,7 +38,10 @@ class UtilsOpOrderService extends AppServiceBase {
}
}
if
(
result
.
data
.
orderStatus
==
2
)
{
if
(
result
.
data
.
orderStatus
==
2
)
{
this
.
opUpdatePushInfo
(
result
,
pobj
,
"pushUpdateOrder"
);
this
.
opUpdatePushInfo
(
result
,
pobj
,
"pushUpdateOrder"
);
this
.
opUpdatePushInfo
(
result
,
pobj
,
"updateAliTmApplicant"
);
if
(
pobj
.
actionBody
.
apply
)
{
pobj
.
actionBody
.
apply
.
gzwtsUrl
=
result
.
data
.
gzwtsUrl
;
this
.
opUpdatePushInfo
(
result
,
pobj
,
"updateAliTmApplicant"
);
}
//ali 只做申请人信息修改
}
//状态为付款的订单进行推送
}
//状态为付款的订单进行推送
result
.
data
=
null
;
result
.
data
=
null
;
return
result
;
return
result
;
...
@@ -114,7 +108,7 @@ class UtilsOpOrderService extends AppServiceBase {
...
@@ -114,7 +108,7 @@ class UtilsOpOrderService extends AppServiceBase {
tmpPobj
.
actionBody
.
product_info
=
productItemResult
.
data
;
tmpPobj
.
actionBody
.
product_info
=
productItemResult
.
data
;
tmpPobj
.
actionBody
.
product_id
=
tmpPobj
.
actionBody
.
product_info
.
id
;
tmpPobj
.
actionBody
.
product_id
=
tmpPobj
.
actionBody
.
product_info
.
id
;
//获取推送接口并推送
//获取推送接口并推送
var
pushInterfaceResult
=
await
this
.
get
ProductInterface
(
pobj
.
appInfo
,
tmpPobj
.
actionBody
.
product_id
);
var
pushInterfaceResult
=
await
this
.
get
OpInterfaceByProductId
(
pobj
.
appInfo
,
tmpPobj
.
actionBody
.
product_id
);
if
(
pushINterfaceResult
.
status
==
0
)
{
if
(
pushINterfaceResult
.
status
==
0
)
{
tmpPobj
.
actionBody
.
product_info
.
interface_info
=
pushInterfaceResult
.
data
;
tmpPobj
.
actionBody
.
product_info
.
interface_info
=
pushInterfaceResult
.
data
;
this
.
utilsPushSve
.
pushBusInfo
(
tmpPobj
,
"pushOpSolution"
,
1
);
this
.
utilsPushSve
.
pushBusInfo
(
tmpPobj
,
"pushOpSolution"
,
1
);
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
f03a67e7
...
@@ -489,7 +489,7 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -489,7 +489,7 @@ class UtilsOrderService extends AppServiceBase {
// productId: outTradeInfo.length == 3 ? outTradeInfo[2] : 0
// productId: outTradeInfo.length == 3 ? outTradeInfo[2] : 0
// }
// }
// opResult.data = {
// opResult.data = {
// orderNo: "TM362020041
50927UPmE
",
// orderNo: "TM362020041
91028Sgir
",
// uappId: 36,
// uappId: 36,
// productId: 42
// productId: 42
// };
// };
...
...
center-channel/app/base/service/impl/utilsSve/utilsTmAliyunSve.js
View file @
f03a67e7
This diff is collapsed.
Click to expand it.
center-channel/app/config/settings.js
View file @
f03a67e7
...
@@ -22,7 +22,7 @@ var settings = {
...
@@ -22,7 +22,7 @@ var settings = {
port
:
process
.
env
.
NODE_PORT
||
4012
,
port
:
process
.
env
.
NODE_PORT
||
4012
,
aliossjavaUrl
:
function
()
{
aliossjavaUrl
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
if
(
this
.
env
==
"dev"
)
{
return
"http://192.168.
0.104
:8080/uploadfile"
;
return
"http://192.168.
2.109
:8080/uploadfile"
;
}
else
{
}
else
{
return
"http://aliossjava-service/uploadfile"
;
return
"http://aliossjava-service/uploadfile"
;
}
}
...
...
center-channel/提示编码使用
View file @
f03a67e7
已经使用的
编码汇总:
已经使用的
编码汇总:
...
@@ -51,4 +51,6 @@
...
@@ -51,4 +51,6 @@
100500
100500
100510
100510
100520
100520
100530
100530
\ No newline at end of file
100540
100550
\ No newline at end of file
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