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
b42e4bee
Commit
b42e4bee
authored
Mar 25, 2021
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
f30f40c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
center-order/app/base/db/impl/dbcorder/orderinfoDao.js
+16
-16
No files found.
center-order/app/base/db/impl/dbcorder/orderinfoDao.js
View file @
b42e4bee
const
system
=
require
(
"../../../system"
);
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
const
Dao
=
require
(
"../../dao.base"
);
const
{
Op
}
=
require
(
"sequelize"
);
const
{
Op
}
=
require
(
"sequelize"
);
class
OrderInfoDao
extends
Dao
{
class
OrderInfoDao
extends
Dao
{
constructor
()
{
constructor
()
{
super
(
Dao
.
getModelName
(
OrderInfoDao
));
super
(
Dao
.
getModelName
(
OrderInfoDao
));
...
@@ -36,10 +36,10 @@ class OrderInfoDao extends Dao {
...
@@ -36,10 +36,10 @@ class OrderInfoDao extends Dao {
}
}
return
await
this
.
model
.
findOne
(
sqlWhere
);
return
await
this
.
model
.
findOne
(
sqlWhere
);
}
}
async
getItemStatusByChannelOrderNo
(
o
rderNo
,
uapp_id
)
{
async
getItemStatusByChannelOrderNo
(
channelO
rderNo
,
uapp_id
)
{
var
sqlWhere
=
{
var
sqlWhere
=
{
where
:
{
where
:
{
o
rderNo
:
orderNo
channelO
rderNo
:
orderNo
},
},
attributes
:
[
attributes
:
[
"id"
,
"id"
,
...
@@ -92,8 +92,8 @@ class OrderInfoDao extends Dao {
...
@@ -92,8 +92,8 @@ class OrderInfoDao extends Dao {
async
addOrderDelivery
(
data
,
orderNo
,
t
)
{
//新增交付信息
async
addOrderDelivery
(
data
,
orderNo
,
t
)
{
//新增交付信息
const
sql
=
"INSERT INTO `c_order_delivery` (`sourceOrderNo`,`deliveryContent`) VALUE('"
+
const
sql
=
"INSERT INTO `c_order_delivery` (`sourceOrderNo`,`deliveryContent`) VALUE('"
+
orderNo
+
"','"
+
JSON
.
stringify
(
data
)
+
"')"
;
orderNo
+
"','"
+
JSON
.
stringify
(
data
)
+
"')"
;
await
this
.
customInsert
(
sql
,
null
,
t
);
await
this
.
customInsert
(
sql
,
null
,
t
);
return
system
.
getResultSuccess
()
return
system
.
getResultSuccess
()
}
}
/**
/**
...
@@ -101,11 +101,11 @@ class OrderInfoDao extends Dao {
...
@@ -101,11 +101,11 @@ class OrderInfoDao extends Dao {
* @param ids
* @param ids
* @returns {Promise<void>}
* @returns {Promise<void>}
*/
*/
async
getOrdersByIds
(
ids
){
async
getOrdersByIds
(
ids
)
{
let
orders
=
await
this
.
findAll
({
let
orders
=
await
this
.
findAll
({
where
:
{
where
:
{
channelOrderNo
:
{
channelOrderNo
:
{
[
Op
.
in
]:
ids
[
Op
.
in
]:
ids
}
}
}
}
})
})
...
@@ -117,10 +117,10 @@ class OrderInfoDao extends Dao {
...
@@ -117,10 +117,10 @@ class OrderInfoDao extends Dao {
* @param needs
* @param needs
* @returns {Promise<Array<Model>|*>}
* @returns {Promise<Array<Model>|*>}
*/
*/
async
bulkUpdate
(
orders
){
async
bulkUpdate
(
orders
)
{
let
result
=
await
this
.
bulkCreate
(
orders
,{
let
result
=
await
this
.
bulkCreate
(
orders
,
{
fields
:
[
"id"
,
"status"
,
"statusName"
]
,
fields
:
[
"id"
,
"status"
,
"statusName"
]
,
updateOnDuplicate
:
[
"status"
,
"statusName"
]
updateOnDuplicate
:
[
"status"
,
"statusName"
]
});
});
return
result
;
return
result
;
}
}
...
@@ -130,11 +130,11 @@ class OrderInfoDao extends Dao {
...
@@ -130,11 +130,11 @@ class OrderInfoDao extends Dao {
* @param needs
* @param needs
* @returns {Promise<Array<Model>|*>}
* @returns {Promise<Array<Model>|*>}
*/
*/
async
bulkUpdateStatus
(
status
,
statusName
,
ids
)
{
async
bulkUpdateStatus
(
status
,
statusName
,
ids
)
{
let
result
=
await
this
.
updateByWhere
({
orderStatus
:
status
,
orderStatusName
:
statusName
},
{
let
result
=
await
this
.
updateByWhere
({
orderStatus
:
status
,
orderStatusName
:
statusName
},
{
where
:
{
where
:
{
channelOrderNo
:{
channelOrderNo
:
{
[
Op
.
in
]:
ids
[
Op
.
in
]:
ids
}
}
}
}
});
});
...
...
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