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
87382b23
Commit
87382b23
authored
Apr 02, 2021
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理渠道退款
parent
c7065bd9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
center-order/app/base/db/impl/dbcorder/orderinfoDao.js
+27
-2
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
+0
-0
No files found.
center-order/app/base/db/impl/dbcorder/orderinfoDao.js
View file @
87382b23
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
));
}
}
/**
* 更新订单
* @param status
* @param statusName
* @param channelOrderNo
* @param uapp_id
* @returns {Promise<*>}
*/
async
updateStatus
(
status
,
statusName
,
channelOrderNo
,
uapp_id
)
{
let
result
=
await
this
.
updateByWhere
({
orderStatus
:
status
,
orderStatusName
:
statusName
},
{
where
:
{
channelOrderNo
:
channelOrderNo
,
uapp_id
:
uapp_id
,
}
});
return
result
;
}
async
getItemStatusByOrderNo
(
orderNo
,
uapp_id
)
{
async
getItemStatusByOrderNo
(
orderNo
,
uapp_id
)
{
var
sqlWhere
=
{
var
sqlWhere
=
{
where
:
{
where
:
{
...
@@ -36,6 +56,7 @@ class OrderInfoDao extends Dao {
...
@@ -36,6 +56,7 @@ class OrderInfoDao extends Dao {
}
}
return
await
this
.
model
.
findOne
(
sqlWhere
);
return
await
this
.
model
.
findOne
(
sqlWhere
);
}
}
async
getItemStatusByChannelOrderNo
(
channelOrderNo
,
uapp_id
)
{
async
getItemStatusByChannelOrderNo
(
channelOrderNo
,
uapp_id
)
{
var
sqlWhere
=
{
var
sqlWhere
=
{
where
:
{
where
:
{
...
@@ -67,6 +88,7 @@ class OrderInfoDao extends Dao {
...
@@ -67,6 +88,7 @@ class OrderInfoDao extends Dao {
}
}
return
await
this
.
model
.
findOne
(
sqlWhere
);
return
await
this
.
model
.
findOne
(
sqlWhere
);
}
}
async
delOrderByOrderNo
(
orderNo
,
uapp_id
,
channelUserId
)
{
async
delOrderByOrderNo
(
orderNo
,
uapp_id
,
channelUserId
)
{
var
sqlWhere
=
{
var
sqlWhere
=
{
orderNo
:
orderNo
,
orderNo
:
orderNo
,
...
@@ -82,6 +104,7 @@ class OrderInfoDao extends Dao {
...
@@ -82,6 +104,7 @@ class OrderInfoDao extends Dao {
};
};
return
await
this
.
delete
(
sqlWhere
);
return
await
this
.
delete
(
sqlWhere
);
}
}
async
channeldelOrder
(
channelOrderNo
,
uapp_id
)
{
async
channeldelOrder
(
channelOrderNo
,
uapp_id
)
{
var
sqlWhere
=
{
var
sqlWhere
=
{
channelOrderNo
:
channelOrderNo
,
channelOrderNo
:
channelOrderNo
,
...
@@ -89,6 +112,7 @@ class OrderInfoDao extends Dao {
...
@@ -89,6 +112,7 @@ class OrderInfoDao extends Dao {
};
};
return
await
this
.
delete
(
sqlWhere
);
return
await
this
.
delete
(
sqlWhere
);
}
}
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
)
+
"')"
;
...
@@ -131,7 +155,7 @@ class OrderInfoDao extends Dao {
...
@@ -131,7 +155,7 @@ class OrderInfoDao extends Dao {
* @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
...
@@ -141,4 +165,5 @@ class OrderInfoDao extends Dao {
...
@@ -141,4 +165,5 @@ class OrderInfoDao extends Dao {
return
result
;
return
result
;
}
}
}
}
module
.
exports
=
OrderInfoDao
;
module
.
exports
=
OrderInfoDao
;
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
View file @
87382b23
This diff is collapsed.
Click to expand it.
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