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
85aee723
Commit
85aee723
authored
Nov 03, 2020
by
任晓松
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/center-channel' into center-channel
parents
50cd8803
d960d044
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
106 additions
and
29 deletions
+106
-29
center-channel/app/base/api/impl/icp/consultation.js
+15
-8
center-channel/app/base/api/impl/icp/feedback.js
+9
-8
center-channel/app/base/api/impl/icp/order.js
+16
-8
center-channel/app/base/service/impl/common/signSve.js
+6
-4
center-channel/app/base/service/impl/utilsSve/utilsDeliverSystemSve.js
+5
-0
center-channel/app/config/environment.js
+1
-1
center-channel/app/front/entry/public/apidoc/README.md
+3
-0
center-channel/app/front/entry/public/apidoc/platform/baiduIcp.md
+51
-0
No files found.
center-channel/app/base/api/impl/icp/consultation.js
View file @
85aee723
...
@@ -19,19 +19,20 @@ class Consultation extends APIBase {
...
@@ -19,19 +19,20 @@ class Consultation extends APIBase {
}
}
getResultSuccess
(
requestId
)
{
getResultSuccess
(
requestId
)
{
return
{
return
{
"
requestId"
:
requestId
,
"
status"
:
0
,
"
success"
:
true
,
"
msg"
:
"success"
,
"
errorMsg"
:
""
,
"
data"
:
null
,
"
errorCode"
:
"ok"
"
requestId"
:
requestId
}
}
;
}
}
getResultFail
(
errmsg
)
{
getResultFail
(
errmsg
)
{
var
self
=
this
;
var
self
=
this
;
return
{
return
{
"status"
:
-
1
,
"msg"
:
errmsg
,
"requestId"
:
self
.
getUUID
(),
"requestId"
:
self
.
getUUID
(),
"success"
:
false
,
"data"
:
null
,
"errorMsg"
:
errmsg
,
"bizmsg"
:
"empty"
"errorCode"
:
"ok"
};
};
}
}
...
@@ -50,6 +51,12 @@ class Consultation extends APIBase {
...
@@ -50,6 +51,12 @@ class Consultation extends APIBase {
if
(
!
pobj
.
consultType
)
{
if
(
!
pobj
.
consultType
)
{
return
self
.
getResultFail
(
"consultType不能为空"
);
return
self
.
getResultFail
(
"consultType不能为空"
);
}
}
if
(
pobj
.
consultType
==
"ICP"
)
{
pobj
.
consultType
=
"5"
;
}
if
(
pobj
.
consultType
==
"EDI"
)
{
pobj
.
consultType
=
"7"
;
}
pobj
.
type
=
pobj
.
consultType
;
pobj
.
type
=
pobj
.
consultType
;
pobj
.
mobile
=
pobj
.
phone
;
pobj
.
mobile
=
pobj
.
phone
;
pobj
.
action_type
=
"submitIcpNeed"
;
pobj
.
action_type
=
"submitIcpNeed"
;
...
...
center-channel/app/base/api/impl/icp/feedback.js
View file @
85aee723
...
@@ -19,19 +19,20 @@ class Feedback extends APIBase {
...
@@ -19,19 +19,20 @@ class Feedback extends APIBase {
}
}
getResultSuccess
(
requestId
)
{
getResultSuccess
(
requestId
)
{
return
{
return
{
"
requestId"
:
requestId
,
"
status"
:
0
,
"
success"
:
true
,
"
msg"
:
"success"
,
"
errorMsg"
:
""
,
"
data"
:
null
,
"
errorCode"
:
"ok"
"
requestId"
:
requestId
}
}
;
}
}
getResultFail
(
errmsg
)
{
getResultFail
(
errmsg
)
{
var
self
=
this
;
var
self
=
this
;
return
{
return
{
"status"
:
-
1
,
"msg"
:
errmsg
,
"requestId"
:
self
.
getUUID
(),
"requestId"
:
self
.
getUUID
(),
"success"
:
false
,
"data"
:
null
,
"errorMsg"
:
errmsg
,
"bizmsg"
:
"empty"
"errorCode"
:
"ok"
};
};
}
}
...
...
center-channel/app/base/api/impl/icp/order.js
View file @
85aee723
...
@@ -19,19 +19,20 @@ class Order extends APIBase {
...
@@ -19,19 +19,20 @@ class Order extends APIBase {
}
}
getResultSuccess
(
requestId
)
{
getResultSuccess
(
requestId
)
{
return
{
return
{
"
requestId"
:
requestId
,
"
status"
:
0
,
"
success"
:
true
,
"
msg"
:
"success"
,
"
errorMsg"
:
""
,
"
data"
:
null
,
"
errorCode"
:
"ok"
"
requestId"
:
requestId
}
}
;
}
}
getResultFail
(
errmsg
)
{
getResultFail
(
errmsg
)
{
var
self
=
this
;
var
self
=
this
;
return
{
return
{
"status"
:
-
1
,
"msg"
:
errmsg
,
"requestId"
:
self
.
getUUID
(),
"requestId"
:
self
.
getUUID
(),
"success"
:
false
,
"data"
:
null
,
"errorMsg"
:
errmsg
,
"bizmsg"
:
"empty"
"errorCode"
:
"ok"
};
};
}
}
...
@@ -57,6 +58,13 @@ class Order extends APIBase {
...
@@ -57,6 +58,13 @@ class Order extends APIBase {
}
}
if
(
pobj
.
isDirectBuy
==
1
&&
!
pobj
.
consultType
)
{
if
(
pobj
.
isDirectBuy
==
1
&&
!
pobj
.
consultType
)
{
return
self
.
getResultFail
(
"直接下单consultType不能为空"
);
return
self
.
getResultFail
(
"直接下单consultType不能为空"
);
}
else
{
if
(
pobj
.
consultType
==
"ICP"
)
{
pobj
.
consultType
=
"5"
;
}
if
(
pobj
.
consultType
==
"EDI"
)
{
pobj
.
consultType
=
"7"
;
}
}
}
pobj
.
action_type
=
"icpOrderStatus"
;
pobj
.
action_type
=
"icpOrderStatus"
;
var
param
=
{
var
param
=
{
...
...
center-channel/app/base/service/impl/common/signSve.js
View file @
85aee723
...
@@ -103,10 +103,12 @@ class SignService{
...
@@ -103,10 +103,12 @@ class SignService{
module
.
exports
=
SignService
;
module
.
exports
=
SignService
;
// var task = new SignService();
// var task = new SignService();
// var obj = {
// var obj = {
// "bizId":"ICP202010221032hhvcUV2",
// "intentionBizId": "TRE-nmnHtEoTjeEtest",
// "isDirectBuy":"0",
// "phone": "13126673246",
// "orderNo":"ICPO20201022103hhvcUV2"
// "userName": "",
// ,"sign": "4F598C56E565628107B5A9A851D4B6A4"
// "description": "111111",
// "area": "BEIJING",
// "consultType": "EDI"
// };
// };
// task.createSign(obj,"7cbb892450174167b5c7e01we4716t51").then(d=>{
// task.createSign(obj,"7cbb892450174167b5c7e01we4716t51").then(d=>{
// console.log(d,"!!!!!!!!!!!!!!!!!!!!!!!!!!");
// console.log(d,"!!!!!!!!!!!!!!!!!!!!!!!!!!");
...
...
center-channel/app/base/service/impl/utilsSve/utilsDeliverSystemSve.js
View file @
85aee723
...
@@ -19,6 +19,11 @@ class UtilsDeliverSystemService extends AppServiceBase {
...
@@ -19,6 +19,11 @@ class UtilsDeliverSystemService extends AppServiceBase {
return
await
this
.
disposePushResultFail
(
pobj
,
verifyResult
,
"deliver->pushBusiness2DeliverSystem->verifyResult"
,
this
.
pushlogFailType
.
FQ
);
return
await
this
.
disposePushResultFail
(
pobj
,
verifyResult
,
"deliver->pushBusiness2DeliverSystem->verifyResult"
,
this
.
pushlogFailType
.
FQ
);
}
}
var
interface_params_info
=
verifyResult
.
data
;
var
interface_params_info
=
verifyResult
.
data
;
if
(
interface_params_info
.
headData
){
if
(
pobj
&&
pobj
.
appInfo
&&
pobj
.
appInfo
.
app_code
){
interface_params_info
.
headData
.
appcode
=
pobj
.
appInfo
.
app_code
;
}
}
var
reqParams
=
{
var
reqParams
=
{
actionType
:
"produceData"
,
// Y 功能名称
actionType
:
"produceData"
,
// Y 功能名称
actionBody
:
{
actionBody
:
{
...
...
center-channel/app/config/environment.js
View file @
85aee723
...
@@ -30,7 +30,7 @@ module.exports = function (app) {
...
@@ -30,7 +30,7 @@ module.exports = function (app) {
res
.
header
(
'Access-Control-Allow-Headers'
,
'Content-Type, Content-Length, Authorization, Accept, X-Requested-With , yourHeaderFeild,Authorization,XAPPKEY,XFROMAPPKEY,XFROMCOMPANYKEY,XREGROLE,XBIZPATH,token,userpin'
);
res
.
header
(
'Access-Control-Allow-Headers'
,
'Content-Type, Content-Length, Authorization, Accept, X-Requested-With , yourHeaderFeild,Authorization,XAPPKEY,XFROMAPPKEY,XFROMCOMPANYKEY,XREGROLE,XBIZPATH,token,userpin'
);
res
.
header
(
'Access-Control-Allow-Methods'
,
'PUT, POST, GET, DELETE, OPTIONS'
);
res
.
header
(
'Access-Control-Allow-Methods'
,
'PUT, POST, GET, DELETE, OPTIONS'
);
// res.header('Access-Control-Allow-Credentials', 'true');
// res.header('Access-Control-Allow-Credentials', 'true');
res
.
header
(
'content-type'
,
'
text/html
;charset=UTF-8'
);
res
.
header
(
'content-type'
,
'
application/json
;charset=UTF-8'
);
if
(
req
.
method
==
'OPTIONS'
)
{
if
(
req
.
method
==
'OPTIONS'
)
{
res
.
send
(
200
);
//让options请求快速返回/
res
.
send
(
200
);
//让options请求快速返回/
}
}
...
...
center-channel/app/front/entry/public/apidoc/README.md
View file @
85aee723
...
@@ -68,3 +68,5 @@
...
@@ -68,3 +68,5 @@
## 21. 诊断运营端相关接口
## 21. 诊断运营端相关接口
1
[
诊断运营端相关接口
](
doc/api/appDesc/diagnosisneedbusDesc.md
)
1
[
诊断运营端相关接口
](
doc/api/appDesc/diagnosisneedbusDesc.md
)
## 22. 百度ICP对接相关接口
1
[
ICP订单接口
](
doc/api/platform/baiduIcp.md
)
\ No newline at end of file
center-channel/app/front/entry/public/apidoc/platform/baiduIcp.md
0 → 100644
View file @
85aee723
<a
name=
"menu"
href=
"/doc"
>
返回主目录
</a>
1.
[
接口调用说明
](
#interfaceDesc
)
1.
[
同步需求给服务商
](
#consultationsubmit
)
## **<a name="interfaceDesc"> 接口调用说明</a>**
[
返回到目录
](
#menu
)
##### 接口描述
统一的接口调用,调用其他接口参考此示例
#### sign签名规则
所有请求参数(去除sign参数)首字符进行ASCII正序排序,对排序后的参数值进行签名,如:area=1&consultType=5&description=需求测试_001&intentionBizIdI=20200320201737000001&phone=13800138000&userName=李四
其中参数值拼接后最后在加上key,key为获取的密钥信息,拼接后字符串:
area=1&consultType=5&description=需求测试_001&intentionBizIdI=20200320201737000001&phone=13800138000&userName=李四&key=7cbb892450174167b5c7e01we4716t51
之后对拼接的字符串进行md5加密就得到sign值
## **<a name="consultationsubmit"> 同步需求给服务商</a>**
[
返回到目录
](
#menu
)
##### 接⼝描述
合作方⽤户提交服务咨询后(需求订单),调⽤服务商接⼝提交服务咨询信息
##### URL
[
/api/icp/consultation/submit
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 请求头中需要增加appkey的值
#### 请求参数
#### 参数示例
```
javascript
{
"intentionBizId"
:
"zhuangbingceshi008"
,
"phone"
:
"13075556693"
,
"userName"
:
"庄冰"
,
"description"
:
"1111111111111222"
,
"area"
:
"1"
,
"consultType"
:
5
,
"sign"
:
"2713C75F75B0713E525EEB39BB7D5BD3"
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
// 0为成功,否则失败
"msg"
:
"success"
,
"data"
:
null
,
"requestId"
:
"a277fb799d9f4dda9053fb8830f9d252"
}
```
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