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
24b49c10
Commit
24b49c10
authored
Dec 04, 2019
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
orderlist
parent
dc4970b3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
0 deletions
+58
-0
igirl-channel/app/base/api/impl/action/tmOrder.js
+6
-0
igirl-channel/app/base/db/dao.base.js
+7
-0
igirl-channel/app/base/db/impl/dbcorder/orderinfoDao.js
+20
-0
igirl-channel/app/base/service/impl/dbcorder/orderinfoSve.js
+25
-0
No files found.
igirl-channel/app/base/api/impl/action/tmOrder.js
View file @
24b49c10
...
...
@@ -15,6 +15,7 @@ class TmOrderAPI extends APIBase {
this
.
pushlogSve
=
system
.
getObject
(
"service.common.pushlogSve"
);
this
.
toolSve
=
system
.
getObject
(
"service.trademark.toolSve"
);
this
.
appProductSve
=
system
.
getObject
(
"service.dbapp.appproductSve"
);
this
.
orderinfoSve
=
system
.
getObject
(
"service.dbcorder.orderinfoSve"
);
}
/**
* 接口跳转-POST请求
...
...
@@ -46,6 +47,8 @@ class TmOrderAPI extends APIBase {
async
opActionProcess
(
action_process
,
action_type
,
action_body
,
pobj
,
req
)
{
action_body
.
app
=
req
.
app
;
action_body
.
user
=
req
.
user
;
// action_body.app = { id: 2,uAppId:18};
// action_body.user = { id: 6, app_id: 2, nickname: "测试用户",channelUserId:"testUserId01" };
var
opResult
=
null
;
if
([
"subTmOrder"
,
"getTmOrderList"
,
"getTmOrderInfo"
,
"getTmApplyInfo"
,
"getTmNclList"
,
"getNeedInfo"
,
"tmConfirm"
,
"updateTmInfo"
,
"updateNclInfo"
,
"updateContacts"
,
"updateCustomerInfo"
,
...
...
@@ -59,6 +62,9 @@ class TmOrderAPI extends APIBase {
case
"test"
:
//测试
opResult
=
system
.
getResultSuccess
(
null
,
"测试成功"
);
break
;
case
"getOrderList"
:
//获取订单列表(分页)
opResult
=
await
this
.
orderinfoSve
.
findAndCountAll
(
action_body
,
req
);
break
;
case
"decryptStr"
:
//
opResult
=
await
this
.
toolSve
.
decryptStr
(
req
.
app
,
action_body
.
opStr
);
break
;
...
...
igirl-channel/app/base/db/dao.base.js
View file @
24b49c10
...
...
@@ -64,6 +64,9 @@ class Dao {
//return {"key":"include","value":{model:this.db.models.app}};
return
[[
"created_at"
,
"DESC"
]];
}
buildAttributes
(){
return
[];
}
buildQuery
(
qobj
)
{
var
linkAttrs
=
[];
const
pageNo
=
qobj
.
pageInfo
.
pageNo
;
...
...
@@ -123,6 +126,10 @@ class Dao {
if
(
extraFilter
)
{
qc
[
extraFilter
.
key
]
=
extraFilter
.
value
;
}
var
attributesObj
=
this
.
buildAttributes
();
if
(
attributesObj
&&
attributesObj
.
length
>
0
){
qc
.
attributes
=
attributesObj
;
}
console
.
log
(
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm"
);
console
.
log
(
qc
);
return
qc
;
...
...
igirl-channel/app/base/db/impl/dbcorder/orderinfoDao.js
View file @
24b49c10
...
...
@@ -4,5 +4,25 @@ class OrderInfoDao extends Dao {
constructor
()
{
super
(
Dao
.
getModelName
(
OrderInfoDao
));
}
buildAttributes
(){
return
[
"orderNo"
,
"channelServiceNo"
,
"needNo"
,
"payTime"
,
"channelUserId"
,
"quantity"
,
"serviceQuantity"
,
"orderPayStatusName"
,
"orderPayStatus"
,
"totalSum"
,
"payTotalSum"
,
"refundSum"
,
"channelProfitSum"
,
"pfSettleProfit"
,
"notes"
,
"opNotes"
];
}
}
module
.
exports
=
OrderInfoDao
;
igirl-channel/app/base/service/impl/dbcorder/orderinfoSve.js
View file @
24b49c10
...
...
@@ -263,6 +263,31 @@ class OrderInfoService extends ServiceBase {
});
}
}
async
findAndCountAll
(
obj
,
req
)
{
var
app
=
req
.
app
;
if
(
!
app
||
!
app
.
uAppId
){
return
system
.
getResult
(
null
,
"渠道信息有误"
);
}
obj
[
"search"
][
"uapp_id"
]
=
app
.
uAppId
;
const
result
=
await
this
.
dao
.
findAndCountAll
(
obj
);
return
result
;
}
async
getOrderDetailByOrderNo
(
obj
){
var
orderNo
=
obj
.
orderNo
;
if
(
!
orderNo
){
return
system
.
getResult
(
null
,
"订单编号不能为空"
);
}
var
app
=
req
.
app
;
if
(
!
app
||
!
app
.
uAppId
){
return
system
.
getResult
(
null
,
"渠道信息有误"
);
}
var
order
=
await
this
.
dao
.
model
.
findOne
({
where
:{
orderNo
:
orderNo
,
uapp_id
:
app
.
uAppId
},
raw
:
true
});
return
order
;
}
}
module
.
exports
=
OrderInfoService
;
// var task = new OrderInfoService();
...
...
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