Commit bd5121aa authored by 姜登's avatar 姜登

gjjconfig

parent 28f0237d
Pipeline #4732 passed with stage
in 12 seconds
......@@ -169,8 +169,8 @@ class TaskController extends Controller {
const { ctx, service } = this;
try {
ctx.validate(this.cityListRule);
await service.signature.signatureCheck(ctx.request.body);
const result = await service.scripts.getCityList();
// await service.signature.signatureCheck(ctx.request.body);
const result = await service.scripts.getCityList(ctx.request.body);
ctx.body = result;
return;
} catch (err) {
......
......@@ -16,6 +16,7 @@ class ScriptsService extends Service {
this.redisScriptsKey = scriptsAPI.redisScriptsKey;
this.redisParamsKey = scriptsAPI.redisParamsKey;
this.redisScriptListKey = scriptsAPI.redisScriptListKey;
this.cityListUrl = scriptsAPI.cityListUrl;
}
async fetchScripts() {
......@@ -181,8 +182,23 @@ class ScriptsService extends Service {
}
}
async getCityList() {
// eslint-disable-next-line no-empty-function
async getCityList(params) {
try {
const { cityListUrl, ctx } = this;
const result = await ctx.curl(cityListUrl, {
charset: 'utf-8',
timeout: ['30s', '30s'],
dataType: 'json',
contentType: 'json',
method: 'POST',
data: params,
});
return result.data;
} catch (err) {
this.ctx.logger.error(err);
return { code: -1, msg: '系统错误,请稍后重试' };
}
}
}
......
......@@ -20,7 +20,7 @@ module.exports = () => {
createTaskUrl: '/gjjServices/createGjjTask',
fetchCodeUrl: '/gjjServices/queryGjjCode',
submitTaskUrl: '/gjjServices/queryGjj',
fetchTaskUrl: '/gjjServices/getGjjData'
fetchTaskUrl: '/gjjServices/getGjjData',
};
config.partnerAPI = {
......@@ -32,7 +32,7 @@ module.exports = () => {
redisScriptsPrefix: 'URANUS.HF.PARNTERS.SCRIPTS',
redisAgreementsPrefix: 'URANUS.HF.PARNTERS.Agreements',
fetchInfo: '/chaos/partner',
redisInfoPrefix:'URANUS.HF.PARNTERS.Info',
redisInfoPrefix: 'URANUS.HF.PARNTERS.Info',
};
config.scriptsAPI = {
......@@ -48,6 +48,7 @@ module.exports = () => {
redisScriptsKey: 'URANUS.HF.SCRIPTS',
redisParamsKey: 'URANUS.HF.PARAMS',
redisScriptListKey: 'URANUS.HF.SCRIPTLIST',
cityListUrl: 'https://t.51gjj.com/gjj/getCityConfig',
};
config.storageAPI = {
......
......@@ -38,7 +38,8 @@ module.exports = () => {
fetchScriptByCityNameUrl: '/chaos/hf/city_scripts',
redisScriptsKey: 'URANUS.HF.SCRIPTS',
redisParamsKey: 'URANUS.HF.PARAMS',
redisScriptListKey:'URANUS.HF.SCRIPTLIST',
redisScriptListKey: 'URANUS.HF.SCRIPTLIST',
cityListUrl: 'https://t.51gjj.com/gjj/getCityConfig',
};
config.storageAPI = {
......@@ -61,7 +62,7 @@ module.exports = () => {
signatureUrl: '/Access/SignValidityCheck',
fetchParnterUrl: '',
signatureType: 'gjj',
customerUrl:'/customer/query',
customerUrl: '/customer/query',
};
config.partnerAPI = {
......@@ -73,7 +74,7 @@ module.exports = () => {
redisScriptsPrefix: 'URANUS.HF.PARNTERS.SCRIPTS',
redisAgreementsPrefix: 'URANUS.HF.PARNTERS.Agreements',
fetchInfo: '/chaos/partner',
redisInfoPrefix:'URANUS.HF.PARNTERS.Info',
redisInfoPrefix: 'URANUS.HF.PARNTERS.Info',
};
config.lockKeys = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment