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
e905c679
Commit
e905c679
authored
Sep 08, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
cb7a1291
8c639c74
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
133 additions
and
5 deletions
+133
-5
center-channel/app/base/api/impl/auth/taskapi.js
+6
-0
center-channel/app/base/api/impl/opaction/tmOrderCall.js
+42
-0
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+5
-3
center-channel/app/base/service/impl/utilsSve/utilsTmOrderCallSve.js
+55
-0
center-channel/app/base/utils/aliyunClient.js
+16
-1
center-channel/app/config/localsettings.js
+1
-1
center-channel/app/config/settings.js
+8
-0
No files found.
center-channel/app/base/api/impl/auth/taskapi.js
View file @
e905c679
...
...
@@ -9,6 +9,7 @@ class AccessAuthAPI extends APIBase {
this
.
pushlogSve
=
system
.
getObject
(
"service.common.pushlogSve"
);
this
.
aliclient
=
system
.
getObject
(
"util.aliyunClient"
);
this
.
utilsTmAliyunSve
=
system
.
getObject
(
"service.utilsSve.utilsTmAliyunSve"
);
}
async
taskAliIcapi
()
{
var
rtn
=
await
this
.
gatewaypushlogSve
.
taskAliIcapi
();
...
...
@@ -34,6 +35,11 @@ class AccessAuthAPI extends APIBase {
return
rtn
;
}
async
taskAlijsonfile
(
pobj
,
qobj
,
req
)
{
//操作阿里商标交易上架
var
rtn
=
await
this
.
UtilsTmOrderCallService
.
createjsonfile
();
return
rtn
;
}
async
taskAliRpcAgainPush
(
pobj
,
qobj
,
req
)
{
var
result
=
await
this
.
pushlogSve
.
getFailLogList
();
if
(
result
.
status
!=
0
||
!
result
.
data
||
result
.
data
.
length
==
0
)
{
...
...
center-channel/app/base/api/impl/opaction/tmOrderCall.js
0 → 100644
View file @
e905c679
var
WEBBase
=
require
(
"../../web.base"
);
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
class
ProductAPI
extends
WEBBase
{
constructor
()
{
super
();
this
.
utilsOrderSve
=
system
.
getObject
(
"service.utilsSve.utilsOrderSve"
);
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async
springBoard
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
.
actionProcess
)
{
return
system
.
getResult
(
null
,
"actionProcess参数不能为空"
);
}
if
(
!
pobj
.
actionType
)
{
return
system
.
getResult
(
null
,
"actionType参数不能为空"
);
}
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionType
,
req
);
return
result
;
}
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
pobj
.
requestId
=
req
.
requestId
;
var
opResult
=
null
;
console
.
log
(
"11111"
,
opResult
)
switch
(
action_type
)
{
case
"queryTradeProduceList"
:
//2020 0907 lin 新增 ali查询 用户确认资料支付尾款,并更新订单状态
opResult
=
await
this
.
utilsTmOrderCallSve
.
queryTradeProduceList
(
pobj
,
pobj
.
actionBody
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
}
console
.
log
(
opResult
)
return
opResult
;
}
}
module
.
exports
=
ProductAPI
;
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
e905c679
...
...
@@ -41,13 +41,16 @@ class UtilsNeedService extends AppServiceBase {
pobj
.
actionBody
.
type_name
=
data
.
data
.
type_name
;
pobj
.
actionBody
.
channel_type_code
=
data
.
data
.
channel_type_code
;
pobj
.
actionBody
.
channel_type_name
=
data
.
data
.
channel_type_name
;
pobj
.
actionBody
.
type
=
pobj
.
actionBody
.
channel_type_code
;
if
(
pobj
.
actionBody
.
channel_type_code
==
5
)
{
pobj
.
actionBody
.
type
=
"ali.icp"
;
}
else
{
}
else
if
(
pobj
.
actionBody
.
channel_type_code
==
7
)
{
pobj
.
actionBody
.
type
=
"ali.edi"
;
}
else
if
(
pobj
.
actionBody
.
channel_type_code
==
"tmjy"
){
pobj
.
actionBody
.
type
=
"ali.tmd"
;
}
if
(
pobj
.
actionBody
.
description
.
indexOf
(
"
#
备#"
)
<
0
)
{
if
(
pobj
.
actionBody
.
description
.
indexOf
(
"备#"
)
<
0
)
{
pobj
.
actionBody
.
level
=
"A"
;
}
else
{
var
levelurl
=
"http://106.13.228.212:8000/recProbability"
;
...
...
@@ -67,7 +70,6 @@ class UtilsNeedService extends AppServiceBase {
if
(
pobj
.
actionBody
.
channel_type_code
==
"esp.companyreg"
)
{
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushNeedBusiness"
);
}
else
{
var
reqParams
=
{
actionBody
:
pobj
.
actionBody
,
appInfo
:
pobj
.
appInfo
...
...
center-channel/app/base/service/impl/utilsSve/utilsTmOrderCallSve.js
0 → 100644
View file @
e905c679
const
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
const
querystring
=
require
(
'querystring'
);
const
AppServiceBase
=
require
(
"../../app.base"
);
//订单操作类
class
UtilsTmOrderCallService
extends
AppServiceBase
{
constructor
()
{
super
();
this
.
aliclient
=
system
.
getObject
(
"util.aliyunClient"
);
}
async
queryTradeProduceList
(
pobj
,
actionBody
)
{
//修改联系人
return
system
.
getResultSuccess
();
}
async
createjsonfile
()
{
var
self
=
this
;;
var
gobj
=
{
action
:
"GenerateUploadFilePolicy"
,
reqbody
:
{
FileType
:
"PARTNER_SYNC_FILE"
},
type
:
'TM'
}
var
rst
=
await
self
.
aliclient
.
reqbyget
(
gobj
);
console
.
log
(
rst
);
var
obj
=
{
actionType
:
"createjsonfile"
,
actionBody
:{}
}
var
getjsonurl
=
settings
.
tmtransactionUrl
()
+
"/api/action/trademarktransaction"
var
jsonurl
=
await
this
.
restPostUrl
(
obj
,
getjsonurl
);
if
(
!
jsonurl
){
return
system
.
getResultSuccess
();
}
var
upobj
=
{
ossurl
:
jsonurl
.
data
.
url
,
filedir
:
rst
.
data
.
FileDir
,
objectName
:
jsonurl
.
data
.
name
,
encodePolicy
:
rst
.
data
.
EncodedPolicy
,
endpoint
:
"http://partner-sync-file.oss-cn-beijing.aliyuncs.com"
,
accessKeyId
:
rst
.
data
.
AccessId
,
bucketName
:
"partner-sync-file"
}
var
aliOssFileInfo
=
await
this
.
execPostUrl
(
upobj
,
settings
.
aliossjavaUrl
());
if
(
aliOssFileInfo
==
true
)
{
var
fileUrl
=
params
.
filedir
+
"/"
+
params
.
objectName
;
return
system
.
getResultSuccess
(
fileUrl
);
}
}
}
module
.
exports
=
UtilsTmOrderCallService
;
// var a=new UtilsTmOrderCallService();
// a.createjsonfile();
center-channel/app/base/utils/aliyunClient.js
View file @
e905c679
...
...
@@ -14,6 +14,15 @@ class aliyunClient {
apiVersion
:
"2020-03-06"
});
}
getAliTMClient
()
{
return
new
RPCClient
({
accessKeyId
:
'LTAI4FmyipY1wuLHjLhMWiPa'
,
accessKeySecret
:
'hp4FF18IDCSym1prqzxrAjnnhNH3ju'
,
endpoint
:
'https://trademark.aliyuncs.com'
,
apiVersion
:
'2018-07-24'
}
);
}
async
post
(
aliReqUrl
,
key
,
secret
,
actionBody
)
{
const
client
=
new
Client
(
key
,
secret
);
var
param
=
{
...
...
@@ -32,8 +41,14 @@ class aliyunClient {
async
reqbyget
(
obj
,
cbk
)
{
var
action
=
obj
.
action
;
var
reqbody
=
obj
.
reqbody
;
var
self
=
this
;
try
{
var
reqAliclient
=
this
.
getAliClient
();
// { ... this.aliclient };
var
reqAliclient
=
null
;
// { ... this.aliclient };
if
(
obj
.
type
&&
obj
.
type
==
"TM"
){
reqAliclient
=
self
.
getAliTMClient
();
}
else
{
reqAliclient
=
self
.
getAliClient
();
}
if
(
obj
.
apiVersion
)
{
reqAliclient
.
apiVersion
=
obj
.
apiVersion
;
}
...
...
center-channel/app/config/localsettings.js
View file @
e905c679
var
settings
=
{
redis
:
{
host
:
"
43.247.184.32
"
,
host
:
"
121.36.3.35
"
,
port
:
8967
,
password
:
"Gongsibao2018"
,
db
:
5
,
...
...
center-channel/app/config/settings.js
View file @
e905c679
...
...
@@ -51,6 +51,14 @@ var settings = {
return
"http://aliossjava-service/uploadfile"
;
}
},
tmtransactionUrl
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
return
"http://192.168.2.109:8080/uploadfile"
;
}
else
{
return
"http://center-tmtransaction-service"
;
}
},
qifuPayAfterH5JumpUrl
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
return
"http://tm.qifu.gongsibao.com:4012/#/home/indent_list"
;
...
...
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