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
7420790e
Commit
7420790e
authored
Jul 03, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'esign-sve-order' of gitlab.gongsibao.com:jiangyong/zhichan into esign-sve-order
parents
db109566
e38e5500
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
esign-sve-order/app/base/api/impl/op/action.js
+3
-0
esign-sve-order/app/base/db/impl/eorder/eorderDao.js
+13
-0
esign-sve-order/app/base/service/impl/eorder/eorderSve.js
+9
-0
No files found.
esign-sve-order/app/base/api/impl/op/action.js
View file @
7420790e
...
...
@@ -74,6 +74,9 @@ class ActionAPI extends APIBase {
case
"pageEorderContract"
:
// 合同列表(分页)
opResult
=
await
this
.
eordersignlogSve
.
pageEorderContract
(
action_body
);
break
;
case
"getMerchantLiveProduct"
:
// 查询商户下可用订单的产品
opResult
=
await
this
.
eorderSve
.
getMerchantLiveProduct
(
action_body
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
esign-sve-order/app/base/db/impl/eorder/eorderDao.js
View file @
7420790e
...
...
@@ -92,5 +92,18 @@ class EorderDao extends Dao{
return
list
||
[];
}
// 回去商户下订单中可用的产品
async
getMerchantLiveProduct
(
merchantId
)
{
let
sql
=
[];
sql
.
push
(
"SELECT"
);
sql
.
push
(
"t1.id, t1.`engine_account_id`, t2.product_id, t2.price, t1.`merchant_id`"
);
sql
.
push
(
"FROM e_order t1"
);
sql
.
push
(
"INNER JOIN `e_order_product` t2 ON t1.`id` = t2.`order_id`"
);
sql
.
push
(
"WHERE t1.`merchant_id` = :merchantId"
);
sql
.
push
(
"AND t1.`live_status` = '20' AND t1.`engine_account_id` <> ''"
);
sql
.
push
(
"ORDER BY t1.`created_at` ASC"
);
return
await
this
.
customQuery
(
sql
.
join
(
" "
),
{
merchantId
:
merchantId
});
}
}
module
.
exports
=
EorderDao
;
esign-sve-order/app/base/service/impl/eorder/eorderSve.js
View file @
7420790e
...
...
@@ -428,5 +428,13 @@ class EorderService extends ServiceBase {
return
system
.
getResult
(
null
,
`系统错误`
);
}
}
async
getMerchantLiveProduct
(
params
)
{
if
(
!
params
.
merchant_id
)
{
return
system
.
getResultSuccess
([]);
}
let
res
=
await
this
.
dao
.
getMerchantLiveProduct
(
params
.
merchant_id
);
return
system
.
getResultSuccess
(
res
);
}
}
module
.
exports
=
EorderService
;
\ No newline at end of file
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