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
6ddd4fd1
Commit
6ddd4fd1
authored
Apr 03, 2020
by
王栋源
Browse files
Options
Browse Files
Download
Plain Diff
wdy
parents
48fccf23
82e24c8d
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
401 additions
and
88 deletions
+401
-88
center-channel/app/base/api/impl/auth/channelAccessAuth.js
+3
-0
center-channel/app/base/api/impl/opaction/opOrder.js
+4
-2
center-channel/app/base/api/impl/opaction/order.js
+1
-2
center-channel/app/base/service/app.base.js
+74
-0
center-channel/app/base/service/impl/utilsSve/utilsChannelAuthSve.js
+6
-1
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
+70
-40
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+3
-3
center-channel/app/base/service/impl/utilsSve/utilsOpOrderSve.js
+57
-2
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+9
-9
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
+8
-7
center-channel/app/base/service/impl/utilsSve/utilsTmAliyunSve.js
+55
-0
center-channel/app/base/utils/aliyunClient.js
+35
-5
center-channel/app/config/routes/api.js
+1
-1
center-channel/app/config/settings.js
+1
-1
center-channel/app/front/entry/public/apidoc/platform/order.md
+5
-6
center-channel/app/front/entry/public/apidoc/platform/tmOrder.md
+33
-3
center-channel/提示编码使用
+9
-3
center-channel/阿里文档
+27
-3
No files found.
center-channel/app/base/api/impl/auth/channelAccessAuth.js
View file @
6ddd4fd1
...
@@ -49,6 +49,9 @@ class ChannelAccessAuthAPI extends WEBBase {
...
@@ -49,6 +49,9 @@ class ChannelAccessAuthAPI extends WEBBase {
opResult
.
data
.
userpin
=
tmpOpResult
.
data
.
userpin
;
opResult
.
data
.
userpin
=
tmpOpResult
.
data
.
userpin
;
}
}
break
;
break
;
case
"getDingJsApiAuthInfo"
:
//获取钉钉鉴权信息
opResult
=
await
this
.
utilsChannelAuthSve
.
getDingJsApiAuthInfo
(
pobj
,
pobj
.
actionBody
);
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
break
;
...
...
center-channel/app/base/api/impl/opaction/opOrder.js
View file @
6ddd4fd1
...
@@ -32,6 +32,9 @@ class ProductAPI extends WEBBase {
...
@@ -32,6 +32,9 @@ class ProductAPI extends WEBBase {
case
"updateTmOrder"
:
//修改商标订单信息
case
"updateTmOrder"
:
//修改商标订单信息
opResult
=
await
this
.
utilsOpOrderSve
.
updateTmOrder
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsOpOrderSve
.
updateTmOrder
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
case
"tmConfirm"
:
//商标方案确认
opResult
=
await
this
.
utilsOpOrderSve
.
tmConfirm
(
pobj
,
pobj
.
actionBody
);
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
break
;
...
@@ -40,4 +43,4 @@ class ProductAPI extends WEBBase {
...
@@ -40,4 +43,4 @@ class ProductAPI extends WEBBase {
}
}
}
}
module
.
exports
=
ProductAPI
;
module
.
exports
=
ProductAPI
;
\ No newline at end of file
center-channel/app/base/api/impl/opaction/order.js
View file @
6ddd4fd1
...
@@ -61,4 +61,4 @@ class ProductAPI extends WEBBase {
...
@@ -61,4 +61,4 @@ class ProductAPI extends WEBBase {
}
}
}
}
module
.
exports
=
ProductAPI
;
module
.
exports
=
ProductAPI
;
\ No newline at end of file
center-channel/app/base/service/app.base.js
View file @
6ddd4fd1
...
@@ -7,6 +7,8 @@ class AppServiceBase {
...
@@ -7,6 +7,8 @@ class AppServiceBase {
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
execClient
=
system
.
getObject
(
"util.execClient"
);
this
.
execClient
=
system
.
getObject
(
"util.execClient"
);
this
.
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
this
.
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
this
.
pushlogSve
=
system
.
getObject
(
"service.common.pushlogSve"
);
this
.
logCtl
=
system
.
getObject
(
"service.common.oplogSve"
);
}
}
/**
/**
* 验证签名
* 验证签名
...
@@ -57,6 +59,78 @@ class AppServiceBase {
...
@@ -57,6 +59,78 @@ class AppServiceBase {
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
return
result
;
return
result
;
}
}
async
opAliyunRpcVerifyParam
(
pobj
)
{
//参数信息验证
var
verify
=
system
.
getResultSuccess
();
if
(
!
pobj
.
interface_params
)
{
verify
=
system
.
getResult
(
null
,
"interface_params can not be empty,100440"
);
}
var
interface_params_info
=
JSON
.
parse
(
pobj
.
interface_params
);
if
(
!
interface_params_info
||
!
interface_params_info
.
action
)
{
verify
=
system
.
getResult
(
null
,
"interface_params.action can not be empty,100443"
);
}
verify
.
data
=
interface_params_info
;
return
verify
;
}
/**
* 阿里RPC调用
* @param {*} pobj {action: rpcParam.action,reqbody: pobj.actionBody,rpcParam: rpcParam}
* @param {*} params {为阿里的接口参数}
*/
async
opAliyunRpcReq
(
pobj
,
params
)
{
try
{
// var action = obj.action;
// var reqbody = obj.reqbody;
// var rpcParam = obj.rpcParam;
var
aliyunClient
=
system
.
getObject
(
"util.aliyunClient"
);
var
rtn
=
await
aliyunClient
.
reqCustomByGet
(
params
);
if
(
rtn
.
code
!=
200
&&
rtn
.
success
!=
true
)
{
this
.
pushlogSve
.
createDb
({
appid
:
pobj
.
appInfo
.
uapp_id
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
requestId
:
pobj
.
requestId
||
""
,
op
:
JSON
.
stringify
(
pobj
.
interface_info
),
//推送的接口信息
content
:
JSON
.
stringify
(
pobj
),
//推送的参数信息
resultInfo
:
JSON
.
stringify
(
rtn
),
returnType
:
'0'
,
opTitle
:
pobj
.
opType
+
"推送操作出错->opAliyunClientPost"
});
return
system
.
getResult
(
null
,
"推送失败,失败原因:"
+
rtn
.
errorMsg
+
",requestId="
+
rtn
.
requestId
);
}
this
.
pushlogSve
.
createDb
({
appid
:
pobj
.
appInfo
.
uapp_id
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
op
:
JSON
.
stringify
(
pobj
.
interface_info
),
//推送的接口信息
content
:
JSON
.
stringify
(
pobj
),
//推送的参数信息
resultInfo
:
JSON
.
stringify
(
rtn
),
returnType
:
'1'
,
opTitle
:
pobj
.
opType
+
"数据推送成功->opAliyunClientPost"
});
return
system
.
getResultSuccess
(
null
,
"推送成功"
);
}
catch
(
e
)
{
this
.
pushlogSve
.
createDb
({
appid
:
pobj
.
appInfo
.
uapp_id
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
op
:
JSON
.
stringify
(
pobj
.
interface_info
),
//推送的接口信息
content
:
JSON
.
stringify
(
pobj
),
//推送的参数信息
resultInfo
:
"error:"
+
e
.
stack
,
returnType
:
'0'
,
opTitle
:
pobj
.
opType
+
"推送操作异常->opAliyunClientPost"
});
//日志记录
this
.
logCtl
.
error
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"center-channel/app/base/service/impl/utilsSve/opAliyunClientPost.js/"
+
methodName
,
content
:
"error:"
+
e
.
stack
,
// clientIp: pobj.clientIp,
optitle
:
pobj
.
opType
+
"推送操作异常->opAliyunClientPost"
,
});
return
system
.
getResult
(
null
,
"推送error"
);
}
}
/*
/*
返回20位业务订单号
返回20位业务订单号
prefix:业务前缀
prefix:业务前缀
...
...
center-channel/app/base/service/impl/utilsSve/utilsChannelAuthSve.js
View file @
6ddd4fd1
...
@@ -10,7 +10,7 @@ class UtilsChannelAuthService extends AppServiceBase {
...
@@ -10,7 +10,7 @@ class UtilsChannelAuthService extends AppServiceBase {
}
}
//---------------登录-----------------------------------------------------
//---------------登录-----------------------------------------------------
async
getH5AliDingUserByCode
(
pobj
,
actionBody
)
{
//
获取token
async
getH5AliDingUserByCode
(
pobj
,
actionBody
)
{
//
渠道通过账户进行登录,有则返回用户信息,没有则创建用户
if
(
!
actionBody
.
code
)
{
if
(
!
actionBody
.
code
)
{
return
system
.
getResult
(
null
,
"actionBody.code can not be empty"
);
return
system
.
getResult
(
null
,
"actionBody.code can not be empty"
);
}
}
...
@@ -18,5 +18,10 @@ class UtilsChannelAuthService extends AppServiceBase {
...
@@ -18,5 +18,10 @@ class UtilsChannelAuthService extends AppServiceBase {
return
result
;
return
result
;
}
}
async
getDingJsApiAuthInfo
(
pobj
,
actionBody
)
{
//获取token
var
result
=
await
this
.
restPostUrl
(
pobj
,
this
.
centerAppUrl
+
"auth/channelAccessAuth/getDingJsApiAuthInfo"
);
return
result
;
}
}
}
module
.
exports
=
UtilsChannelAuthService
;
module
.
exports
=
UtilsChannelAuthService
;
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
View file @
6ddd4fd1
var
system
=
require
(
"../../../system"
);
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
const
AppServiceBase
=
require
(
"../../app.base"
);
const
AppServiceBase
=
require
(
"../../app.base"
);
const
aliyunClient
=
system
.
getObject
(
"util.aliyunClient"
);
//此类用来db中配置来进行调用
class
UtilsFqAliyunService
extends
AppServiceBase
{
class
UtilsFqAliyunService
extends
AppServiceBase
{
constructor
()
{
constructor
()
{
super
();
super
();
this
.
logCtl
=
system
.
getObject
(
"service.common.oplogSve"
);
this
.
pushlogSve
=
system
.
getObject
(
"service.common.pushlogSve"
);
}
async
pushOldNeedBusiness
(
pobj
)
{
//推送旧的需求商机
return
system
.
getResultSuccess
();
}
}
async
pushOrderBusiness
(
pobj
)
{
//推送订单商机
async
pushOrderBusinessByProductCode2Fq
(
pobj
)
{
//推送自定义产品码的订单商机到峰擎(订单已经支付成功才推送)
var
verify
=
await
this
.
verifyParam
(
pobj
);
var
orderInfo
=
pobj
.
actionBody
.
order_info
;
var
orderInfo
=
pobj
.
actionBody
.
order_info
;
var
orderContact
=
pobj
.
actionBody
.
order_contact
;
var
productInfo
=
pobj
.
actionBody
.
product_info
;
if
(
!
orderInfo
)
{
if
(
!
orderInfo
)
{
return
""
;
verify
=
system
.
getResult
(
null
,
"orderInfo can not be empty,100420"
)
;
}
}
if
(
orderInfo
.
orderStatus
<
2
)
{
if
(
!
orderInfo
.
orderStatus
||
orderInfo
.
orderStatus
<
2
)
{
return
""
;
verify
=
system
.
getResult
(
null
,
"orderInfo status must be paid,100423"
)
;
}
}
var
orderContact
=
pobj
.
actionBody
.
order_contact
;
if
(
!
orderContact
||
!
orderContact
.
mobile
)
{
var
productInfo
=
pobj
.
actionBody
.
product_info
;
verify
=
system
.
getResult
(
null
,
"orderInfo.orderContact.mobile can not be empty,100425"
);
if
(
!
pobj
.
interface_params
)
{
return
""
;
}
}
var
interface_params_info
=
JSON
.
parse
(
pobj
.
interface_params
);
if
(
!
productInfo
||
!
productInfo
.
service_business_code
)
{
if
(
!
interface_params_info
||
!
interface_params_info
.
opUrl
||
!
interface_params_info
.
key
||
!
interface_params_info
.
secret
)
{
verify
=
system
.
getResult
(
null
,
"orderInfo.productInfo.service_business_code can not be empty,100427"
);
return
""
;
}
if
(
!
productInfo
||
!
productInfo
.
price_item
||
!
productInfo
.
price_item
.
service_code
)
{
verify
=
system
.
getResult
(
null
,
"orderInfo.productInfo.price_item.service_code can not be empty,100430"
);
}
if
(
verify
.
status
!=
0
)
{
this
.
pushlogSve
.
createDb
({
appid
:
pobj
.
appInfo
.
uapp_id
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"暂无推送的接口信息"
+
",verify-msg:"
+
verify
.
msg
,
//推送的接口信息
content
:
JSON
.
stringify
(
pobj
),
//推送的参数信息
resultInfo
:
""
,
returnType
:
'0'
,
opTitle
:
pobj
.
opType
+
"推送操作失败->opAliyunClientPost"
});
return
verify
;
}
}
var
interface_params_info
=
verify
.
data
;
var
params
=
{
var
params
=
{
idempotentId
:
orderInfo
.
orderNo
,
// 是 业务 ID
idempotentId
:
orderInfo
.
orderNo
,
// 是 业务 ID
idempotentSource
:
productInfo
.
service_business_code
,
// 是 业务来源(ic_jdyun、ic_ali)
idempotentSource
:
productInfo
.
service_business_code
,
// 是 业务来源(ic_jdyun、ic_ali)
idempotentSourceName
:
productInfo
.
service_business_code
,
// 是 京东云应用、阿里云应用
idempotentSourceName
:
productInfo
.
service_business_
name
||
productInfo
.
service_business_
code
,
// 是 京东云应用、阿里云应用
city
:
""
,
// 否 所属城市
city
:
""
,
// 否 所属城市
phone
:
orderContact
.
mobile
,
// 是 手机号
phone
:
orderContact
.
mobile
,
// 是 手机号
userId
:
orderInfo
.
channelUserId
,
// 否 用户 ID
userId
:
orderInfo
.
channelUserId
,
// 否 用户 ID
...
@@ -45,36 +56,53 @@ class UtilsFqAliyunService extends AppServiceBase {
...
@@ -45,36 +56,53 @@ class UtilsFqAliyunService extends AppServiceBase {
var
result
=
this
.
opAliyunClientPost
(
pobj
,
"pushOrderBusiness"
,
interface_params_info
.
opUrl
,
interface_params_info
.
key
,
interface_params_info
.
secret
,
params
);
var
result
=
this
.
opAliyunClientPost
(
pobj
,
"pushOrderBusiness"
,
interface_params_info
.
opUrl
,
interface_params_info
.
key
,
interface_params_info
.
secret
,
params
);
}
}
async
pushAliBusiness2Fq
(
pobj
)
{
//推送阿里工商需求商机
/**
* 推送阿里信息操作到峰擎
* 阿里操作的信息不变外加增加组装的一些参数(推送工商需求商机、推送工商订单商机、推送关闭工商需求)
* @param {*} pobj
*/
async
pushAliBusiness2Fq
(
pobj
)
{
//推送阿里信息操作到峰擎
var
verify
=
await
this
.
verifyParam
(
pobj
);
if
(
verify
.
status
!=
0
)
{
this
.
pushlogSve
.
createDb
({
appid
:
pobj
.
appInfo
.
uapp_id
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"暂无推送的接口信息"
+
",verify-msg:"
+
verify
.
msg
,
//推送的接口信息
content
:
JSON
.
stringify
(
pobj
),
//推送的参数信息
resultInfo
:
""
,
returnType
:
'0'
,
opTitle
:
pobj
.
opType
+
"推送操作失败->opAliyunClientPost"
});
return
verify
;
}
var
interface_params_info
=
verify
.
data
;
this
.
opAliyunClientPost
(
pobj
,
interface_params_info
.
opUrl
,
interface_params_info
.
key
,
interface_params_info
.
secret
,
pobj
.
actionBody
);
}
async
verifyParam
(
pobj
)
{
//参数信息验证
var
verify
=
system
.
getResultSuccess
();
if
(
!
pobj
.
interface_params
)
{
if
(
!
pobj
.
interface_params
)
{
return
""
;
verify
=
system
.
getResult
(
null
,
"interface_params can not be empty,100400"
)
;
}
}
var
interface_params_info
=
JSON
.
parse
(
pobj
.
interface_params
);
var
interface_params_info
=
JSON
.
parse
(
pobj
.
interface_params
);
if
(
!
interface_params_info
||
!
interface_params_info
.
opUrl
||
!
interface_params_info
.
key
||
!
interface_params_info
.
secret
)
{
if
(
!
interface_params_info
||
!
interface_params_info
.
opUrl
||
!
interface_params_info
.
key
||
!
interface_params_info
.
secret
)
{
return
""
;
verify
=
system
.
getResult
(
null
,
"interface_params(opUrl、key、secret) can not be empty,100410"
)
;
}
}
var
result
=
this
.
opAliyunClientPost
(
pobj
,
"pushAliIcNeedBusiness"
,
interface_params_info
.
opUrl
,
interface_params_info
.
key
,
interface_params_info
.
secret
,
pobj
.
actionBody
);
verify
.
data
=
interface_params_info
;
return
verify
;
}
}
async
opAliyunClientPost
(
pobj
,
methodName
,
url
,
key
,
secret
,
params
)
{
async
opAliyunClientPost
(
pobj
,
url
,
key
,
secret
,
params
)
{
try
{
try
{
var
rc
=
system
.
getObject
(
"util.aliyunClient"
);
var
rc
=
system
.
getObject
(
"util.aliyunClient"
);
var
rtn
=
await
rc
.
post
(
url
,
key
,
secret
,
params
);
var
rtn
=
await
rc
.
post
(
url
,
key
,
secret
,
params
);
this
.
logCtl
.
info
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"center-channel/app/base/service/impl/utilsSve/opAliyunClientPost.js/"
+
methodName
,
content
:
"请求地址:"
+
url
+
",参数:"
+
JSON
.
stringify
(
params
)
+
",返回结果:"
+
JSON
.
stringify
(
rtn
),
optitle
:
"推送商机->opAliyunClientPost"
,
});
if
(
rtn
.
code
!=
200
&&
rtn
.
success
!=
true
)
{
if
(
rtn
.
code
!=
200
&&
rtn
.
success
!=
true
)
{
this
.
pushlogSve
.
createDb
({
this
.
pushlogSve
.
createDb
({
appid
:
pobj
.
appInfo
.
uapp_id
,
appid
:
pobj
.
appInfo
.
uapp_id
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
requestId
:
pobj
.
requestId
||
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"推送的接口信息:"
+
JSON
.
stringify
(
pobj
.
interface_info
),
op
:
JSON
.
stringify
(
pobj
.
interface_info
),
//推送的接口信息
content
:
"推送的参数信息:"
+
JSON
.
stringify
(
pobj
),
content
:
JSON
.
stringify
(
pobj
),
//推送的参数信息
resultInfo
:
JSON
.
stringify
(
rtn
),
resultInfo
:
JSON
.
stringify
(
rtn
),
returnType
:
'0'
,
returnType
:
'0'
,
opTitle
:
pobj
.
opType
+
"推送操作出错->opAliyunClientPost"
opTitle
:
pobj
.
opType
+
"推送操作出错->opAliyunClientPost"
...
@@ -84,8 +112,9 @@ class UtilsFqAliyunService extends AppServiceBase {
...
@@ -84,8 +112,9 @@ class UtilsFqAliyunService extends AppServiceBase {
this
.
pushlogSve
.
createDb
({
this
.
pushlogSve
.
createDb
({
appid
:
pobj
.
appInfo
.
uapp_id
,
appid
:
pobj
.
appInfo
.
uapp_id
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
op
:
"推送的接口信息:"
+
JSON
.
stringify
(
pobj
.
interface_info
),
requestId
:
pobj
.
requestId
||
""
,
content
:
"推送的参数信息:"
+
JSON
.
stringify
(
pobj
),
op
:
JSON
.
stringify
(
pobj
.
interface_info
),
//推送的接口信息
content
:
JSON
.
stringify
(
pobj
),
//推送的参数信息
resultInfo
:
JSON
.
stringify
(
rtn
),
resultInfo
:
JSON
.
stringify
(
rtn
),
returnType
:
'1'
,
returnType
:
'1'
,
opTitle
:
pobj
.
opType
+
"数据推送成功->opAliyunClientPost"
opTitle
:
pobj
.
opType
+
"数据推送成功->opAliyunClientPost"
...
@@ -95,8 +124,9 @@ class UtilsFqAliyunService extends AppServiceBase {
...
@@ -95,8 +124,9 @@ class UtilsFqAliyunService extends AppServiceBase {
this
.
pushlogSve
.
createDb
({
this
.
pushlogSve
.
createDb
({
appid
:
pobj
.
appInfo
.
uapp_id
,
appid
:
pobj
.
appInfo
.
uapp_id
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
op
:
"推送的接口信息:"
+
JSON
.
stringify
(
pobj
.
interface_info
),
requestId
:
pobj
.
requestId
||
""
,
content
:
"推送的参数信息:"
+
JSON
.
stringify
(
pobj
),
op
:
JSON
.
stringify
(
pobj
.
interface_info
),
//推送的接口信息
content
:
JSON
.
stringify
(
pobj
),
//推送的参数信息
resultInfo
:
"error:"
+
e
.
stack
,
resultInfo
:
"error:"
+
e
.
stack
,
returnType
:
'0'
,
returnType
:
'0'
,
opTitle
:
pobj
.
opType
+
"推送操作异常->opAliyunClientPost"
opTitle
:
pobj
.
opType
+
"推送操作异常->opAliyunClientPost"
...
@@ -106,7 +136,7 @@ class UtilsFqAliyunService extends AppServiceBase {
...
@@ -106,7 +136,7 @@ class UtilsFqAliyunService extends AppServiceBase {
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"center-channel/app/base/service/impl/utilsSve/opAliyunClientPost.js/
"
+
methodName
,
op
:
"center-channel/app/base/service/impl/utilsSve/opAliyunClientPost.js/
opAliyunClientPost"
,
content
:
"error:"
+
e
.
stack
,
content
:
"error:"
+
e
.
stack
,
// clientIp: pobj.clientIp,
// clientIp: pobj.clientIp,
optitle
:
pobj
.
opType
+
"推送操作异常->opAliyunClientPost"
,
optitle
:
pobj
.
opType
+
"推送操作异常->opAliyunClientPost"
,
...
...
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
6ddd4fd1
...
@@ -48,7 +48,7 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -48,7 +48,7 @@ class UtilsNeedService extends AppServiceBase {
*/
*/
async
getItemByNeedNo
(
pobj
,
actionBody
)
{
async
getItemByNeedNo
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
needNo
)
{
if
(
!
actionBody
.
needNo
)
{
return
system
.
getResult
(
null
,
"actionBody.needNo can not be empty,10038
0
"
);
return
system
.
getResult
(
null
,
"actionBody.needNo can not be empty,10038
5
"
);
}
}
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
itemResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
itemResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
...
@@ -61,7 +61,7 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -61,7 +61,7 @@ class UtilsNeedService extends AppServiceBase {
*/
*/
async
getItemByChannelNeedNo
(
pobj
,
actionBody
)
{
async
getItemByChannelNeedNo
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
needNo
)
{
if
(
!
actionBody
.
needNo
)
{
return
system
.
getResult
(
null
,
"actionBody.needNo can not be empty,1003
8
0"
);
return
system
.
getResult
(
null
,
"actionBody.needNo can not be empty,1003
9
0"
);
}
}
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
itemResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
itemResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
...
@@ -74,7 +74,7 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -74,7 +74,7 @@ class UtilsNeedService extends AppServiceBase {
*/
*/
async
needClose
(
pobj
,
actionBody
)
{
async
needClose
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
intentionBizId
)
{
if
(
!
actionBody
.
intentionBizId
)
{
return
system
.
getResult
(
null
,
"actionBody.intentionBizId can not be empty,1003
80
"
);
return
system
.
getResult
(
null
,
"actionBody.intentionBizId can not be empty,1003
95
"
);
}
}
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
...
...
center-channel/app/base/service/impl/utilsSve/utilsOpOrderSve.js
View file @
6ddd4fd1
...
@@ -42,12 +42,67 @@ class UtilsOpOrderService extends AppServiceBase {
...
@@ -42,12 +42,67 @@ class UtilsOpOrderService extends AppServiceBase {
channel_nickname
:
pobj
.
userInfo
.
channel_nickname
channel_nickname
:
pobj
.
userInfo
.
channel_nickname
};
};
var
tmpPobj
=
{
var
tmpPobj
=
{
appInfo
:
opResult
.
data
.
appInfo
,
appInfo
:
pobj
.
appInfo
,
actionBody
:
opR
esult
.
data
actionBody
:
r
esult
.
data
}
}
delete
result
.
data
[
"orderStatus"
];
delete
result
.
data
[
"orderStatus"
];
this
.
utilsPushSve
.
pushBusInfo
(
tmpPobj
,
opType
,
1
);
this
.
utilsPushSve
.
pushBusInfo
(
tmpPobj
,
opType
,
1
);
}
}
}
}
async
tmConfirm
(
pobj
,
actionBody
){
//商标方案确认
if
(
!
actionBody
.
orderNo
)
{
return
system
.
getResult
(
null
,
"actionBody.orderNo can not be empty,100025"
);
}
var
reqUrl
=
this
.
centerOrderUrl
+
"action/order/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
if
(
result
&&
result
.
status
==
0
&&
result
.
data
){
this
.
pushTmConfirm
(
result
,
pobj
,
actionBody
);
//推送方案确认信息
return
system
.
getResultSuccess
();
}
return
result
;
}
//推送方案确认信息
async
pushTmConfirm
(
result
,
pobj
,
actionBody
){
var
orderdelivery
=
result
.
data
;
var
deliveryContent
=
orderdelivery
.
deliveryContent
;
if
(
deliveryContent
){
var
pushObj
=
{
//推送参数
serviceNo
:
deliveryContent
.
serviceNo
,
isConfirm
:
actionBody
.
isConfirm
,
channelCode
:
deliveryContent
.
channelCode
,
notes
:
actionBody
.
notes
||
""
,
appInfo
:
pobj
.
appInfo
};
var
tmpPobj
=
{
appInfo
:
pobj
.
appInfo
,
actionBody
:
pushObj
}
//获取产品详情
var
getProductDetailUrl
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
getProductDetailObj
=
{
"actionType"
:
"getProductDetail"
,
"appInfo"
:
pobj
.
appInfo
,
"actionBody"
:{
"channelItemCode"
:
deliveryContent
.
itemCode
}
};
var
productItemResult
=
await
this
.
restPostUrl
(
getProductDetailObj
,
getProductDetailUrl
);
if
(
productItemResult
.
status
!=
0
)
{
return
productItemResult
;
}
tmpPobj
.
actionBody
.
product_info
=
productItemResult
.
data
;
tmpPobj
.
actionBody
.
product_id
=
tmpPobj
.
actionBody
.
product_info
.
id
;
//获取推送接口信息
var
getProductInterfaceUrl
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
getProductInterfaceObj
=
{
"actionType"
:
"getProductInterface"
,
"appInfo"
:
pobj
.
appInfo
,
"actionBody"
:{
"product_id"
:
tmpPobj
.
actionBody
.
product_id
}
};
var
productItemInterfaceResult
=
await
this
.
restPostUrl
(
getProductInterfaceObj
,
getProductInterfaceUrl
);
tmpPobj
.
actionBody
.
product_info
.
interface_info
=
productItemInterfaceResult
.
data
;
this
.
utilsPushSve
.
pushBusInfo
(
tmpPobj
,
"pushOpSolution"
,
1
);
}
}
}
}
module
.
exports
=
UtilsOpOrderService
;
module
.
exports
=
UtilsOpOrderService
;
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
6ddd4fd1
...
@@ -54,7 +54,7 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -54,7 +54,7 @@ class UtilsOrderService extends AppServiceBase {
}
}
/**
/**
* 创建订单
* 创建订单
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody {channelItemCode:渠道产品的编码,id:定价id,quantity:订单数量,totalSum:300}
* @param {*} actionBody {channelItemCode:渠道产品的编码,id:定价id,quantity:订单数量,totalSum:300}
*/
*/
async
addOrder
(
pobj
,
actionBody
)
{
async
addOrder
(
pobj
,
actionBody
)
{
...
@@ -153,8 +153,8 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -153,8 +153,8 @@ class UtilsOrderService extends AppServiceBase {
}
}
/**
/**
* 获取H5支付地址
* 获取H5支付地址
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody
* @param {*} actionBody
*/
*/
async
getH5PayUrl
(
pobj
,
actionBody
)
{
async
getH5PayUrl
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
orderNo
)
{
if
(
!
actionBody
.
orderNo
)
{
...
@@ -182,7 +182,7 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -182,7 +182,7 @@ class UtilsOrderService extends AppServiceBase {
}
}
/**
/**
* 获取二维码
* 获取二维码
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody {orderNo:XXXX,opType:"wx"}---"wx":"微信","alipay":"支付宝"
* @param {*} actionBody {orderNo:XXXX,opType:"wx"}---"wx":"微信","alipay":"支付宝"
*/
*/
async
getOrderQrCode
(
pobj
,
actionBody
)
{
async
getOrderQrCode
(
pobj
,
actionBody
)
{
...
@@ -260,7 +260,7 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -260,7 +260,7 @@ class UtilsOrderService extends AppServiceBase {
}
}
/**
/**
* 查询订单状态
* 查询订单状态
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody {orderNo:XXXX,opType:"wx"}---"wx":"微信","alipay":"支付宝"
* @param {*} actionBody {orderNo:XXXX,opType:"wx"}---"wx":"微信","alipay":"支付宝"
*/
*/
async
queryOrderStatus
(
pobj
,
actionBody
)
{
async
queryOrderStatus
(
pobj
,
actionBody
)
{
...
@@ -308,8 +308,8 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -308,8 +308,8 @@ class UtilsOrderService extends AppServiceBase {
}
}
/**
/**
* 获取pc端支付二维码--不跟订单关联
* 获取pc端支付二维码--不跟订单关联
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody
* @param {*} actionBody
* "actionBody": {
* "actionBody": {
"order_num": order.orderNo,
"order_num": order.orderNo,
"total_fee": Number(order.totalSum) * 100,
"total_fee": Number(order.totalSum) * 100,
...
@@ -338,7 +338,7 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -338,7 +338,7 @@ class UtilsOrderService extends AppServiceBase {
}
}
/**
/**
* 只是检查支付状态--不跟订单关联
* 只是检查支付状态--不跟订单关联
* @param {*} pobj
* @param {*} pobj
* @param {*} actionBody { "trxid": payTrxid 支付流水号}
* @param {*} actionBody { "trxid": payTrxid 支付流水号}
*/
*/
async
queryOrder
(
pobj
,
actionBody
)
{
async
queryOrder
(
pobj
,
actionBody
)
{
...
@@ -426,7 +426,7 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -426,7 +426,7 @@ class UtilsOrderService extends AppServiceBase {
}
}
parmas
.
appInfo
=
appInfo
;
parmas
.
appInfo
=
appInfo
;
parmas
.
orderNo
=
parmas
.
out_trade_no
;
parmas
.
orderNo
=
parmas
.
out_trade_no
;
//修改并返回订单支付状态,创建收款单
//修改并返回订单支付状态,创建收款单
var
url
=
this
.
centerOrderUrl
+
"opaction/opPayOrder/receivePayCallBackNotify"
;
var
url
=
this
.
centerOrderUrl
+
"opaction/opPayOrder/receivePayCallBackNotify"
;
var
opResult
=
await
this
.
restPostUrl
(
parmas
,
url
);
var
opResult
=
await
this
.
restPostUrl
(
parmas
,
url
);
if
(
opResult
.
status
==
0
)
{
if
(
opResult
.
status
==
0
)
{
...
...
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
View file @
6ddd4fd1
...
@@ -8,7 +8,7 @@ class UtilsPushService extends AppServiceBase {
...
@@ -8,7 +8,7 @@ class UtilsPushService extends AppServiceBase {
this
.
pushlogSve
=
system
.
getObject
(
"service.common.pushlogSve"
);
this
.
pushlogSve
=
system
.
getObject
(
"service.common.pushlogSve"
);
};
};
async
aliBusiness2Fq
(
pobj
,
opType
)
{
async
aliBusiness2Fq
(
pobj
,
opType
)
{
//供业务调用,在代码中调用,不在db中做配置进行调用
pobj
.
actionType
=
"getAppInterface"
;
pobj
.
actionType
=
"getAppInterface"
;
var
reqUrl
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
reqUrl
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
productItemInterfaceResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
productItemInterfaceResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
...
@@ -16,7 +16,7 @@ class UtilsPushService extends AppServiceBase {
...
@@ -16,7 +16,7 @@ class UtilsPushService extends AppServiceBase {
this
.
pushBusInfo
(
pobj
,
opType
,
1
);
this
.
pushBusInfo
(
pobj
,
opType
,
1
);
}
}
async
pushBusInfo
(
pobj
,
opType
,
isDelProductInfo
)
{
//推送业务
信息
async
pushBusInfo
(
pobj
,
opType
,
isDelProductInfo
)
{
//推送业务
总入口-包括重试
var
interface_list
=
pobj
.
interface_info
?
pobj
.
interface_info
:
pobj
.
actionBody
.
product_info
.
interface_info
;
var
interface_list
=
pobj
.
interface_info
?
pobj
.
interface_info
:
pobj
.
actionBody
.
product_info
.
interface_info
;
if
(
!
interface_list
)
{
if
(
!
interface_list
)
{
return
system
.
getResult
(
null
,
"暂无推送配置"
);
return
system
.
getResult
(
null
,
"暂无推送配置"
);
...
@@ -27,13 +27,14 @@ class UtilsPushService extends AppServiceBase {
...
@@ -27,13 +27,14 @@ class UtilsPushService extends AppServiceBase {
}
}
for
(
let
index
=
0
;
index
<
interface_list_temp
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
interface_list_temp
.
length
;
index
++
)
{
const
element
=
interface_list_temp
[
index
];
const
element
=
interface_list_temp
[
index
];
var
refOpResult
=
this
.
reflexAction
(
element
,
opType
,
pobj
,
isDelProductInfo
);
this
.
reflexAction
(
element
,
opType
,
pobj
,
isDelProductInfo
);
}
}
}
}
async
reflexAction
(
interface_info
,
opType
,
pobj
,
isDelProductInfo
)
{
async
reflexAction
(
interface_info
,
opType
,
pobj
,
isDelProductInfo
)
{
var
refResult
=
null
;
var
refResult
=
null
;
pobj
.
interface_info
=
interface_info
;
pobj
.
interface_info
=
interface_info
;
pobj
.
opType
=
opType
;
pobj
.
opType
=
opType
;
pobj
.
isDelProductInfo
=
isDelProductInfo
;
try
{
try
{
if
(
interface_info
.
interface_type
==
"bd"
)
{
if
(
interface_info
.
interface_type
==
"bd"
)
{
if
(
!
interface_info
.
method_name
)
{
if
(
!
interface_info
.
method_name
)
{
...
@@ -66,8 +67,8 @@ class UtilsPushService extends AppServiceBase {
...
@@ -66,8 +67,8 @@ class UtilsPushService extends AppServiceBase {
this
.
pushlogSve
.
createDb
({
this
.
pushlogSve
.
createDb
({
appid
:
pobj
.
appInfo
.
uapp_id
,
appid
:
pobj
.
appInfo
.
uapp_id
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
op
:
"推送的接口信息:"
+
JSON
.
stringify
(
pobj
.
interface_info
),
op
:
JSON
.
stringify
(
pobj
.
interface_info
),
//推送的接口信息
content
:
"推送的参数信息:"
+
JSON
.
stringify
(
pobj
),
content
:
JSON
.
stringify
(
pobj
),
//推送的参数信息
resultInfo
:
JSON
.
stringify
(
rtn
),
resultInfo
:
JSON
.
stringify
(
rtn
),
returnType
:
refResult
.
status
==
0
?
'1'
:
'0'
,
returnType
:
refResult
.
status
==
0
?
'1'
:
'0'
,
opTitle
:
opType
+
(
refResult
.
status
==
0
?
"数据推送成功->reflexAction"
:
"数据推送出错->reflexAction"
)
opTitle
:
opType
+
(
refResult
.
status
==
0
?
"数据推送成功->reflexAction"
:
"数据推送出错->reflexAction"
)
...
@@ -78,8 +79,8 @@ class UtilsPushService extends AppServiceBase {
...
@@ -78,8 +79,8 @@ class UtilsPushService extends AppServiceBase {
this
.
pushlogSve
.
createDb
({
this
.
pushlogSve
.
createDb
({
appid
:
pobj
.
appInfo
.
uapp_id
,
appid
:
pobj
.
appInfo
.
uapp_id
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
op
:
"推送的接口信息:"
+
JSON
.
stringify
(
pobj
.
interface_info
),
op
:
JSON
.
stringify
(
pobj
.
interface_info
),
//推送的接口信息
content
:
"推送的参数信息:"
+
JSON
.
stringify
(
pobj
),
content
:
JSON
.
stringify
(
pobj
),
//推送的参数信息
resultInfo
:
""
,
resultInfo
:
""
,
returnType
:
'0'
,
returnType
:
'0'
,
opTitle
:
opType
+
"数据推送异常-->reflexAction"
opTitle
:
opType
+
"数据推送异常-->reflexAction"
...
...
center-channel/app/base/service/impl/utilsSve/utilsTmAliyunSve.js
0 → 100644
View file @
6ddd4fd1
const
AppServiceBase
=
require
(
"../../app.base"
);
//此类用来db中配置来进行调用-主要功能是商标业务
class
UtilsTmAliyunService
extends
AppServiceBase
{
constructor
()
{
super
();
}
async
tmCreateApplicant
(
pobj
)
{
//创建商标申请人信息
var
verify
=
await
this
.
opAliyunRpcVerifyParam
(
pobj
);
if
(
verify
.
status
!=
0
)
{
this
.
pushlogSve
.
createDb
({
appid
:
pobj
.
appInfo
.
uapp_id
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"暂无推送的接口信息"
+
",verify-msg:"
+
verify
.
msg
,
//推送的接口信息
content
:
JSON
.
stringify
(
pobj
),
//推送的参数信息
resultInfo
:
""
,
returnType
:
'0'
,
opTitle
:
pobj
.
opType
+
"推送操作失败->tmCreateApplicant"
});
return
verify
;
}
var
rpcParam
=
verify
.
data
;
var
params
=
{
action
:
rpcParam
.
action
,
reqbody
:
pobj
.
actionBody
,
rpcParam
:
rpcParam
}
this
.
opAliyunRpcReq
(
pobj
,
params
);
}
async
tmCreateTrademarkApplication
(
pobj
)
{
//创建商标申请信息
var
verify
=
await
this
.
opAliyunRpcVerifyParam
(
pobj
);
if
(
verify
.
status
!=
0
)
{
this
.
pushlogSve
.
createDb
({
appid
:
pobj
.
appInfo
.
uapp_id
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"暂无推送的接口信息"
+
",verify-msg:"
+
verify
.
msg
,
//推送的接口信息
content
:
JSON
.
stringify
(
pobj
),
//推送的参数信息
resultInfo
:
""
,
returnType
:
'0'
,
opTitle
:
pobj
.
opType
+
"推送操作失败->tmCreateTrademarkApplication"
});
return
verify
;
}
var
rpcParam
=
verify
.
data
;
var
params
=
{
action
:
rpcParam
.
action
,
reqbody
:
pobj
.
actionBody
,
rpcParam
:
rpcParam
}
this
.
opAliyunRpcReq
(
pobj
,
params
);
}
}
module
.
exports
=
UtilsTmAliyunService
;
center-channel/app/base/utils/aliyunClient.js
View file @
6ddd4fd1
...
@@ -42,8 +42,8 @@ class aliyunClient {
...
@@ -42,8 +42,8 @@ class aliyunClient {
content
:
JSON
.
stringify
(
obj
),
content
:
JSON
.
stringify
(
obj
),
resultInfo
:
JSON
.
stringify
(
res
),
resultInfo
:
JSON
.
stringify
(
res
),
returnType
:
'1'
,
returnType
:
'1'
,
logLevel
:
'1'
,
logLevel
:
'1'
,
opTitle
:
"推送阿里信息返回成功"
opTitle
:
"
old-reqbyget
推送阿里信息返回成功"
});
});
return
system
.
getResultSuccess
(
res
);
return
system
.
getResultSuccess
(
res
);
}
catch
(
e
)
{
}
catch
(
e
)
{
...
@@ -52,12 +52,42 @@ class aliyunClient {
...
@@ -52,12 +52,42 @@ class aliyunClient {
content
:
JSON
.
stringify
(
obj
),
content
:
JSON
.
stringify
(
obj
),
resultInfo
:
JSON
.
stringify
(
e
.
stack
),
resultInfo
:
JSON
.
stringify
(
e
.
stack
),
returnType
:
'0'
,
returnType
:
'0'
,
logLevel
:
'3'
,
logLevel
:
'3'
,
opTitle
:
"推送阿里信息返回异常"
opTitle
:
"
old-reqbyget
推送阿里信息返回异常"
});
});
return
system
.
getResultFail
(
-
200
,
"出现异常,error:"
+
e
.
stack
);
return
system
.
getResultFail
(
-
200
,
"出现异常,error:"
+
e
.
stack
);
}
}
}
async
reqCustomByGet
(
obj
,
cbk
)
{
var
action
=
obj
.
action
;
var
reqbody
=
obj
.
reqbody
;
var
rpcParam
=
obj
.
rpcParam
;
if
(
rpcParam
.
accessKeyId
)
{
this
.
aliclient
.
accessKeyId
=
rpcParam
.
accessKeyId
;
}
if
(
rpcParam
.
accessKeySecret
)
{
this
.
aliclient
.
accessKeySecret
=
rpcParam
.
accessKeySecret
;
}
if
(
rpcParam
.
endpoint
)
{
this
.
aliclient
.
endpoint
=
rpcParam
.
endpoint
;
}
if
(
rpcParam
.
apiVersion
)
{
this
.
aliclient
.
apiVersion
=
rpcParam
.
apiVersion
;
}
try
{
var
res
=
await
this
.
aliclient
.
request
(
action
,
reqbody
,
{
timeout
:
3000
,
// default 3000 ms
formatAction
:
true
,
// default true, format the action to Action
formatParams
:
true
,
// default true, format the parameter name to first letter upper case
method
:
'GET'
,
// set the http method, default is GET
headers
:
{},
// set the http request headers
});
return
system
.
getResultSuccess
(
res
);
}
catch
(
e
)
{
return
system
.
getResultFail
(
-
200
,
"出现异常,error:"
+
e
.
stack
);
}
}
}
}
}
...
...
center-channel/app/config/routes/api.js
View file @
6ddd4fd1
...
@@ -109,7 +109,7 @@ module.exports = function (app) {
...
@@ -109,7 +109,7 @@ module.exports = function (app) {
}
}
req
.
body
.
appInfo
=
result
.
data
;
req
.
body
.
appInfo
=
result
.
data
;
req
.
body
.
actionProcess
=
result
.
data
.
app_code
;
req
.
body
.
actionProcess
=
result
.
data
.
app_code
;
var
lst
=
[
var
lst
=
[
"tmConfirm"
,
"addOrder"
,
"getH5PayUrl"
,
"getOrderQrCode"
,
"queryOrderStatus"
,
"getOrderInfo"
,
"getOrderDeliveryInfo"
,
"getOrderDetails"
,
"addOrder"
,
"getH5PayUrl"
,
"getOrderQrCode"
,
"queryOrderStatus"
,
"getOrderInfo"
,
"getOrderDeliveryInfo"
,
"getOrderDetails"
,
"getOrderDeliveryFlowInfo"
,
"getOrderDeliveryFlowList"
,
"getOrderLogInfo"
,
"updateContacts"
,
"updateTmOrder"
,
"delOrder"
,
"getOrderDeliveryFlowInfo"
,
"getOrderDeliveryFlowList"
,
"getOrderLogInfo"
,
"updateContacts"
,
"updateTmOrder"
,
"delOrder"
,
"submitProgramme"
,
"getProgrammeListByUser"
,
"getProgrammeInfoByNeedNo"
,
"abolishProgramme"
,
"getAliPayInfo"
"submitProgramme"
,
"getProgrammeListByUser"
,
"getProgrammeInfoByNeedNo"
,
"abolishProgramme"
,
"getAliPayInfo"
...
...
center-channel/app/config/settings.js
View file @
6ddd4fd1
...
@@ -64,7 +64,7 @@ var settings = {
...
@@ -64,7 +64,7 @@ var settings = {
},
},
centerOrderUrl
:
function
()
{
centerOrderUrl
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
if
(
this
.
env
==
"dev"
)
{
return
"http://center
app
.apps.com:4011/"
;
return
"http://center
order
.apps.com:4011/"
;
}
else
{
}
else
{
return
"http://center-order-service/"
;
return
"http://center-order-service/"
;
}
}
...
...
center-channel/app/front/entry/public/apidoc/platform/order.md
View file @
6ddd4fd1
...
@@ -122,7 +122,7 @@
...
@@ -122,7 +122,7 @@
"channelItemCode"
:
"fzsbzc"
,
// Y 产品的渠道编码
"channelItemCode"
:
"fzsbzc"
,
// Y 产品的渠道编码
"payCode"
:
"fzsbzc-1"
,
// Y 支付价格code
"payCode"
:
"fzsbzc-1"
,
// Y 支付价格code
"quantity"
:
1
,
// Y 购买数量
"quantity"
:
1
,
// Y 购买数量
"totalSum"
:
699
,
// Y 订单总金额
"totalSum"
:
699
,
// Y 订单总金额
"payTotalSum"
:
699
,
// Y 订单付款总金额
"payTotalSum"
:
699
,
// Y 订单付款总金额
"notes"
:
"订单备注信息"
,
// N 订单备注
"notes"
:
"订单备注信息"
,
// N 订单备注
"orderContact"
:{
// N 订单联系人信息,没有则填写{}
"orderContact"
:{
// N 订单联系人信息,没有则填写{}
...
@@ -233,9 +233,9 @@
...
@@ -233,9 +233,9 @@
"channelItemCode"
:
"FW_GOODS-582221-1"
,
"channelItemCode"
:
"FW_GOODS-582221-1"
,
"channelItemName"
:
"京东云PLUS公司注册(北京市)"
,
"channelItemName"
:
"京东云PLUS公司注册(北京市)"
,
"channelItemAppendName"
:
""
,
"channelItemAppendName"
:
""
,
"price"
:
"10.00"
,
"price"
:
"10.00"
,
"priceTypeName"
:
"件"
,
"priceTypeName"
:
"件"
,
"priceDesc"
:
"海淀区内资一般人"
,
"priceDesc"
:
"海淀区内资一般人"
,
"serviceItemCode"
:
null
,
"serviceItemCode"
:
null
,
"picUrl"
:
null
,
"picUrl"
:
null
,
"created_at"
:
""
"created_at"
:
""
...
@@ -362,4 +362,4 @@
...
@@ -362,4 +362,4 @@
"requestId"
:
"f21446617c5e46ad889f3fab7bb69456"
"requestId"
:
"f21446617c5e46ad889f3fab7bb69456"
}
}
```
```
\ No newline at end of file
center-channel/app/front/entry/public/apidoc/platform/tmOrder.md
View file @
6ddd4fd1
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
1.
[
商标订单修改-商标尼斯信息修改
](
#updateNclInfo
)
1.
[
商标订单修改-商标尼斯信息修改
](
#updateNclInfo
)
1.
[
商标订单修改-修改申请人信息
](
#updateCustomerInfo
)
1.
[
商标订单修改-修改申请人信息
](
#updateCustomerInfo
)
1.
[
商标订单修改-修改交官材料
](
#updateOfficial
)
1.
[
商标订单修改-修改交官材料
](
#updateOfficial
)
1.
[
商标方案确认
](
#tmConfirm
)
## **<a name="getTmOrderDeliveryInfo"> 获取商标订单交付信息</a>**
## **<a name="getTmOrderDeliveryInfo"> 获取商标订单交付信息</a>**
[
返回到目录
](
#menu
)
[
返回到目录
](
#menu
)
...
@@ -270,7 +271,7 @@
...
@@ -270,7 +271,7 @@
]
]
}
}
]
]
}
}
```
```
...
@@ -358,4 +359,34 @@
...
@@ -358,4 +359,34 @@
"requestId"
:
"ab3dbb7dce5b4b44bc1d1c83e887ffee"
"requestId"
:
"ab3dbb7dce5b4b44bc1d1c83e887ffee"
}
}
```
```
\ No newline at end of file
## **<a name="tmConfirm"> 商标方案确认</a>**
[
返回到目录
](
#menu
)
##### URL
[
/web/opaction/opOrder/springBoard
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 请求头中需要增加userpin(用户登录后的凭证)的值
#### 渠道执行的类型 actionType:tmConfirm
```
javascript
{
"orderNo "
:
"346c3091684e4e0eef"
,
"isConfirm "
:
"1"
,
"notes "
:
""
,
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
"data"
:
null
,
"msg"
:
"商标方案确认成功"
,
"requestId"
:
"0c14f04dc187486b829e392dc87c70c6"
}
```
center-channel/提示编码使用
View file @
6ddd4fd1
已经使用的
编码汇总:
已经使用的
编码汇总:
...
@@ -36,4 +36,10 @@
...
@@ -36,4 +36,10 @@
100350
100350
100360
100360
100370
100370
100380
100380
\ No newline at end of file
100390
100400
100410
100420
100430
100440
\ No newline at end of file
center-channel/阿里文档
View file @
6ddd4fd1
1.获取请
求token
1.获取请
求token
...
@@ -69,4 +69,28 @@ HTTP请求方式 POST
...
@@ -69,4 +69,28 @@ HTTP请求方式 POST
"sign": "CVvZuC0w2ZjcClTUfXtSNj8FtFs5spThQxv+oQ5tvjqFA5qoK7vihf2TkKuDX/6DvdZn1N47VIp1jsr33wMO77fS8E8ouaDJghnnUeyIST6QawYfYc3j0qIuWfXakkrcvzMhQAujbuogd/D7ntLJd1RyC3g03SaOYCPIfFfqc6U="
"sign": "CVvZuC0w2ZjcClTUfXtSNj8FtFs5spThQxv+oQ5tvjqFA5qoK7vihf2TkKuDX/6DvdZn1N47VIp1jsr33wMO77fS8E8ouaDJghnnUeyIST6QawYfYc3j0qIuWfXakkrcvzMhQAujbuogd/D7ntLJd1RyC3g03SaOYCPIfFfqc6U="
},
},
"requestId": "8691ec2bf95d4eef94cff70959c4f062"
"requestId": "8691ec2bf95d4eef94cff70959c4f062"
}
}
\ No newline at end of file
4.获取钉钉鉴权信息---->供前端调用
地址:[/web/auth/channelAccessAuth/springBoard]
请求方式:POST
请求头中需要有token(token值从接口1中获取)
{
"actionType": "getDingJsApiAuthInfo",
"actionBody": {
"nowPageUrl":"http://alitm.qifu.gongsibao.com"// Y 当前网页的URL,不包含#及其后面部分
}
}
返回结果
{
"status": 0,//0成功,否则失败
"msg": "success",
"data": {
"agentId": "639185135",
"corpId": "ding1d097f874960e207",
"timeStamp": "1585319973691",
"nonceStr": "SY202003272239rOpDt2",
"signature": "f413e164fd1fe1cf057bf9ff0bbc23747ee7b732"
},
"requestId": "17e6cf486d1e40c49e3e7def2eb16e28"
}
\ No newline at end of file
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