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
3e0f17d4
Commit
3e0f17d4
authored
Mar 20, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zhuangbing
parent
ca2a44bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletions
+38
-1
center-order/app/base/api/impl/action/icapi.js
+9
-0
center-order/app/base/service/impl/dbneed/needsolutionSve.js
+29
-1
No files found.
center-order/app/base/api/impl/action/icapi.js
View file @
3e0f17d4
...
@@ -60,6 +60,15 @@ class IcAPI extends APIBase {
...
@@ -60,6 +60,15 @@ class IcAPI extends APIBase {
case
"solutionClose"
:
//需求关闭
case
"solutionClose"
:
//需求关闭
opResult
=
await
this
.
needinfoSve
.
solutionClose
(
pobj
);
opResult
=
await
this
.
needinfoSve
.
solutionClose
(
pobj
);
break
;
break
;
case
"abolishProgrammeByNeed"
:
//根据需求关闭方案(关闭需求后调用)
opResult
=
await
this
.
needsolutionSve
.
abolishProgrammeByNeed
(
pobj
);
break
;
case
"createSolutionByOrder"
:
//立即支付下单保存方案
opResult
=
await
this
.
needsolutionSve
.
createSolutionByOrder
(
pobj
);
break
;
case
"receiveSolutionPayInfo"
:
//接收方案状态及支付信息(方案支付后创建订单时调用)
opResult
=
await
this
.
needinfoSve
.
receiveSolutionPayInfo
(
pobj
);
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
break
;
...
...
center-order/app/base/service/impl/dbneed/needsolutionSve.js
View file @
3e0f17d4
...
@@ -415,7 +415,35 @@ class NeedsolutionService extends ServiceBase {
...
@@ -415,7 +415,35 @@ class NeedsolutionService extends ServiceBase {
await
this
.
dao
.
create
(
reqObj
);
await
this
.
dao
.
create
(
reqObj
);
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
//接收方案状态及支付信息
async
receiveSolutionPayInfo
(
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.status){
// return system.getResultFail(-102,"状态不能为空");
// }
var
needsolutioninfo
=
await
this
.
dao
.
findOne
({
channelSolutionNo
:
ab
.
channelSolutionNo
,
uapp_id
:
app
.
uapp_id
});
if
(
!
needsolutioninfo
||
!
needsolutioninfo
.
id
){
return
system
.
getResultFail
(
-
400
,
"未知方案"
);
}
var
solutionContent
=
needsolutioninfo
.
solutionContent
;
if
(
ab
.
orderPrice
){
solutionContent
=
JSON
.
parse
(
solutionContent
);
solutionContent
[
"totalSum"
]
=
ab
.
orderPrice
;
needsolutioninfo
.
solutionContent
=
JSON
.
stringify
(
solutionContent
);
}
if
(
ab
.
status
){
needsolutioninfo
.
status
=
ab
.
status
;
}
await
this
.
dao
.
update
(
needsolutioninfo
);
return
system
.
getResultSuccess
();
}
}
}
module
.
exports
=
NeedsolutionService
;
module
.
exports
=
NeedsolutionService
;
...
...
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