Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gjj_api
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
gjj_api
Commits
507bfb60
Commit
507bfb60
authored
Apr 12, 2019
by
姜登
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gjj
parent
d9cc2ddb
Pipeline
#5915
passed with stage
in 2 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
81 deletions
+19
-81
order.js
app/controller/order.js
+2
-20
script.js
app/controller/script.js
+1
-10
task.js
app/controller/task.js
+2
-20
token.js
app/controller/token.js
+1
-6
context.js
app/extend/context.js
+13
-0
config.local.js
config/config.local.js
+0
-13
config.prod.js
config/config.prod.js
+0
-12
No files found.
app/controller/order.js
View file @
507bfb60
...
...
@@ -67,16 +67,7 @@ class OrderController extends Controller {
}
}
catch
(
err
)
{
ctx
.
logger
.
error
(
'partnerShow'
,
err
);
ctx
.
status
=
200
;
if
(
err
.
code
===
'invalid_param'
)
{
ctx
.
body
=
{
code
:
-
1
,
msg
:
'请求参数有误'
};
return
;
}
if
(
/
[
a-zA-Z
]
+/
.
test
(
err
.
message
))
{
ctx
.
body
=
{
code
:
err
.
code
||
-
1
,
msg
:
'系统错误, 请稍后再试'
};
return
;
}
ctx
.
body
=
{
code
:
err
.
code
||
-
1
,
msg
:
err
.
message
||
''
};
ctx
.
error
(
err
);
}
}
...
...
@@ -107,16 +98,7 @@ class OrderController extends Controller {
};
}
catch
(
err
)
{
ctx
.
logger
.
error
(
'fetchOrderId'
,
err
);
ctx
.
status
=
200
;
if
(
err
.
code
===
'invalid_param'
)
{
ctx
.
body
=
{
code
:
-
1
,
msg
:
'请求参数有误'
};
return
;
}
if
(
/
[
a-zA-Z
]
+/
.
test
(
err
.
message
))
{
ctx
.
body
=
{
code
:
err
.
code
||
-
1
,
msg
:
'系统错误, 请稍后再试'
};
return
;
}
ctx
.
body
=
{
code
:
err
.
code
||
-
1
,
msg
:
err
.
message
||
''
};
ctx
.
error
(
err
);
}
}
}
...
...
app/controller/script.js
View file @
507bfb60
...
...
@@ -13,16 +13,7 @@ class ScriptController extends Controller {
return
;
}
catch
(
err
)
{
ctx
.
logger
.
error
(
'fetchOrderId'
,
err
);
ctx
.
status
=
200
;
if
(
err
.
code
===
'invalid_param'
)
{
ctx
.
body
=
{
code
:
-
1
,
msg
:
'请求参数有误'
};
return
;
}
if
(
/
[
a-zA-Z
]
+/
.
test
(
err
.
message
))
{
ctx
.
body
=
{
code
:
err
.
code
||
-
1
,
msg
:
'系统错误, 请稍后再试'
};
return
;
}
ctx
.
body
=
{
code
:
err
.
code
||
-
1
,
msg
:
err
.
message
||
''
};
ctx
.
error
(
err
);
}
}
}
...
...
app/controller/task.js
View file @
507bfb60
...
...
@@ -95,16 +95,7 @@ class TaskController extends Controller {
};
}
catch
(
err
)
{
ctx
.
logger
.
error
(
'submit'
,
err
);
ctx
.
status
=
200
;
if
(
err
.
code
===
'invalid_param'
)
{
ctx
.
body
=
{
code
:
-
1
,
msg
:
err
.
errors
[
0
].
message
};
return
;
}
if
(
/
[
a-zA-Z
]
+/
.
test
(
err
.
message
))
{
ctx
.
body
=
{
code
:
err
.
code
||
-
1
,
msg
:
'系统错误, 请稍后再试'
};
return
;
}
ctx
.
body
=
{
code
:
err
.
code
||
-
1
,
msg
:
err
.
message
||
''
};
ctx
.
error
(
err
);
}
}
...
...
@@ -133,16 +124,7 @@ class TaskController extends Controller {
};
}
catch
(
err
)
{
ctx
.
logger
.
error
(
'submit'
,
err
);
ctx
.
status
=
200
;
if
(
err
.
code
===
'invalid_param'
)
{
ctx
.
body
=
{
code
:
-
1
,
msg
:
'请求参数有误'
};
return
;
}
if
(
/
[
a-zA-Z
]
+/
.
test
(
err
.
message
))
{
ctx
.
body
=
{
code
:
err
.
code
||
-
1
,
msg
:
'系统错误, 请稍后再试'
};
return
;
}
ctx
.
body
=
{
code
:
err
.
code
||
-
1
,
msg
:
err
.
message
||
''
};
ctx
.
error
(
err
);
}
}
...
...
app/controller/token.js
View file @
507bfb60
...
...
@@ -30,12 +30,7 @@ class TokenController extends Controller {
};
}
catch
(
err
)
{
ctx
.
logger
.
error
(
'partnerCreate'
,
err
);
ctx
.
status
=
200
;
if
(
err
.
code
===
'invalid_param'
)
{
ctx
.
body
=
{
code
:
-
1
,
msg
:
'请求参数有误'
};
return
;
}
ctx
.
body
=
{
code
:
err
.
code
||
-
1
,
msg
:
err
.
message
||
''
};
ctx
.
error
(
err
);
}
}
}
...
...
app/extend/context.js
View file @
507bfb60
...
...
@@ -26,4 +26,17 @@ module.exports = {
};
},
error
(
err
=
''
)
{
this
.
status
=
200
;
if
(
err
.
code
===
'invalid_param'
)
{
this
.
body
=
{
code
:
-
1
,
msg
:
'请求参数有误'
};
return
;
}
if
(
/
[
a-zA-Z
]
+/
.
test
(
err
.
message
))
{
this
.
body
=
{
code
:
err
.
code
||
-
1
,
msg
:
'系统错误, 请稍后再试'
};
return
;
}
this
.
body
=
{
code
:
err
.
code
||
-
1
,
msg
:
err
.
message
||
''
};
},
};
config/config.local.js
View file @
507bfb60
...
...
@@ -16,7 +16,6 @@ module.exports = () => {
};
config
.
taskAPI
=
{
host
:
'http://tm.51gjj.com:4831'
,
fetchHubsUrl
:
''
,
createTaskUrl
:
'/gjjServices/createGjjTask'
,
fetchCodeUrl
:
'/gjjServices/queryGjjCode'
,
submitTaskUrl
:
'/gjjServices/queryGjj'
,
...
...
@@ -63,7 +62,6 @@ module.exports = () => {
fetchTokenUrl
:
'/Access/GetToken'
,
fetchOrderIdUrl
:
'/Order/GetOrderSn'
,
signatureUrl
:
'/Access/SignValidityCheck'
,
fetchParnterUrl
:
''
,
signatureType
:
'gjj'
,
customerUrl
:
'/customer/query'
,
};
...
...
@@ -88,17 +86,6 @@ module.exports = () => {
username
:
'hexin'
,
password
:
'gYUHszn9#q'
,
port
:
3306
,
},
{
// 东八时区
timezone
:
'+08:00'
,
delegate
:
'cusPro'
,
baseDir
:
'model'
,
dialect
:
'mysql'
,
host
:
'rm-bp1272001633qc0x9o.mysql.rds.aliyuncs.com'
,
database
:
'java_open_platform'
,
username
:
'hexin'
,
password
:
'gYUHszn9#q'
,
port
:
3306
,
}],
};
...
...
config/config.prod.js
View file @
507bfb60
...
...
@@ -19,7 +19,6 @@ module.exports = () => {
};
config
.
taskAPI
=
{
host
:
process
.
env
.
TASKAPI_HOST
||
'http://tm.51gjj.com:4821'
,
fetchHubsUrl
:
''
,
createTaskUrl
:
'/gjjServices/createGjjTask'
,
fetchCodeUrl
:
'/gjjServices/queryGjjCode'
,
submitTaskUrl
:
'/gjjServices/queryGjj'
,
...
...
@@ -92,17 +91,6 @@ module.exports = () => {
username
:
process
.
env
.
MYSQL_USER
||
'hexin'
,
password
:
process
.
env
.
MYSQL_PWD
||
'gYUHszn9#q'
,
port
:
process
.
env
.
MYSQL_PORT
||
3306
,
},
{
// 东八时区
timezone
:
'+08:00'
,
delegate
:
'cusPro'
,
baseDir
:
'model'
,
dialect
:
'mysql'
,
host
:
process
.
env
.
MYSQL_PACHONG_HOST
||
'rm-bp1272001633qc0x9o.mysql.rds.aliyuncs.com'
,
database
:
process
.
env
.
MYSQL_JAVA_DB_NAME
||
'java_open_platform'
,
username
:
process
.
env
.
MYSQL_USER
||
'hexin'
,
password
:
process
.
env
.
MYSQL_PWD
||
'gYUHszn9#q'
,
port
:
process
.
env
.
MYSQL_PORT
||
3306
,
}],
};
...
...
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