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
08f63d9d
Commit
08f63d9d
authored
Sep 20, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
3504da78
ef126ae9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
+6
-4
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
+1
-0
No files found.
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
View file @
08f63d9d
var
system
=
require
(
"../../../system"
);
const
AppServiceBase
=
require
(
"../../app.base"
);
var
settings
=
require
(
"../../../../config/settings"
);
const
{
json
}
=
require
(
"sequelize"
);
//此类用来db中配置来进行调用-主要功能是推送蜂擎业务
class
UtilsFqAliyunService
extends
AppServiceBase
{
...
...
@@ -9,6 +10,7 @@ class UtilsFqAliyunService extends AppServiceBase {
this
.
ucommuneOperatorPhone
=
settings
.
ucommuneOperatorPhone
()
}
async
pushOrderBusinessByProductCode2Fq
(
pobj
)
{
//推送自定义产品码的订单商机到峰擎(订单已经支付成功才推送)
console
.
log
(
JSON
.
stringify
(
pobj
),
".................pushOrderBusinessByProductCode2Fq...............pobj"
);
var
verifyResult
=
await
this
.
verifyParam
(
pobj
);
var
orderInfo
=
pobj
.
actionBody
.
order_info
;
var
orderContact
=
pobj
.
actionBody
.
order_contact
?
pobj
.
actionBody
.
order_contact
:
pobj
.
actionBody
.
delivery_content
.
orderContact
;
...
...
@@ -33,8 +35,8 @@ class UtilsFqAliyunService extends AppServiceBase {
}
var
interface_params_info
=
verifyResult
.
data
;
var
ucommuneOperatorPhone
=
pobj
.
appInfo
&&
pobj
.
appInfo
.
contact_mobile
?
pobj
.
appInfo
.
contact_mobile
:
this
.
ucommuneOperatorPhone
console
.
log
(
"推送的业务员手机号为:"
,
this
.
ucommuneOperatorPhone
)
var
ucommuneOperatorPhone
=
pobj
.
appInfo
&&
pobj
.
appInfo
.
contact_mobile
?
pobj
.
appInfo
.
contact_mobile
:
this
.
ucommuneOperatorPhone
console
.
log
(
"推送的业务员手机号为:"
,
ucommuneOperatorPhone
)
var
params
=
{
idempotentId
:
orderInfo
.
orderNo
,
// 是 业务 ID
idempotentSource
:
productInfo
.
service_business_code
,
// 是 业务来源(ic_jdyun、ic_ali)
...
...
@@ -46,13 +48,13 @@ class UtilsFqAliyunService extends AppServiceBase {
orderPrice
:
orderInfo
.
totalSum
,
// 是 订单金额
productId
:
productInfo
.
price_item
.
service_code
,
// 是 产品 ID
productQuantity
:
orderInfo
.
quantity
,
// 是 产品数量
operator_phone
:
this
.
ucommuneOperatorPhone
,
// 2020 0704 推送fq 必填字段 这里以下为新增 7.7修改由写死改为从settings获取
operator_phone
:
ucommuneOperatorPhone
,
// 2020 0704 推送fq 必填字段 这里以下为新增 7.7修改由写死改为从settings获取
createdat
:
orderInfo
.
created_at
,
// 2020 0722 lin新增 张超推送文档新增必填字段
thirdPartyCustomerId
:
orderInfo
.
channelUserId
,
pay_flow_no
:
orderInfo
.
pay_flow_no
,
// 支付流水号
pay_channel
:
orderInfo
.
pay_channel
,
// 支付渠道(微信、支付宝)(必填)
pay_time
:
orderInfo
.
pay_time
,
//付款时间
pay_payer_bank_no
:
orderInfo
.
pay_payer_bank_no
//付款人账号
pay_payer_bank_no
:
orderInfo
.
pay_payer_bank_no
//付款人账号
};
// var result = await this.opAliyunClientPost(pobj, "pushOrderBusiness", interface_params_info.opUrl, interface_params_info.key, interface_params_info.secret, params);
var
result
=
await
this
.
opAliyunClientPost
(
pobj
,
interface_params_info
.
opUrl
,
interface_params_info
.
key
,
interface_params_info
.
secret
,
params
);
...
...
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
View file @
08f63d9d
...
...
@@ -53,6 +53,7 @@ class UtilsPushService extends AppServiceBase {
}
async
pushBusInfo
(
pobj
,
opType
,
isDelProductInfo
)
{
//推送业务总入口,不在db中做配置进行调用
console
.
log
(
JSON
.
stringify
(
pobj
),
".......pushBusInfo........................."
);
var
interface_list
=
pobj
.
interface_info
?
pobj
.
interface_info
:
pobj
.
actionBody
.
product_info
.
interface_info
;
if
(
!
interface_list
)
{
return
system
.
getResult
(
null
,
"暂无推送配置"
);
...
...
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