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
8236841d
Commit
8236841d
authored
Jan 26, 2021
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
5d7dbd9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
+15
-15
No files found.
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
View file @
8236841d
...
@@ -10,7 +10,7 @@ class UtilsFqAliyunService extends AppServiceBase {
...
@@ -10,7 +10,7 @@ class UtilsFqAliyunService extends AppServiceBase {
this
.
ucommuneOperatorPhone
=
settings
.
ucommuneOperatorPhone
()
this
.
ucommuneOperatorPhone
=
settings
.
ucommuneOperatorPhone
()
}
}
async
pushOrderBusinessByProductCode2Fq
(
pobj
)
{
//推送自定义产品码的订单商机到峰擎(订单已经支付成功才推送)
async
pushOrderBusinessByProductCode2Fq
(
pobj
)
{
//推送自定义产品码的订单商机到峰擎(订单已经支付成功才推送)
console
.
log
(
JSON
.
stringify
(
pobj
),
".................pushOrderBusinessByProductCode2Fq...............pobj"
);
console
.
log
(
JSON
.
stringify
(
pobj
),
".................pushOrderBusinessByProductCode2Fq...............pobj"
);
var
verifyResult
=
await
this
.
verifyParam
(
pobj
);
var
verifyResult
=
await
this
.
verifyParam
(
pobj
);
var
orderInfo
=
pobj
.
actionBody
.
order_info
;
var
orderInfo
=
pobj
.
actionBody
.
order_info
;
var
orderContact
=
pobj
.
actionBody
.
order_contact
?
pobj
.
actionBody
.
order_contact
:
pobj
.
actionBody
.
delivery_content
.
orderContact
;
var
orderContact
=
pobj
.
actionBody
.
order_contact
?
pobj
.
actionBody
.
order_contact
:
pobj
.
actionBody
.
delivery_content
.
orderContact
;
...
@@ -27,7 +27,7 @@ class UtilsFqAliyunService extends AppServiceBase {
...
@@ -27,7 +27,7 @@ class UtilsFqAliyunService extends AppServiceBase {
if
(
!
productInfo
||
!
productInfo
.
service_business_code
)
{
if
(
!
productInfo
||
!
productInfo
.
service_business_code
)
{
verifyResult
=
system
.
getResult
(
null
,
"orderInfo.productInfo.service_business_code can not be empty,100427"
);
verifyResult
=
system
.
getResult
(
null
,
"orderInfo.productInfo.service_business_code can not be empty,100427"
);
}
}
if
(
!
[
'360.icp'
,
'360.edi'
].
includes
(
productInfo
.
service_business_code
))
{
if
(
!
[
'360.icp'
,
'360.edi'
].
includes
(
productInfo
.
service_business_code
))
{
if
(
!
productInfo
||
!
productInfo
.
price_item
||
!
productInfo
.
price_item
.
service_code
)
{
if
(
!
productInfo
||
!
productInfo
.
price_item
||
!
productInfo
.
price_item
.
service_code
)
{
verifyResult
=
system
.
getResult
(
null
,
"orderInfo.productInfo.price_item.service_code can not be empty,100430"
);
verifyResult
=
system
.
getResult
(
null
,
"orderInfo.productInfo.price_item.service_code can not be empty,100430"
);
}
}
...
@@ -85,7 +85,7 @@ class UtilsFqAliyunService extends AppServiceBase {
...
@@ -85,7 +85,7 @@ class UtilsFqAliyunService extends AppServiceBase {
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
);
if
(
rtn
.
code
!=
200
&&
rtn
.
success
!=
true
)
{
if
(
rtn
.
code
!=
200
&&
rtn
.
success
!=
true
)
{
return
system
.
getResult
(
null
,
"推送失败,失败原因:"
+
rtn
.
errorMsg
+
",selfrequestId="
+
pobj
.
requestId
+
",requestId="
+
rtn
.
requestId
);
return
system
.
getResult
(
null
,
"推送失败,失败原因:"
+
(
rtn
.
errorMsg
||
rtn
.
errorMessage
)
+
",selfrequestId="
+
pobj
.
requestId
+
",requestId="
+
rtn
.
requestId
);
}
}
return
system
.
getResultSuccess
(
rtn
.
data
,
"推送成功"
);
return
system
.
getResultSuccess
(
rtn
.
data
,
"推送成功"
);
}
catch
(
e
)
{
}
catch
(
e
)
{
...
@@ -108,7 +108,7 @@ class UtilsFqAliyunService extends AppServiceBase {
...
@@ -108,7 +108,7 @@ class UtilsFqAliyunService extends AppServiceBase {
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
);
if
(
rtn
.
code
!=
200
||
rtn
.
success
!=
true
)
{
if
(
rtn
.
code
!=
200
||
rtn
.
success
!=
true
)
{
return
system
.
getResult
(
null
,
"推送失败,失败原因:"
+
rtn
.
errorMsg
+
",selfrequestId="
+
pobj
.
requestId
+
",requestId="
+
rtn
.
requestId
);
return
system
.
getResult
(
null
,
"推送失败,失败原因:"
+
(
rtn
.
errorMsg
||
rtn
.
errorMessage
)
+
",selfrequestId="
+
pobj
.
requestId
+
",requestId="
+
rtn
.
requestId
);
}
}
return
system
.
getResultSuccess
(
rtn
.
data
,
"推送成功"
);
return
system
.
getResultSuccess
(
rtn
.
data
,
"推送成功"
);
}
catch
(
e
)
{
}
catch
(
e
)
{
...
@@ -141,8 +141,8 @@ class UtilsFqAliyunService extends AppServiceBase {
...
@@ -141,8 +141,8 @@ class UtilsFqAliyunService extends AppServiceBase {
}
}
//下订单到ic
//下订单到ic
async
pushOrder2IC
(
pobj
,
opType
)
{
async
pushOrder2IC
(
pobj
,
opType
)
{
console
.
log
(
JSON
.
stringify
(
pobj
),
".................pushOrderBusinessByProductCode2Fq...............pobj"
);
console
.
log
(
JSON
.
stringify
(
pobj
),
".................pushOrderBusinessByProductCode2Fq...............pobj"
);
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
,
"暂无推送配置"
);
...
@@ -161,15 +161,15 @@ class UtilsFqAliyunService extends AppServiceBase {
...
@@ -161,15 +161,15 @@ class UtilsFqAliyunService extends AppServiceBase {
}
}
var
interface_params_info
=
JSON
.
parse
(
interface_list_temp
[
0
].
params
);
var
interface_params_info
=
JSON
.
parse
(
interface_list_temp
[
0
].
params
);
//新增订单(商标自助注册) IC
//新增订单(商标自助注册) IC
let
icOrderParams
=
{
let
icOrderParams
=
{
"idempotentSource"
:
"pcwebsbzc"
,
// 来源编号,写死:pcwebsbzc,必填
"idempotentSource"
:
"pcwebsbzc"
,
// 来源编号,写死:pcwebsbzc,必填
"idempotentSourceName"
:
"PC官网"
,
// 来源编号,写死:PC官网,必填
"idempotentSourceName"
:
"PC官网"
,
// 来源编号,写死:PC官网,必填
"product_img_url"
:
pobj
.
actionBody
.
deliveryData
.
tm
.
picUrl
,
//产品图片
"product_img_url"
:
pobj
.
actionBody
.
deliveryData
.
tm
.
picUrl
,
//产品图片
"productId"
:
productInfo
.
price_item
.
service_code
,
// 云服产品skuid,必填
"productId"
:
productInfo
.
price_item
.
service_code
,
// 云服产品skuid,必填
"goodsId"
:
pobj
.
actionBody
.
goodsId
,
// 官网产品id
"goodsId"
:
pobj
.
actionBody
.
goodsId
,
// 官网产品id
"customerId"
:
pobj
.
actionBody
.
customerId
,
//客户Id,必填
"customerId"
:
pobj
.
actionBody
.
customerId
,
//客户Id,必填
"product_item"
:
pobj
.
actionBody
.
product_item
,
"product_item"
:
pobj
.
actionBody
.
product_item
,
"device_token"
:
pobj
.
actionBody
.
device_token
//设备编号参数
"device_token"
:
pobj
.
actionBody
.
device_token
//设备编号参数
}
}
pobj
.
params
=
icOrderParams
;
pobj
.
params
=
icOrderParams
;
var
result
=
await
this
.
opICClientPost
(
pobj
,
interface_params_info
.
opUrl
,
interface_params_info
.
key
,
interface_params_info
.
secret
,
icOrderParams
);
var
result
=
await
this
.
opICClientPost
(
pobj
,
interface_params_info
.
opUrl
,
interface_params_info
.
key
,
interface_params_info
.
secret
,
icOrderParams
);
...
...
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