Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yysh5
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data_server
yysh5
Commits
378be40a
Commit
378be40a
authored
Apr 02, 2020
by
何娜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新版运营商迁移测试
parent
14d9d19e
Pipeline
#21297
passed with stage
in 14 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
20 deletions
+20
-20
storage.js
app/service/storage.js
+4
-4
config.local.js
config/config.local.js
+8
-8
config.prod.js
config/config.prod.js
+8
-8
No files found.
app/service/storage.js
View file @
378be40a
...
@@ -36,7 +36,7 @@ class StorageService extends Service {
...
@@ -36,7 +36,7 @@ class StorageService extends Service {
});
});
ctx
.
logger
.
info
(
`【Storage】write url:
${
writeUrl
}
params`
,
JSON
.
stringify
({
...
data
,
serviceType
:
writeType
}),
'result:'
,
JSON
.
stringify
(
result
.
data
));
ctx
.
logger
.
info
(
`【Storage】write url:
${
writeUrl
}
params`
,
JSON
.
stringify
({
...
data
,
serviceType
:
writeType
}),
'result:'
,
JSON
.
stringify
(
result
.
data
));
if
(
result
.
data
.
code
!==
'0'
)
{
if
(
!
(
result
.
data
.
code
!==
'0'
||
result
.
data
.
code
!==
0
)
)
{
throw
new
Error
(
'存储数据出错'
);
throw
new
Error
(
'存储数据出错'
);
}
}
return
;
return
;
...
@@ -44,14 +44,14 @@ class StorageService extends Service {
...
@@ -44,14 +44,14 @@ class StorageService extends Service {
async
read
(
orderId
,
appKey
)
{
async
read
(
orderId
,
appKey
)
{
const
{
readUrl
,
ctx
}
=
this
;
const
{
readUrl
,
ctx
}
=
this
;
const
result
=
await
this
.
_request
(
`
${
readUrl
}
/
${
orderId
}
`
,
{
const
result
=
await
this
.
_request
(
`
${
readUrl
}${
orderId
}
`
,
{
method
:
'get'
,
method
:
'get'
,
contentType
:
'json'
,
contentType
:
'json'
,
});
});
ctx
.
logger
.
info
(
`【Storage】read url:
${
readUrl
}
/
${
orderId
}
write result:`
,
JSON
.
stringify
(
result
.
data
));
ctx
.
logger
.
info
(
`【Storage】read url:
`
$
{
readUrl
}
$
{
orderId
}
`
write result:`
,
JSON
.
stringify
(
result
.
data
));
if
(
result
&&
result
.
data
&&
result
.
data
.
code
!==
0
)
{
if
(
result
&&
result
.
data
&&
result
.
data
.
code
!==
0
)
{
ctx
.
logger
.
error
(
`storageAPI read
${
readUrl
}
/
${
orderId
}
`
,
JSON
.
stringify
(
result
.
data
));
ctx
.
logger
.
error
(
`storageAPI read
${
readUrl
}${
orderId
}
`
,
JSON
.
stringify
(
result
.
data
));
ctx
.
throw
(
400
,
{
message
:
result
.
data
.
msg
});
ctx
.
throw
(
400
,
{
message
:
result
.
data
.
msg
});
}
}
await
ctx
.
model
.
Cusdata
.
create
({
await
ctx
.
model
.
Cusdata
.
create
({
...
...
config/config.local.js
View file @
378be40a
...
@@ -63,10 +63,10 @@ module.exports = () => {
...
@@ -63,10 +63,10 @@ module.exports = () => {
};
};
config
.
storageAPI
=
{
config
.
storageAPI
=
{
host
:
'http
://tv.51gjj.com:11252
'
,
host
:
'http
s://uat-nginx.jianbing.com/mongo-service/data
'
,
writeUrl
:
'
/data
'
,
writeUrl
:
''
,
readUrl
:
'
/order
'
,
readUrl
:
'
?type=phone&id=
'
,
writeType
:
'
thxd
'
,
writeType
:
'
phone
'
,
readDataKey
:
'thxdData'
,
readDataKey
:
'thxdData'
,
};
};
...
@@ -76,10 +76,10 @@ module.exports = () => {
...
@@ -76,10 +76,10 @@ module.exports = () => {
};
};
config
.
signatureAPI
=
{
config
.
signatureAPI
=
{
host
:
'http
://tj3.51gjj.com:5118
'
,
host
:
'http
s://uat-nginx.jianbing.com/customer-validation
'
,
fetchTokenUrl
:
'/
Access/GetT
oken'
,
fetchTokenUrl
:
'/
access/gett
oken'
,
fetchOrderIdUrl
:
'/
Order/GetOrderS
n'
,
fetchOrderIdUrl
:
'/
order/getorders
n'
,
signatureUrl
:
'/
Access/SignValidityC
heck'
,
signatureUrl
:
'/
access/signvalidityc
heck'
,
signatureType
:
'thxd'
,
signatureType
:
'thxd'
,
customerUrl
:
'/customer/query'
,
customerUrl
:
'/customer/query'
,
};
};
...
...
config/config.prod.js
View file @
378be40a
...
@@ -53,10 +53,10 @@ module.exports = () => {
...
@@ -53,10 +53,10 @@ module.exports = () => {
};
};
config
.
storageAPI
=
{
config
.
storageAPI
=
{
host
:
process
.
env
.
STORAGEAPI_HOST
||
'http://tv.51gjj.com:11252
'
,
host
:
'https://lan-nginx.jianbing.com/mongo-service
'
,
writeUrl
:
'
/data
'
,
writeUrl
:
''
,
readUrl
:
'
/order
'
,
readUrl
:
'
?type=phone&id=
'
,
writeType
:
'
order
'
,
writeType
:
'
phone
'
,
readDataKey
:
'thxdData'
,
readDataKey
:
'thxdData'
,
};
};
...
@@ -66,10 +66,10 @@ module.exports = () => {
...
@@ -66,10 +66,10 @@ module.exports = () => {
};
};
config
.
signatureAPI
=
{
config
.
signatureAPI
=
{
host
:
process
.
env
.
SIGNATUREAPI_HOST
||
'http://tj3.51gjj.com:5118
'
,
host
:
'https://lan-nginx.jianbing.com/customer-validation
'
,
fetchTokenUrl
:
'/
Access/GetT
oken'
,
fetchTokenUrl
:
'/
access/gett
oken'
,
fetchOrderIdUrl
:
'/
Order/GetOrderS
n'
,
fetchOrderIdUrl
:
'/
order/getorders
n'
,
signatureUrl
:
'/
Access/SignValidityC
heck'
,
signatureUrl
:
'/
access/signvalidityc
heck'
,
signatureType
:
'thxd'
,
signatureType
:
'thxd'
,
customerUrl
:
'/customer/query'
,
customerUrl
:
'/customer/query'
,
};
};
...
...
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