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
4d0493ec
Commit
4d0493ec
authored
Oct 23, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
baiduIcp
parent
3848464f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
100 additions
and
5 deletions
+100
-5
center-order/app/base/api/impl/action/icapi.js
+5
-0
center-order/app/base/api/impl/action/qcapi.js
+4
-0
center-order/app/base/service/impl/dbneed/needsolutionSve.js
+91
-2
center-order/app/base/service/impl/qcutils/aliyunqcSve.js
+0
-3
center-order/app/base/service/impl/qcutils/baiduqcSve.js
+0
-0
No files found.
center-order/app/base/api/impl/action/icapi.js
View file @
4d0493ec
...
...
@@ -75,6 +75,11 @@ class IcAPI extends APIBase {
case
"getProgrammeInfoByChannelSolutionNo"
:
//修改退款方案状态
opResult
=
await
this
.
needsolutionSve
.
getProgrammeInfoByChannelSolutionNo
(
pobj
);
break
;
// --------------庄冰2020.10.21-------百度Icp接入使用--------start------------------
case
"receiveSolutionPayInfoNew"
:
//接收方案状态及支付信息(方案支付后创建订单时调用)
opResult
=
await
this
.
needsolutionSve
.
receiveSolutionPayInfoNew
(
pobj
);
break
;
// --------------庄冰2020.10.21-------百度Icp接入使用--------end------------------
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
center-order/app/base/api/impl/action/qcapi.js
View file @
4d0493ec
...
...
@@ -5,6 +5,7 @@ class QcAPI extends APIBase {
constructor
()
{
super
();
this
.
aliyunqcSve
=
system
.
getObject
(
"service.qcutils.aliyunqcSve"
);
this
.
baiduqcSve
=
system
.
getObject
(
"service.qcutils.baiduqcSve"
);
}
/**
* 接口跳转-POST请求
...
...
@@ -108,6 +109,9 @@ class QcAPI extends APIBase {
opResult
=
await
this
.
aliyunqcSve
.
foodRecordLog
(
pobj
);
break
;
case
"receiveOrderStatusNotify"
:
//接收订单状态推送 百度icp 2.3
opResult
=
await
this
.
baiduqcSve
.
receiveOrderStatusNotify
(
pobj
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
center-order/app/base/service/impl/dbneed/needsolutionSve.js
View file @
4d0493ec
...
...
@@ -1145,8 +1145,97 @@ class NeedsolutionService extends ServiceBase {
return
system
.
getResultSuccess
(
ns
);
}
//---------------------icp注册-end-----------------------------------------------------------------
// --------------庄冰2020.10.23-------百度Icp接入使用--------start------------------
//接收方案状态及支付信息
async
receiveSolutionPayInfoNew
(
pobj
)
{
var
ab
=
pobj
.
actionBody
;
var
app
=
pobj
.
appInfo
;
if
(
!
app
||
!
app
.
uapp_id
)
{
return
system
.
getResultFail
(
-
100
,
"未知渠道"
);
}
if
(
!
ab
.
channelSolutionNo
)
{
return
system
.
getResultFail
(
-
101
,
"渠道方案编号不能为空"
);
}
if
(
ab
.
isDirectBuy
&&
ab
.
isDirectBuy
==
1
){
//直接下单
var
oldNs
=
await
this
.
dao
.
model
.
findOne
({
where
:
{
orderNo
:
ab
.
orderNo
},
raw
:
true
});
var
newNsObj
=
{
orderNo
:
ab
.
orderNo
,
channelSolutionNo
:
ab
.
channelSolutionNo
,
solutionNo
:
ab
.
channelSolutionNo
,
needNo
:
ab
.
bizId
,
channelNeedNo
:
ab
.
bizId
,
status
:
"ywc"
};
var
newSolutionCount
=
{
"status"
:
"PAID"
,
"bizType"
:
ab
.
product_info
&&
ab
.
product_info
.
item_code
?
ab
.
product_info
.
item_code
:
""
,
"solution"
:
{
"Area"
:
ab
.
area
||
""
,
"IcpType"
:
ab
.
consultType
,
"CompanyName"
:
ab
.
companyName
||
""
,
"CompanyAddress"
:
ab
.
area
||
""
},
"totalSum"
:
ab
.
totalSum
||
""
,
"typeCode"
:
ab
.
product_info
&&
ab
.
product_info
.
item_code
?
ab
.
product_info
.
item_code
:
""
,
"typeName"
:
ab
.
product_info
&&
ab
.
product_info
.
item_name
?
ab
.
product_info
.
item_name
:
""
,
"needStatus"
:
"3"
,
"statusName"
:
"用户支付"
,
"customerInfo"
:
{
"publishName"
:
pobj
.
userInfo
.
channel_nickname
||
""
,
"publishMobile"
:
pobj
.
userInfo
.
mobile
||
""
},
"customerRemark"
:
""
,
"needStatusName"
:
"处理中"
,
"customerMaterial"
:
{},
"solutionFlowList"
:
[
{
"status"
:
"PAID"
,
"statusName"
:
"用户支付"
,
"updated_at"
:
new
Date
()
}
]
};
newNsObj
.
solutionContent
=
JSON
.
stringify
(
newSolutionCount
);
var
ns
=
null
;
if
(
oldNs
&&
oldNs
.
id
){
ns
=
oldNs
;
}
else
{
ns
=
await
this
.
dao
.
create
(
newNsObj
);
}
var
ns2
=
await
this
.
dao
.
model
.
findOne
({
where
:
{
id
:
ns
.
id
},
raw
:
true
});
return
system
.
getResultSuccess
(
ns2
);
}
else
{
var
needsolutioninfo
=
await
this
.
dao
.
model
.
findOne
({
attributes
:[
"id"
,
"solutionContent"
,
"status"
,
"orderNo"
],
where
:
{
channelSolutionNo
:
ab
.
channelSolutionNo
,
isInvalid
:
0
},
raw
:
true
});
if
(
!
needsolutioninfo
||
!
needsolutioninfo
.
id
)
{
return
system
.
getResultFail
(
-
400
,
"未知方案"
);
}
var
solutionContent
=
needsolutioninfo
.
solutionContent
;
if
(
ab
.
orderPrice
)
{
// solutionContent = JSON.parse(solutionContent);
solutionContent
[
"totalSum"
]
=
Number
(
ab
.
orderPrice
||
"0"
);
}
// 2020 1017 lin 新增去掉status的判断,生成订单这个方案才算完成,所以没必要再判断,另一个原因网文2.3每个状态都有不同status,所以不能以来有没有status来决定方案完成情况。
// if (ab.status) {
// needsolutioninfo.status = "ywc";
// }
if
(
ab
.
orderNo
)
{
needsolutioninfo
.
orderNo
=
ab
.
orderNo
;
needsolutioninfo
.
status
=
"ywc"
;
}
needsolutioninfo
.
solutionContent
=
JSON
.
stringify
(
solutionContent
);
await
this
.
dao
.
update
(
needsolutioninfo
);
var
ns
=
await
this
.
dao
.
model
.
findOne
({
where
:
{
id
:
needsolutioninfo
.
id
},
raw
:
true
});
return
system
.
getResultSuccess
(
ns
);
}
}
// --------------庄冰2020.10.23-------百度Icp接入使用--------end------------------
}
module
.
exports
=
NeedsolutionService
;
// var task = new NeedsolutionService();
...
...
center-order/app/base/service/impl/qcutils/aliyunqcSve.js
View file @
4d0493ec
...
...
@@ -251,9 +251,6 @@ class AliyunQcService {
if
(
!
solution
.
Area
)
{
return
system
.
getResultFail
(
-
107
,
"区域不能为空"
);
}
/* if (!solution.ActionType) {
return system.getResultFail(-108, "办理类型不能为空");
}*/
var
solutionFlowList
=
ab
.
solutionContent
.
solutionFlowList
||
[];
solutionFlowList
.
push
({
status
:
"SOLUTION_SUBMIT"
,
statusName
:
this
.
icpSolutionStatusReference
.
SOLUTION_SUBMIT
,
updated_at
:
new
Date
()
...
...
center-order/app/base/service/impl/qcutils/baiduqcSve.js
0 → 100644
View file @
4d0493ec
This diff is collapsed.
Click to expand it.
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