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
ab84846f
Commit
ab84846f
authored
Apr 21, 2022
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
价格查询
parent
a9d2e5f3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
21 deletions
+32
-21
center-channel/app/base/service/impl/common/centerorderSve.js
+2
-0
center-channel/app/base/service/impl/common/regCenterOrderSve.js
+1
-0
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+1
-0
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+27
-21
center-channel/app/base/service/impl/utilsSve/utilsServiceSve.js
+1
-0
No files found.
center-channel/app/base/service/impl/common/centerorderSve.js
View file @
ab84846f
...
...
@@ -269,6 +269,7 @@ class CenterorderService extends AppServiceBase {
pobj
.
actionBody
.
orderPrice
=
data
.
data
.
price
;
pobj
.
actionBody
.
payTotalSum
=
data
.
data
.
price
;
pobj
.
actionBody
.
payCode
=
data
.
data
.
payCode
;
pobj
.
actionBody
.
productPriceId
=
data
.
data
.
productPriceId
;
pobj
.
actionBody
.
channelItemCode
=
data
.
data
.
channelItemCode
;
pobj
.
actionBody
.
channelNeedNo
=
data
.
data
.
channelNeedNo
;
pobj
.
actionBody
.
needNo
=
data
.
data
.
needNo
;
...
...
@@ -602,6 +603,7 @@ class CenterorderService extends AppServiceBase {
pobj
.
actionBody
.
orderPrice
=
data
.
data
.
price
;
pobj
.
actionBody
.
payTotalSum
=
data
.
data
.
price
;
pobj
.
actionBody
.
payCode
=
data
.
data
.
payCode
;
pobj
.
actionBody
.
productPriceId
=
data
.
data
.
productPriceId
;
pobj
.
actionBody
.
channelItemCode
=
data
.
data
.
channelItemCode
;
pobj
.
actionBody
.
channelNeedNo
=
data
.
data
.
channelNeedNo
;
pobj
.
actionBody
.
needNo
=
data
.
data
.
needNo
;
...
...
center-channel/app/base/service/impl/common/regCenterOrderSve.js
View file @
ab84846f
...
...
@@ -73,6 +73,7 @@ class RegCenterOrderService extends AppServiceBase {
pobj
.
actionBody
.
orderPrice
=
data
.
data
.
price
;
pobj
.
actionBody
.
payTotalSum
=
data
.
data
.
price
;
pobj
.
actionBody
.
payCode
=
data
.
data
.
payCode
;
pobj
.
actionBody
.
productPriceId
=
data
.
data
.
productPriceId
;
pobj
.
actionBody
.
channelItemCode
=
data
.
data
.
channelItemCode
;
pobj
.
actionBody
.
channelNeedNo
=
data
.
data
.
channelNeedNo
||
data
.
data
.
bizId
;
pobj
.
actionBody
.
needNo
=
data
.
data
.
needNo
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
ab84846f
...
...
@@ -1291,6 +1291,7 @@ class UtilsNeedService extends AppServiceBase {
pobj
.
actionBody
.
payTotalSum
=
productPriceResult
.
data
.
price
;
pobj
.
actionBody
.
price
=
productPriceResult
.
data
.
price
;
pobj
.
actionBody
.
payCode
=
productPriceResult
.
data
.
payCode
;
pobj
.
actionBody
.
productPriceId
=
productPriceResult
.
data
.
productPriceId
;
pobj
.
actionBody
.
channelItemCode
=
needInfoResult
.
data
.
channelTypeCode
;
pobj
.
actionBody
.
channelNeedNo
=
needInfoResult
.
data
.
channelNeedNo
;
pobj
.
actionBody
.
needNo
=
needInfoResult
.
data
.
needNo
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
ab84846f
...
...
@@ -85,24 +85,29 @@ class UtilsOrderService extends AppServiceBase {
* 订单验证
*/
async
isOrderVerify
(
pobj
,
actionBody
)
{
var
price_list
=
actionBody
.
product_info
.
price_list
;
let
price_list
=
actionBody
.
product_info
.
price_list
;
if
(
!
price_list
)
{
return
system
.
getResult
(
null
,
"产品价格列表信息有误,100040"
);
}
var
productIndex
=
price_list
.
findIndex
(
f
=>
f
.
pay_code
==
actionBody
.
payCode
&&
f
.
is_show
==
1
);
let
productIndex
=
-
1
;
if
(
actionBody
.
productPriceId
)
{
productIndex
=
price_list
.
findIndex
(
f
=>
f
.
id
==
actionBody
.
productPriceId
&&
f
.
is_show
==
1
);
}
else
{
productIndex
=
price_list
.
findIndex
(
f
=>
f
.
pay_code
==
actionBody
.
payCode
&&
f
.
is_show
==
1
);
}
if
(
productIndex
<
0
)
{
return
system
.
getResult
(
null
,
"支付价格payCode信息有误,100050"
);
}
var
totalSum
=
Number
(
price_list
[
productIndex
].
price
)
*
Number
(
actionBody
.
quantity
);
var
additionsIndex
=
-
1
;
let
totalSum
=
Number
(
price_list
[
productIndex
].
price
)
*
Number
(
actionBody
.
quantity
);
let
additionsIndex
=
-
1
;
if
(
actionBody
.
additions
&&
actionBody
.
additions
.
payCode
)
{
additionsIndex
=
price_list
.
findIndex
(
f
=>
f
.
pay_code
==
actionBody
.
additions
.
payCode
&&
f
.
is_show
==
0
);
if
(
additionsIndex
>=
0
)
{
totalSum
=
totalSum
+
Number
(
price_list
[
additionsIndex
].
price
)
*
Number
(
actionBody
.
additions
.
quantity
);
}
}
var
buyTotalSum
=
Number
(
actionBody
.
totalSum
||
0
);
var
buyPayTotalSum
=
Number
(
actionBody
.
payTotalSum
||
0
);
let
buyTotalSum
=
Number
(
actionBody
.
totalSum
||
0
);
let
buyPayTotalSum
=
Number
(
actionBody
.
payTotalSum
||
0
);
this
.
execClientNew
.
execLogs
(
"isOrderVerify-5"
,
actionBody
,
"center-channel-utilsOrderSve-isOrderVerify"
,
null
,
null
);
if
(
buyTotalSum
===
0
)
{
buyTotalSum
=
totalSum
;
...
...
@@ -1755,8 +1760,8 @@ class UtilsOrderService extends AppServiceBase {
pobj
.
actionType
=
"receiveFqbossTmOrder"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/order/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
if
(
result
&&
result
.
status
==
0
)
{
if
(
pobj
.
appInfo
&&
pobj
.
appInfo
.
uapp_id
!=
18
&&
!
pobj
.
actionBody
.
serviceOrderNo
)
{
//京东云自助商标注册
if
(
result
&&
result
.
status
==
0
)
{
if
(
pobj
.
appInfo
&&
pobj
.
appInfo
.
uapp_id
!=
18
&&
!
pobj
.
actionBody
.
serviceOrderNo
)
{
//京东云自助商标注册
await
this
.
pushChannelOrder2fq
(
pobj
);
}
}
...
...
@@ -1767,17 +1772,17 @@ class UtilsOrderService extends AppServiceBase {
try
{
var
yfobj
=
{
actionBody
:
{
idempotentSource
:
pobj
.
productInfo
.
service_business_code
||
''
,
//渠道来源 N
quantity
:
1
,
//数量 N
needId
:
pobj
.
actionBody
.
needNo
||
''
,
//需求id N
contactsName
:
pobj
.
actionBody
.
contactsName
||
''
,
//联系人名称 N
companyName
:
pobj
.
actionBody
.
applyName
||
''
,
//公司名称 N
scope
:
"商标自助订单进行备案,不用做任何处理"
,
// N
idempotentSource
:
pobj
.
productInfo
.
service_business_code
||
''
,
//渠道来源 N
quantity
:
1
,
//数量 N
needId
:
pobj
.
actionBody
.
needNo
||
''
,
//需求id N
contactsName
:
pobj
.
actionBody
.
contactsName
||
''
,
//联系人名称 N
companyName
:
pobj
.
actionBody
.
applyName
||
''
,
//公司名称 N
scope
:
"商标自助订单进行备案,不用做任何处理"
,
// N
orderNo
:
pobj
.
actionBody
.
channelOrderNo
,
orderPrice
:
300
,
//写死 自助300
phone
:
pobj
.
actionBody
.
contactsMobile
,
appName
:
pobj
.
appInfo
.
app_name
||
''
,
sku
:
'125855508212158464'
//写死 自助一个
appName
:
pobj
.
appInfo
.
app_name
||
''
,
sku
:
'125855508212158464'
//写死 自助一个
},
appInfo
:
pobj
.
appInfo
};
...
...
@@ -1788,7 +1793,7 @@ class UtilsOrderService extends AppServiceBase {
this
.
logCtl
.
info
({
optitle
:
(
new
Date
()).
Format
(
"yyyy-MM-dd hh:mm:ss"
)
+
"企服通渠道订单推送至蜂擎:,method=pushChannelOrder2fq"
,
op
:
"service/impl/utilsSve/utilsOrderSve.js/pushChannelOrder2fq"
,
content
:
"参数:"
+
JSON
.
stringify
(
pobj
)
+
";返回结果:"
+
JSON
.
stringify
(
yfPushRes
),
content
:
"参数:"
+
JSON
.
stringify
(
pobj
)
+
";返回结果:"
+
JSON
.
stringify
(
yfPushRes
),
clientIp
:
""
});
}
catch
(
e
)
{
...
...
@@ -1796,12 +1801,12 @@ class UtilsOrderService extends AppServiceBase {
this
.
logCtl
.
error
({
optitle
:
(
new
Date
()).
Format
(
"yyyy-MM-dd hh:mm:ss"
)
+
"企服通渠道订单推送至蜂擎异常:,method=pushChannelOrder2fq"
,
op
:
"service/impl/utilsSve/utilsOrderSve.js/pushChannelOrder2fq---error"
,
content
:
"参数:"
+
JSON
.
stringify
(
pobj
)
+
";异常信息:"
+
JSON
.
stringify
(
e
.
stack
),
content
:
"参数:"
+
JSON
.
stringify
(
pobj
)
+
";异常信息:"
+
JSON
.
stringify
(
e
.
stack
),
clientIp
:
""
});
console
.
log
(
"service/impl/utilsSve/utilsOrderSve.js/pushChannelOrder2fq推送异常"
,
e
.
stack
);
console
.
log
(
"service/impl/utilsSve/utilsOrderSve.js/pushChannelOrder2fq推送异常"
,
e
.
stack
);
}
}
/**
...
...
@@ -1814,6 +1819,7 @@ class UtilsOrderService extends AppServiceBase {
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
return
result
;
}
async
receiveAliTmStatus
(
pobj
,
actionBody
)
{
var
reqUrl
=
this
.
centerOrderUrl
+
"action/order/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
...
...
@@ -1826,7 +1832,7 @@ class UtilsOrderService extends AppServiceBase {
* @param actionBody
* @returns {Promise<void>}
*/
async
getOrderIdFrom360
(
pobj
,
actionBody
)
{
async
getOrderIdFrom360
(
pobj
,
actionBody
)
{
let
rtnt
=
await
this
.
execClient
.
exec360GetToken
(
settings
.
tokenUrl360
())
let
result
=
JSON
.
parse
(
rtnt
.
stdout
);
let
token
=
result
.
access_token
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsServiceSve.js
View file @
ab84846f
...
...
@@ -59,6 +59,7 @@ class utils360Sve extends AppServiceBase {
pobj
.
actionBody
.
payTotalSum
=
productPriceResult
.
data
.
price
;
pobj
.
actionBody
.
price
=
productPriceResult
.
data
.
price
;
pobj
.
actionBody
.
payCode
=
productPriceResult
.
data
.
payCode
;
pobj
.
actionBody
.
productPriceId
=
productPriceResult
.
data
.
productPriceId
;
pobj
.
actionBody
.
channelItemCode
=
productPriceResult
.
data
.
channelItemCode
;
pobj
.
actionBody
.
quantity
=
1
;
pobj
.
actionBody
.
channelOrder
=
{
...
...
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