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
5d828877
Commit
5d828877
authored
Jan 13, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
1bf56c80
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
5 deletions
+48
-5
xggsve-order/app/base/db/impl/order/obusinessmenDao.js
+3
-3
xggsve-order/app/base/db/impl/order/oorderDao.js
+23
-0
xggsve-order/app/base/service/impl/order/obusinessmenSve.js
+22
-2
No files found.
xggsve-order/app/base/db/impl/order/obusinessmenDao.js
View file @
5d828877
...
...
@@ -43,14 +43,14 @@ class ObusinessmenDao extends Dao {
}
if
(
params
.
name
)
{
params
.
name_like
=
"%"
+
params
.
name
+
"%"
;
sql
.
push
(
"AND t1.name
=
:name_like"
);
sql
.
push
(
"AND t1.name
LIKE
:name_like"
);
}
if
(
params
.
bd_id
)
{
sql
.
push
(
"AND t1.bd_id = :bd_id"
);
}
if
(
params
.
bd_path
)
{
params
.
bd_path_like
=
"%"
+
params
.
bd_path
+
"%"
;
sql
.
push
(
"AND t1.bd_path
=
:bd_path_like"
);
params
.
bd_path_like
=
params
.
bd_path
+
"%"
;
sql
.
push
(
"AND t1.bd_path
LIKE
:bd_path_like"
);
}
if
(
params
.
order_id
)
{
sql
.
push
(
"AND t1.order_id = :order_id"
);
...
...
xggsve-order/app/base/db/impl/order/oorderDao.js
View file @
5d828877
...
...
@@ -52,5 +52,27 @@ class OorderDao extends Dao {
}
async
findMapByIds
(
ids
,
attrs
)
{
var
result
=
{};
if
(
!
ids
||
ids
.
length
==
0
)
{
return
result
;
}
attrs
=
attrs
||
"*"
;
var
sql
=
"SELECT "
+
attrs
+
" FROM `o_order` WHERE id IN (:ids)"
;
var
list
=
await
this
.
customQuery
(
sql
,
{
ids
:
ids
});
if
(
!
list
||
list
.
length
==
0
)
{
return
result
;
}
for
(
var
item
of
list
)
{
result
[
item
.
id
]
=
item
;
}
return
result
;
}
}
module
.
exports
=
OorderDao
;
\ No newline at end of file
xggsve-order/app/base/service/impl/order/obusinessmenSve.js
View file @
5d828877
...
...
@@ -6,7 +6,7 @@ const ServiceBase = require("../../sve.base")
class
ObusinessmenService
extends
ServiceBase
{
constructor
()
{
super
(
"order"
,
ServiceBase
.
getDaoName
(
ObusinessmenService
));
this
.
oorderDao
=
system
.
getObject
(
"
service
.order.oorderDao"
);
this
.
oorderDao
=
system
.
getObject
(
"
db
.order.oorderDao"
);
this
.
ASSIGN_STATUS
=
[
'1160'
,
'1170'
,
'1180'
,
'1190'
,
'1200'
];
}
...
...
@@ -69,7 +69,7 @@ class ObusinessmenService extends ServiceBase {
if
(
!
_order
){
return
system
.
getResult
(
null
,
`订单存在`
);
}
if
(
this
.
ASSIGN_STATUS
.
indexOf
(
_order
.
status
)
==-
1
){
if
(
this
.
ASSIGN_STATUS
.
indexOf
(
_order
.
status
.
toString
()
)
==-
1
){
return
system
.
getResult
(
null
,
`个体工商户不能签约`
);
}
...
...
@@ -133,9 +133,28 @@ class ObusinessmenService extends ServiceBase {
for
(
var
row
of
list
)
{
this
.
handleDate
(
row
,
[
"created_at"
,
"assignTime"
],
null
,
-
8
);
}
await
this
.
doSignBtn
(
list
);
}
return
system
.
getResultSuccess
({
count
:
total
,
rows
:
list
});
}
async
doSignBtn
(
list
)
{
if
(
!
list
||
list
.
length
==
0
)
{
return
;
}
let
ids
=
[];
for
(
let
item
of
list
)
{
ids
.
push
(
item
.
order_id
);
}
let
orderMap
=
await
this
.
oorderDao
.
findMapByIds
(
ids
,
"id, status"
);
for
(
let
item
of
list
)
{
let
order
=
orderMap
[
item
.
order_id
]
||
{};
item
.
showSign
=
this
.
ASSIGN_STATUS
.
indexOf
(
order
.
status
.
toString
())
!=
-
1
;
}
}
}
module
.
exports
=
ObusinessmenService
;
\ 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