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
adaa994e
Commit
adaa994e
authored
May 07, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
024a2b91
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
2 deletions
+42
-2
xggsve-order/app/base/db/impl/order/oorderdeliverDao.js
+9
-2
xggsve-order/app/base/db/impl/saas/saasorderDao.js
+3
-0
xggsve-order/app/base/service/impl/saas/saasorderSve.js
+30
-0
No files found.
xggsve-order/app/base/db/impl/order/oorderdeliverDao.js
View file @
adaa994e
...
...
@@ -99,6 +99,7 @@ class OorderdeliverDao extends Dao {
if
(
params
.
id
)
{
sql
.
push
(
`AND b.id = :id `
);
}
if
(
params
.
order_id
)
{
sql
.
push
(
`AND b.order_id = :order_id `
);
}
...
...
@@ -108,11 +109,17 @@ class OorderdeliverDao extends Dao {
if
(
params
.
status
)
{
sql
.
push
(
`AND a.status = :status `
);
}
// if (params.createdBegin) {
// sql.push(`AND a.created_at >= :createdBegin `);
// }
// if (params.createdEnd) {
// sql.push(`AND a.created_at <= :createdEnd`);
// }
if
(
params
.
createdBegin
)
{
sql
.
push
(
`AND
a
.created_at >= :createdBegin `
);
sql
.
push
(
`AND
b
.created_at >= :createdBegin `
);
}
if
(
params
.
createdEnd
)
{
sql
.
push
(
`AND
a
.created_at <= :createdEnd`
);
sql
.
push
(
`AND
b
.created_at <= :createdEnd`
);
}
}
...
...
xggsve-order/app/base/db/impl/saas/saasorderDao.js
View file @
adaa994e
...
...
@@ -47,6 +47,9 @@ class SaasOrderDao extends Dao {
if
(
!
params
||
!
sql
)
{
return
;
}
if
(
params
.
attribute
&&
params
.
value
){
sql
.
push
(
`AND t1.
${
params
.
attribute
}
= :value`
);
}
if
(
params
.
saas_id
)
{
sql
.
push
(
"AND t1.saas_id = :saas_id"
);
...
...
xggsve-order/app/base/service/impl/saas/saasorderSve.js
View file @
adaa994e
...
...
@@ -257,6 +257,8 @@ class SaasOrderService extends ServiceBase {
}
async
pageByCondition
(
params
)
{
//格式化订单状态
this
.
buildOrderTypeParams
(
params
);
let
page
=
{
count
:
0
,
rows
:
[]
...
...
@@ -285,6 +287,34 @@ class SaasOrderService extends ServiceBase {
return
system
.
getResultSuccess
(
page
);
}
/**
* fn:由于订单状态分为三个部分,需要格式化查询条件
* @param params
*/
buildOrderTypeParams
(
params
){
if
(
!
params
||
!
params
.
order_type
){
return
;
}
// 订单状态总结 1010 待付款, 2010 待审核, 2030 审核驳回, 3010 业务办理中, 3020待交付, 3030 已交付
if
(
params
.
order_type
==
"1010"
){
params
.
attribute
=
"pay_status"
;
params
.
value
=
"10"
;
}
else
if
(
params
.
order_type
==
"2010"
||
params
.
order_type
==
"2030"
){
params
.
attribute
=
"audit_status"
;
params
.
value
=
params
.
order_type
==
"2010"
?
"10"
:
"30"
;
}
else
if
(
params
.
order_type
==
"2030"
||
params
.
order_type
==
"3020"
||
params
.
order_type
==
"3030"
){
params
.
attribute
=
"handle_status"
;
if
(
params
.
order_type
==
"3010"
){
params
.
value
=
"10"
;
}
else
if
(
params
.
order_type
==
"3020"
){
params
.
value
=
"20"
;
}
else
{
params
.
value
=
"30"
;
}
}
}
async
parseStatus
(
params
)
{
if
(
!
params
||
!
params
.
status
||
params
.
status
.
length
!=
4
)
{
return
;
...
...
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