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
3a298af7
Commit
3a298af7
authored
Mar 23, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'xggsve-order' of gitlab.gongsibao.com:jiangyong/zhichan into xggsve-order
parents
ab79da47
118e9ccb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
221 additions
and
9 deletions
+221
-9
xggsve-order/app/base/api/impl/op/action.js
+15
-0
xggsve-order/app/base/db/impl/saas/saasorderDao.js
+11
-4
xggsve-order/app/base/db/impl/saas/saasorderdeliverinfoDao.js
+33
-0
xggsve-order/app/base/db/impl/saas/saasorderpayDao.js
+40
-0
xggsve-order/app/base/db/models/saas/saasorder.js
+0
-5
xggsve-order/app/base/db/models/saas/saasorderdeliverinfo.js
+66
-0
xggsve-order/app/base/db/models/saas/saasorderpay.js
+56
-0
xggsve-order/app/base/service/impl/saas/saasorderSve.js
+0
-0
No files found.
xggsve-order/app/base/api/impl/op/action.js
View file @
3a298af7
...
...
@@ -129,9 +129,24 @@ class ActionAPI extends APIBase {
case
"saasOrderInfo"
:
// 订单信息
opResult
=
await
this
.
saasorderSve
.
info
(
action_body
);
break
;
case
"saasOrderPlatformOrderInfo"
:
// 订单信息
opResult
=
await
this
.
saasorderSve
.
platformOrderInfo
(
action_body
);
break
;
case
"saasOrderMerchantOrderInfo"
:
// 订单信息
opResult
=
await
this
.
saasorderSve
.
merchantOrderInfo
(
action_body
);
break
;
case
"saasOrderPage"
:
// 订单信息
opResult
=
await
this
.
saasorderSve
.
pageByCondition
(
action_body
);
break
;
case
"saasOrderAudit"
:
// 订单信息
opResult
=
await
this
.
saasorderSve
.
audit
(
action_body
);
break
;
case
"saasOrderDeliver"
:
// 订单信息
opResult
=
await
this
.
saasorderSve
.
deliver
(
action_body
);
break
;
case
"saasOrderBulkOfflinePay"
:
// 订单信息
opResult
=
await
this
.
saasorderSve
.
bulkOfflinePay
(
action_body
);
break
;
//******************************************************************** */
// // 订单
...
...
xggsve-order/app/base/db/impl/saas/saasorderDao.js
View file @
3a298af7
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
class
SaasOrderDao
extends
Dao
{
constructor
()
{
super
(
Dao
.
getModelName
(
SaasOrderDao
));
...
...
@@ -63,10 +64,14 @@ class SaasOrderDao extends Dao {
sql
.
push
(
"AND t1.audit_status = :audit_status"
);
}
if
(
params
.
handle_status
)
{
sql
.
push
(
"AND t1.handle_status = :handle_status"
);
}
if
(
params
.
saas_merchant_id
)
{
sql
.
push
(
"AND t1.merchant_id = :saas_merchant_id"
);
}
if
(
params
.
createBegin
)
{
sql
.
push
(
"AND t1.created_at >= :createBegin"
);
}
...
...
@@ -79,14 +84,14 @@ class SaasOrderDao extends Dao {
sql
.
push
(
"AND t2.legal_idno = :legal_idno"
);
}
if
(
params
.
merchant_app_user_id
)
{
if
(
params
.
merchant_app_user_id
)
{
sql
.
push
(
"AND t2.merchant_app_user_id = :merchant_app_user_id"
);
}
}
async
mapByIds
(
ids
,
attrs
)
{
let
result
=
{};
if
(
!
ids
||
ids
.
length
==
0
)
{
return
result
;
}
...
...
@@ -108,6 +113,7 @@ class SaasOrderDao extends Dao {
}
return
result
;
}
}
module
.
exports
=
SaasOrderDao
;
\ No newline at end of file
xggsve-order/app/base/db/impl/saas/saasorderdeliverinfoDao.js
0 → 100644
View file @
3a298af7
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
class
SaasOrderDeliverInfoDao
extends
Dao
{
constructor
()
{
super
(
Dao
.
getModelName
(
SaasOrderDeliverInfoDao
));
}
async
mapByIds
(
ids
,
attrs
)
{
let
result
=
{};
if
(
!
ids
||
ids
.
length
==
0
)
{
return
result
;
}
let
sql
=
[];
sql
.
push
(
"SELECT"
);
sql
.
push
(
attrs
||
"*"
);
sql
.
push
(
"FROM"
);
sql
.
push
(
this
.
model
.
tableName
);
sql
.
push
(
"WHERE id IN (:ids)"
);
var
list
=
await
this
.
customQuery
(
sql
.
join
(
" "
),
{
ids
:
ids
});
if
(
!
list
||
list
.
length
==
0
)
{
return
result
;
}
for
(
var
item
of
list
)
{
result
[
item
.
id
]
=
item
;
}
return
result
;
}
}
module
.
exports
=
SaasOrderDeliverInfoDao
;
\ No newline at end of file
xggsve-order/app/base/db/impl/saas/saasorderpayDao.js
0 → 100644
View file @
3a298af7
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
class
SaasOrderPayDao
extends
Dao
{
constructor
()
{
super
(
Dao
.
getModelName
(
SaasOrderPayDao
));
}
async
findByOrderId
(
order_id
)
{
let
sql
=
`SELECT * FROM
${
this
.
model
.
tableName
}
WHERE order_id = :order_id `
;
return
await
this
.
customQuery
(
sql
,
{
order_id
:
order_id
});
}
async
mapByIds
(
ids
,
attrs
)
{
let
result
=
{};
if
(
!
ids
||
ids
.
length
==
0
)
{
return
result
;
}
let
sql
=
[];
sql
.
push
(
"SELECT"
);
sql
.
push
(
attrs
||
"*"
);
sql
.
push
(
"FROM"
);
sql
.
push
(
this
.
model
.
tableName
);
sql
.
push
(
"WHERE id IN (:ids)"
);
var
list
=
await
this
.
customQuery
(
sql
.
join
(
" "
),
{
ids
:
ids
});
if
(
!
list
||
list
.
length
==
0
)
{
return
result
;
}
for
(
var
item
of
list
)
{
result
[
item
.
id
]
=
item
;
}
return
result
;
}
}
module
.
exports
=
SaasOrderPayDao
;
\ No newline at end of file
xggsve-order/app/base/db/models/saas/saasorder.js
View file @
3a298af7
...
...
@@ -5,19 +5,14 @@ module.exports = (db, DataTypes) => {
return
db
.
define
(
"saasorder"
,
{
saas_id
:
DataTypes
.
STRING
,
merchant_id
:
DataTypes
.
STRING
,
channel_id
:
DataTypes
.
STRING
,
product_id
:
DataTypes
.
STRING
,
deliver_order_id
:
DataTypes
.
STRING
,
merchant_app_user_id
:
DataTypes
.
STRING
,
price
:
DataTypes
.
BIGINT
,
pay_status
:
DataTypes
.
STRING
,
pay_voucher_img
:
DataTypes
.
STRING
,
audit_status
:
DataTypes
.
STRING
,
audit_remark
:
DataTypes
.
STRING
,
handle_status
:
DataTypes
.
STRING
,
deliver_man
:
DataTypes
.
STRING
,
deliver_mobile
:
DataTypes
.
STRING
,
deliver_addr
:
DataTypes
.
STRING
,
},
{
paranoid
:
true
,
//假的删除
underscored
:
true
,
...
...
xggsve-order/app/base/db/models/saas/saasorderdeliverinfo.js
0 → 100644
View file @
3a298af7
const
system
=
require
(
"../../../system"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
uiconfig
=
system
.
getUiConfig2
(
settings
.
appKey
);
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"saasorderdeliverinfo"
,
{
order_id
:
DataTypes
.
STRING
,
pay_type
:
DataTypes
.
INTEGER
,
amount
:
DataTypes
.
BIGINT
,
pay_status
:
DataTypes
.
STRING
,
pay_voucher_img
:
DataTypes
.
STRING
,
trade_no
:
DataTypes
.
STRING
,
deliver_man
:
DataTypes
.
STRING
,
deliver_mobile
:
DataTypes
.
STRING
,
deliver_addr
:
DataTypes
.
STRING
,
deliver_express_no
:
DataTypes
.
STRING
,
deliver_express_img
:
DataTypes
.
STRING
,
merchant_deliver_man
:
DataTypes
.
STRING
,
merchant_deliver_mobile
:
DataTypes
.
STRING
,
merchant_deliver_addr
:
DataTypes
.
STRING
,
sve_deliver_express_no
:
DataTypes
.
STRING
,
sve_deliver_express_img
:
DataTypes
.
STRING
,
},
{
paranoid
:
true
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'saas_order_deliver_info'
,
validate
:
{
},
indexes
:
[
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
\ No newline at end of file
xggsve-order/app/base/db/models/saas/saasorderpay.js
0 → 100644
View file @
3a298af7
const
system
=
require
(
"../../../system"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
uiconfig
=
system
.
getUiConfig2
(
settings
.
appKey
);
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"saasorderpay"
,
{
order_id
:
DataTypes
.
STRING
,
pay_type
:
DataTypes
.
INTEGER
,
amount
:
DataTypes
.
BIGINT
,
pay_status
:
DataTypes
.
STRING
,
pay_voucher_img
:
DataTypes
.
STRING
,
trade_no
:
DataTypes
.
STRING
,
},
{
paranoid
:
true
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'saas_order_pay'
,
validate
:
{
},
indexes
:
[
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
\ No newline at end of file
xggsve-order/app/base/service/impl/saas/saasorderSve.js
View file @
3a298af7
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