Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tax_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
tax_api
Commits
38770e7d
Commit
38770e7d
authored
May 07, 2019
by
何娜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tax_api 采用新接口获取城市配置+获取订单号url优化
parent
2c5e3cdc
Pipeline
#7021
passed with stage
in 4 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
9 deletions
+67
-9
order.js
app/controller/order.js
+7
-1
script.js
app/controller/script.js
+47
-0
router.js
app/router.js
+4
-2
config.local.js
config/config.local.js
+9
-6
No files found.
app/controller/order.js
View file @
38770e7d
...
@@ -6,6 +6,11 @@ class OrderController extends Controller {
...
@@ -6,6 +6,11 @@ class OrderController extends Controller {
constructor
(
ctx
)
{
constructor
(
ctx
)
{
super
(
ctx
);
super
(
ctx
);
this
.
fetchOrderIdRule
=
{
appKey
:
'string'
,
cityId
:
'string'
};
this
.
showRule
=
{
this
.
showRule
=
{
sign
:
'string'
,
sign
:
'string'
,
params
:
{
params
:
{
...
@@ -79,7 +84,8 @@ class OrderController extends Controller {
...
@@ -79,7 +84,8 @@ class OrderController extends Controller {
async
fetchOrderId
()
{
async
fetchOrderId
()
{
const
{
ctx
,
service
}
=
this
;
const
{
ctx
,
service
}
=
this
;
try
{
try
{
const
{
appKey
,
cityId
}
=
ctx
.
params
;
ctx
.
validate
(
this
.
fetchOrderIdRule
,
ctx
.
query
);
const
{
appKey
,
cityId
}
=
ctx
.
query
;
// const appKeyInfo = await service.partner.fetchInfo(appKey);
// const appKeyInfo = await service.partner.fetchInfo(appKey);
// ctx.logger.info(appKey, ',appKeyInfo,', appKeyInfo);
// ctx.logger.info(appKey, ',appKeyInfo,', appKeyInfo);
// if (!(appKeyInfo && appKeyInfo.valid === true && appKeyInfo.enableIt === true)) {
// if (!(appKeyInfo && appKeyInfo.valid === true && appKeyInfo.enableIt === true)) {
...
...
app/controller/script.js
0 → 100644
View file @
38770e7d
'use strict'
;
const
Controller
=
require
(
'egg'
).
Controller
;
class
ScriptController
extends
Controller
{
constructor
(
ctx
)
{
super
(
ctx
);
this
.
cityListRule
=
{
appKey
:
'string'
,
};
}
async
partnerScripts
()
{
const
{
ctx
,
service
}
=
this
;
try
{
ctx
.
validate
(
this
.
cityListRule
,
ctx
.
query
);
const
{
appKey
}
=
ctx
.
query
;
ctx
.
logger
.
info
(
'partnerScripts'
,
appKey
)
let
limitScriptsList
=
false
;
const
ret
=
await
service
.
partner
.
fetchInfo
(
appKey
);
if
(
ret
)
{
limitScriptsList
=
ret
.
itExcludeScripts
;
}
else
{
return
ctx
.
body
=
{
code
:
-
1
,
msg
:
'无效的appKey'
};
}
let
data
=
await
service
.
scripts
.
fetchScripts
();
if
(
limitScriptsList
)
{
data
=
data
.
filter
(
item
=>
{
if
(
item
.
state
===
'offline'
||
item
.
state
===
'online'
)
{
return
!
(
limitScriptsList
.
includes
(
item
.
id
));
}
});
}
ctx
.
body
=
{
code
:
0
,
data
,
};
}
catch
(
err
)
{
ctx
.
logger
.
info
(
err
);
}
}
}
module
.
exports
=
ScriptController
;
app/router.js
View file @
38770e7d
...
@@ -8,9 +8,11 @@ module.exports = app => {
...
@@ -8,9 +8,11 @@ module.exports = app => {
const
taxRouter
=
router
.
namespace
(
app
.
config
.
projectRootPath
);
const
taxRouter
=
router
.
namespace
(
app
.
config
.
projectRootPath
);
taxRouter
.
get
(
'/getCity'
,
controller
.
task
.
cityConfigs
);
// 获取城市基础配置项
taxRouter
.
get
(
'/getCity'
,
controller
.
task
.
cityConfigs
);
// 获取城市基础配置项
老接口备用
taxRouter
.
get
(
'/getorderSn/:appKey/:cityId'
,
controller
.
order
.
fetchOrderId
);
// 合作方获取订单号
taxRouter
.
get
(
'/getCityList'
,
controller
.
script
.
partnerScripts
);
// 获取城市基础配置项 新接口
taxRouter
.
get
(
'/getorderSn'
,
controller
.
order
.
fetchOrderId
);
// 合作方获取订单号
taxRouter
.
post
(
'/getCode'
,
controller
.
task
.
fetchCapture
);
// 获取验证码
taxRouter
.
post
(
'/getCode'
,
controller
.
task
.
fetchCapture
);
// 获取验证码
...
...
config/config.local.js
View file @
38770e7d
...
@@ -16,7 +16,6 @@ module.exports = () => {
...
@@ -16,7 +16,6 @@ module.exports = () => {
};
};
config
.
taskAPI
=
{
config
.
taskAPI
=
{
host
:
'http://tm.51gjj.com:6824'
,
host
:
'http://tm.51gjj.com:6824'
,
newhost
:
'http://tt.51gjj.com:7001'
,
fetchHubsUrl
:
''
,
fetchHubsUrl
:
''
,
createTaskUrl
:
'/IncomeTax/createItTask'
,
createTaskUrl
:
'/IncomeTax/createItTask'
,
fetchCodeUrl
:
'/IncomeTax/getItCode'
,
fetchCodeUrl
:
'/IncomeTax/getItCode'
,
...
@@ -26,15 +25,19 @@ module.exports = () => {
...
@@ -26,15 +25,19 @@ module.exports = () => {
};
};
config
.
partnerAPI
=
{
config
.
partnerAPI
=
{
host
:
'https://
dev
-nginx.jianbing.com/zeus-api/v1'
,
host
:
'https://
uat
-nginx.jianbing.com/zeus-api/v1'
,
fetchTheme
:
'/chaos/
partners/
theme'
,
fetchTheme
:
'/chaos/theme'
,
fetchScripts
:
'/chaos/partners/scripts'
,
fetchScripts
:
'/chaos/partners/scripts'
,
redisThemePrefix
:
'URANUS.HF.PARNTERS.THEME'
,
fetchAgreements
:
'/chaos/agreements'
,
redisScriptsPrefix
:
'URANUS.HF.PARNTERS.SCRIPTS'
,
fetchInfo
:
'/chaos/partner'
,
redisThemePrefix
:
'URANUS.IT.PARNTERS.THEME'
,
redisScriptsPrefix
:
'URANUS.IT.PARNTERS.SCRIPTS'
,
redisAgreementsPrefix
:
'URANUS.IT.PARNTERS.Agreements'
,
redisInfoPrefix
:
'URANUS.IT.PARNTERS.Info'
,
};
};
config
.
scriptsAPI
=
{
config
.
scriptsAPI
=
{
host
:
'https://
dev
-nginx.jianbing.com/zeus-api/v1'
,
host
:
'https://
uat
-nginx.jianbing.com/zeus-api/v1'
,
fetchScriptsUrl
:
'/chaos/it/two_dimension_array/queries'
,
fetchScriptsUrl
:
'/chaos/it/two_dimension_array/queries'
,
fetchOneScriptUrl
:
'/chaos/it/two_dimension_array/info'
,
fetchOneScriptUrl
:
'/chaos/it/two_dimension_array/info'
,
fetchParamsInfoUrl
:
'/chaos/it/login_param_map'
,
fetchParamsInfoUrl
:
'/chaos/it/login_param_map'
,
...
...
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