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
d9b8ff70
Commit
d9b8ff70
authored
Jul 29, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
icp
parent
87808f48
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
13 deletions
+28
-13
center-channel/app/base/api/api.base.js
+15
-0
center-channel/app/base/service/impl/common/centerorderSve.js
+3
-3
center-channel/app/base/service/impl/common/qcCenterOrderSve.js
+10
-10
No files found.
center-channel/app/base/api/api.base.js
View file @
d9b8ff70
const
system
=
require
(
"../system"
);
const
system
=
require
(
"../system"
);
const
settings
=
require
(
"../../config/settings"
);
const
settings
=
require
(
"../../config/settings"
);
const
uuidv4
=
require
(
'uuid/v4'
);
const
uuidv4
=
require
(
'uuid/v4'
);
const
sha256
=
require
(
'sha256'
);
const
md5
=
require
(
"MD5"
);
const
md5
=
require
(
"MD5"
);
class
APIBase
{
class
APIBase
{
constructor
()
{
constructor
()
{
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
redisClient
=
system
.
getObject
(
"util.redisClient"
);
this
.
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
this
.
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
this
.
logCtl
=
system
.
getObject
(
"service.common.oplogSve"
);
this
.
logCtl
=
system
.
getObject
(
"service.common.oplogSve"
);
this
.
toolSve
=
system
.
getObject
(
"service.trademark.toolSve"
);
this
.
toolSve
=
system
.
getObject
(
"service.trademark.toolSve"
);
this
.
exTime
=
6
*
3600
;
//缓存过期时间,6小时
this
.
exTime
=
6
*
3600
;
//缓存过期时间,6小时
this
.
cacheMethodList
=
[
];
}
}
getUUID
()
{
getUUID
()
{
var
uuid
=
uuidv4
();
var
uuid
=
uuidv4
();
...
@@ -20,6 +25,12 @@ class APIBase {
...
@@ -20,6 +25,12 @@ class APIBase {
async
doexecMethod
(
gname
,
methodname
,
pobj
,
query
,
req
)
{
async
doexecMethod
(
gname
,
methodname
,
pobj
,
query
,
req
)
{
req
.
requestId
=
this
.
getUUID
();
req
.
requestId
=
this
.
getUUID
();
try
{
try
{
var
shaStr
=
await
sha256
(
JSON
.
stringify
(
pobj
));
//查询缓存
var
cacheRes
=
await
this
.
redisClient
.
get
(
shaStr
);
if
(
cacheRes
)
{
return
JSON
.
parse
(
cacheRes
);
}
var
rtn
=
await
this
[
methodname
](
pobj
,
query
,
req
);
var
rtn
=
await
this
[
methodname
](
pobj
,
query
,
req
);
this
.
logCtl
.
createDb
({
this
.
logCtl
.
createDb
({
appid
:
req
.
app
.
id
,
appid
:
req
.
app
.
id
,
...
@@ -33,6 +44,10 @@ class APIBase {
...
@@ -33,6 +44,10 @@ class APIBase {
opTitle
:
"api服务提供方appKey:"
+
settings
.
appKey
,
opTitle
:
"api服务提供方appKey:"
+
settings
.
appKey
,
});
});
rtn
.
requestId
=
req
.
requestId
;
rtn
.
requestId
=
req
.
requestId
;
if
(
this
.
cacheMethodList
.
indexOf
(
methodname
)
>=
0
&&
rtn
.
status
&&
rtn
.
status
==
0
){
//保存缓存
await
this
.
redisClient
.
setWithEx
(
shaStr
,
JSON
.
stringify
(
rtn
),
3600
);
}
return
rtn
;
return
rtn
;
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
.
stack
,
"api调用出现异常,请联系管理员.........."
)
console
.
log
(
e
.
stack
,
"api调用出现异常,请联系管理员.........."
)
...
...
center-channel/app/base/service/impl/common/centerorderSve.js
View file @
d9b8ff70
...
@@ -206,12 +206,12 @@ class CenterorderService extends AppServiceBase {
...
@@ -206,12 +206,12 @@ class CenterorderService extends AppServiceBase {
async
pushIcpOrderDelivery2Qfb
(
orderNo
,
needsolution
){
async
pushIcpOrderDelivery2Qfb
(
orderNo
,
needsolution
){
var
pushObj
=
{
var
pushObj
=
{
orderNo
:
orderNo
,
orderNo
:
orderNo
,
needsolution
:
needsolution
needsolution
:
needsolution
.
solutionContent
};
};
var
url
=
this
.
qifubaoUrl
+
"xxx/xxxxx"
;
var
url
=
this
.
qifubaoUrl
+
"xxx/xxxxx"
;
var
rtn
=
await
this
.
execClient
.
execPost
(
pushObj
,
url
);
var
rtn
=
await
this
.
execClient
.
execPost
(
pushObj
,
url
);
var
data
=
JSON
.
parse
(
rtn
.
stdout
);
var
data
=
JSON
.
parse
(
rtn
.
stdout
);
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
(
data
);
}
}
async
icppaysuccess
(
pobj
)
{
async
icppaysuccess
(
pobj
)
{
...
@@ -283,7 +283,7 @@ class CenterorderService extends AppServiceBase {
...
@@ -283,7 +283,7 @@ class CenterorderService extends AppServiceBase {
}
}
//--------------------------阿里IC---end--------------------------------------------------------
//--------------------------阿里IC---end--------------------------------------------------------
//--------------------------阿里ICP---start--------------------------------------------------------
//--------------------------阿里ICP---start------
无效已迁移至qcCenterOrderSve.js
--------------------------------------------------
//提交公司注册方案
//提交公司注册方案
async
submitIcpProgramme
(
pobj
)
{
async
submitIcpProgramme
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/icpapi/springBoard"
);
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/icpapi/springBoard"
);
...
...
center-channel/app/base/service/impl/common/qcCenterOrderSve.js
View file @
d9b8ff70
...
@@ -3,7 +3,7 @@ const crypto = require('crypto');
...
@@ -3,7 +3,7 @@ const crypto = require('crypto');
var
settings
=
require
(
"../../../../config/settings"
);
var
settings
=
require
(
"../../../../config/settings"
);
const
AppServiceBase
=
require
(
"../../app.base"
);
const
AppServiceBase
=
require
(
"../../app.base"
);
/**
/**
* 资质信息提报相关接口
* 资质信息提报相关接口
(ICP\EDI)
*/
*/
class
QcCenterOrderService
extends
AppServiceBase
{
class
QcCenterOrderService
extends
AppServiceBase
{
constructor
()
{
constructor
()
{
...
@@ -50,7 +50,7 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -50,7 +50,7 @@ class QcCenterOrderService extends AppServiceBase {
};
};
var
self
=
this
;
var
self
=
this
;
//推送方案
//推送方案
//
this.pushIcpSolution(pushObj,needsolution.solutionNo,pobj.appInfo,self);
this
.
pushIcpSolution
(
pushObj
,
needsolution
.
solutionNo
,
pobj
.
appInfo
,
self
);
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
return
res
;
return
res
;
...
@@ -145,13 +145,13 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -145,13 +145,13 @@ class QcCenterOrderService extends AppServiceBase {
BizId
:
ab
.
BizId
,
Note
:
ab
.
Note
BizId
:
ab
.
BizId
,
Note
:
ab
.
Note
};
};
//关闭方案
//关闭方案
//
this.aliclient.reqbyget({action:"CloseIcpProduce",reqbody:pushObj,apiVersion:"2019-05-08"});
this
.
aliclient
.
reqbyget
({
action
:
"CloseIcpProduce"
,
reqbody
:
pushObj
,
apiVersion
:
"2019-05-08"
});
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
return
res
;
return
res
;
}
}
//
icp
材料提交
//
交付
材料提交
async
serviceProviderSubmitMaterial
(
pobj
)
{
async
serviceProviderSubmitMaterial
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
...
@@ -181,12 +181,12 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -181,12 +181,12 @@ class QcCenterOrderService extends AppServiceBase {
};
};
var
self
=
this
;
var
self
=
this
;
//推送方案材料
//推送方案材料
//
self.aliclient.reqbyget({action:"SavePartnerSubmitMaterial",reqbody:pushObj,apiVersion:"2019-05-08"});
self
.
aliclient
.
reqbyget
({
action
:
"SavePartnerSubmitMaterial"
,
reqbody
:
pushObj
,
apiVersion
:
"2019-05-08"
});
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
return
res
;
return
res
;
}
}
//
icp通知
状态变更
//
通知交付
状态变更
async
serviceProviderNotification
(
pobj
)
{
async
serviceProviderNotification
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
...
@@ -196,13 +196,13 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -196,13 +196,13 @@ class QcCenterOrderService extends AppServiceBase {
OfficialFileURL
:
res
.
data
.
OfficialFileURL
,
OfficialFileURL
:
res
.
data
.
OfficialFileURL
,
ApplicationStatus
:
res
.
data
.
ApplicationStatus
ApplicationStatus
:
res
.
data
.
ApplicationStatus
};
};
//推送
方案
//推送
状态变更
//
this.aliclient.reqbyget({action:"AcceptPartnerNotification",reqbody:pushObj,apiVersion:"2019-05-08"});
this
.
aliclient
.
reqbyget
({
action
:
"AcceptPartnerNotification"
,
reqbody
:
pushObj
,
apiVersion
:
"2019-05-08"
});
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
return
res
;
return
res
;
}
}
//
服务商icp方案
关闭
//
交付单
关闭
async
closeOrderDelivery
(
pobj
)
{
async
closeOrderDelivery
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
...
@@ -213,7 +213,7 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -213,7 +213,7 @@ class QcCenterOrderService extends AppServiceBase {
BizId
:
needsolution
.
channelSolutionNo
,
Note
:
ab
.
note
BizId
:
needsolution
.
channelSolutionNo
,
Note
:
ab
.
note
};
};
//关闭方案
//关闭方案
//
this.aliclient.reqbyget({action:"CloseIcpProduce",reqbody:pushObj,apiVersion:"2019-05-08"});
this
.
aliclient
.
reqbyget
({
action
:
"CloseIcpProduce"
,
reqbody
:
pushObj
,
apiVersion
:
"2019-05-08"
});
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
return
res
;
return
res
;
...
...
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