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
d000c665
Commit
d000c665
authored
Dec 02, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
83f0055d
1256381b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
68 additions
and
30 deletions
+68
-30
center-channel/app/base/api/impl/action/product.js
+3
-0
center-channel/app/base/api/impl/opreceive/need.js
+3
-1
center-channel/app/base/service/impl/common/baseCenterOrderSve.js
+0
-0
center-channel/app/base/service/impl/utilsSve/utils360Sve.js
+11
-11
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+27
-18
center-channel/app/base/service/impl/utilsSve/utilsProductSve.js
+17
-0
center-channel/app/config/settings.js
+7
-0
No files found.
center-channel/app/base/api/impl/action/product.js
View file @
d000c665
...
@@ -40,6 +40,9 @@ class ProductAPI extends WEBBase {
...
@@ -40,6 +40,9 @@ class ProductAPI extends WEBBase {
case
"getProductRecommend"
:
case
"getProductRecommend"
:
opResult
=
await
this
.
utilsProductSve
.
getProductRecommend
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsProductSve
.
getProductRecommend
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
case
"updateProductPrice"
:
opResult
=
await
this
.
utilsProductSve
.
updateProductPrice
(
pobj
,
pobj
.
actionBody
);
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
}
}
...
...
center-channel/app/base/api/impl/opreceive/need.js
View file @
d000c665
...
@@ -48,8 +48,10 @@ class Need extends APIBase {
...
@@ -48,8 +48,10 @@ class Need extends APIBase {
opResult
=
await
this
.
utilsNeedSve
.
needDetailByChannelNo
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsNeedSve
.
needDetailByChannelNo
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
case
"getItemByChannelNeedNo"
:
case
"getItemByChannelNeedNo"
:
case
"getSolutionByChannelSolutionNo"
:
opResult
=
await
this
.
utilsNeedSve
.
getItemByChannelNeedNo
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsNeedSve
.
getItemByChannelNeedNo
(
pobj
,
pobj
.
actionBody
);
break
case
"getSolutionByChannelSolutionNo"
:
opResult
=
await
this
.
utilsNeedSve
.
getSolutionByChannelSolutionNo
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
case
"getItemByNeedNo"
:
case
"getItemByNeedNo"
:
opResult
=
await
this
.
utilsNeedSve
.
getItemByNeedNo
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsNeedSve
.
getItemByNeedNo
(
pobj
,
pobj
.
actionBody
);
...
...
center-channel/app/base/service/impl/common/baseCenterOrderSve.js
View file @
d000c665
This diff is collapsed.
Click to expand it.
center-channel/app/base/service/impl/utilsSve/utils360Sve.js
View file @
d000c665
...
@@ -56,23 +56,23 @@ class utils360Sve extends AppServiceBase {
...
@@ -56,23 +56,23 @@ class utils360Sve extends AppServiceBase {
//更新订单状态到360
//更新订单状态到360
async
pushOrderStatus
(
pobj
)
{
async
pushOrderStatus
(
pobj
)
{
try
{
try
{
var
verifyResult
=
await
this
.
verifyParam
(
pobj
);
//
var verifyResult = await this.verifyParam(pobj);
if
(
verifyResult
.
status
!=
0
)
{
//
if (verifyResult.status != 0) {
return
await
this
.
disposePushResultFail
(
pobj
,
verifyResult
,
"status->pushOrderStatus->verifyResult"
,
this
.
pushlogFailType
.
FAILLOG
);
//
return await this.disposePushResultFail(pobj, verifyResult, "status->pushOrderStatus->verifyResult", this.pushlogFailType.FAILLOG);
}
//
}
var
interface_params_info
=
verifyResult
.
data
;
//
var interface_params_info = verifyResult.data;
let
token
=
await
this
.
utilsAuthSve
.
get360Token
();
let
token
=
await
this
.
utilsAuthSve
.
get360Token
();
let
url
=
interface_params_info
.
opUrl
+
'
?token='
+
token
.
access_token
;
let
url
=
settings
.
pushUrl360
()
+
'api/v1/eshop/GsbOrderUpdate
?token='
+
token
.
access_token
;
let
order_id
=
pobj
.
actionBody
.
orderNo
;
let
order_id
=
pobj
.
actionBody
.
orderNo
;
let
ApplicationStatus
=
pobj
.
pushObj
.
ApplicationStatus
;
let
ApplicationStatus
=
pobj
.
pushObj
.
ApplicationStatus
;
let
status
=
0
;
let
status
=
30
;
if
(
Number
(
ApplicationStatus
)
<
508
)
{
if
(
Number
(
ApplicationStatus
)
>
510
){
status
=
30
}
else
{
status
=
40
;
status
=
40
;
}
}
let
pushObj
=
{
let
pushObj
=
{
order_id
,
status
order_id
,
status
,
sub_status
:
ApplicationStatus
}
}
let
result
=
await
this
.
restPostUrl
(
pushObj
,
url
);
let
result
=
await
this
.
restPostUrl
(
pushObj
,
url
);
if
(
result
.
code
==
200
)
{
if
(
result
.
code
==
200
)
{
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
d000c665
...
@@ -17,6 +17,7 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -17,6 +17,7 @@ class UtilsOrderService extends AppServiceBase {
this
.
centerAppUrl
=
settings
.
centerAppUrl
();
this
.
centerAppUrl
=
settings
.
centerAppUrl
();
this
.
centerAppPayUrl
=
settings
.
centerAppUrl
()
+
"payment/paymentApi/springBoard"
;
this
.
centerAppPayUrl
=
settings
.
centerAppUrl
()
+
"payment/paymentApi/springBoard"
;
this
.
paySecret
=
settings
.
paySecret
()
this
.
paySecret
=
settings
.
paySecret
()
this
.
utils360Sve
=
system
.
getObject
(
"service.utilsSve.utils360Sve"
);
};
};
/*
/*
* 订单验证
* 订单验证
...
@@ -955,24 +956,32 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -955,24 +956,32 @@ class UtilsOrderService extends AppServiceBase {
actionBody
:
opOrderResult
.
data
actionBody
:
opOrderResult
.
data
}
}
// 推送
// 推送
let
yfRet
=
await
this
.
utilsPushSve
.
pushBusInfo
(
pobj
,
"pushOrder"
,
0
);
// let yfRet = await this.utilsPushSve.pushBusInfo(pobj, "pushOrder", 0);
if
(
yfRet
.
status
!=
0
){
// if(yfRet.status !=0){
return
yfRet
;
// return yfRet;
}
// }
if
([
'icpsq'
,
'edisq'
].
includes
(
opOrderResult
.
data
.
product_info
.
channel_item_code
))
{
// if (['icpsq', 'edisq'].includes(opOrderResult.data.product_info.channel_item_code)) {
//创建方案
// //创建方案
pobj
.
salesmanInfo
=
{
// pobj.salesmanInfo ={
"salesmanId"
:
yfRet
.
data
.
orderList
[
0
].
operator
||
""
,
// "salesmanId":yfRet.data.orderList[0].operator || "",
"salesmanName"
:
yfRet
.
data
.
orderList
[
0
].
operatorName
||
""
,
// "salesmanName":yfRet.data.orderList[0].operatorName || "",
"salesmanMobile"
:
yfRet
.
data
.
orderList
[
0
].
phone
||
""
,
// "salesmanMobile":yfRet.data.orderList[0].phone ||"",
"salesmanChannelId"
:
yfRet
.
data
.
orderList
[
0
].
channelUserId
||
""
// "salesmanChannelId":yfRet.data.orderList[0].channelUserId || ""
}
// }
let
pushRet
=
await
this
.
packagingPushData
(
pobj
);
// let pushRet = await this.packagingPushData(pobj);
if
(
pushRet
.
status
!=
0
)
{
// if (pushRet.status != 0) {
throw
new
Error
(
'推送失败'
)
// throw new Error('推送失败')
}
// }
pobj
.
actionBody
=
pushRet
.
data
;
// pobj.actionBody = pushRet.data;
this
.
utilsPushSve
.
aliBusiness2Delivery
(
pobj
,
"pushDeliveryOrder"
);
// this.utilsPushSve.aliBusiness2Delivery(pobj, "pushDeliveryOrder");
// }
//订单状态 已接单 目前360在用
pobj
.
actionBody
.
orderNo
=
params
.
orderNo
;
pobj
.
pushObj
=
{
ApplicationStatus
:
30
};
if
(
pobj
.
appInfo
.
uapp_id
==
'50'
){
this
.
utils360Sve
.
pushOrderStatus
(
pobj
)
}
}
opOrderResult
.
data
=
null
;
opOrderResult
.
data
=
null
;
return
opOrderResult
;
return
opOrderResult
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsProductSve.js
View file @
d000c665
...
@@ -117,6 +117,23 @@ class UtilsProductService extends AppServiceBase {
...
@@ -117,6 +117,23 @@ class UtilsProductService extends AppServiceBase {
let
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
let
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
return
await
this
.
restPostUrl
(
pobj
,
url
);
return
await
this
.
restPostUrl
(
pobj
,
url
);
}
}
/**
* 修改产品销售价格
* @param pobj
* @param actionBody
* @returns {Promise<void>}
*/
async
updateProductPrice
(
pobj
,
actionBody
){
if
(
!
actionBody
.
payCode
){
return
system
.
getResultFail
(
-
1
,
'产品码 payCode 不能为空!'
)
}
if
(
!
actionBody
.
price
){
return
system
.
getResultFail
(
-
1
,
'价格 price 不能为空!'
)
}
let
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
return
await
this
.
restPostUrl
(
pobj
,
url
);
}
}
}
module
.
exports
=
UtilsProductService
;
module
.
exports
=
UtilsProductService
;
center-channel/app/config/settings.js
View file @
d000c665
...
@@ -267,6 +267,13 @@ var settings = {
...
@@ -267,6 +267,13 @@ var settings = {
return
"https://console.e.360.cn/"
//
return
"https://console.e.360.cn/"
//
}
}
},
},
pushUrl360
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
return
"http://180.163.239.98:38086/"
// 360测试环境
}
else
{
return
"https://tobadmin.e.360.cn/"
//
}
},
aliUappId
:
function
()
{
aliUappId
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
if
(
this
.
env
==
"dev"
)
{
return
18
// uapp_id
return
18
// uapp_id
...
...
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