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
8e4a39ea
Commit
8e4a39ea
authored
Jun 30, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
e52c8cf9
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
30 additions
and
10 deletions
+30
-10
esign-sve-order/app/base/api/impl/op/action.js
+2
-2
esign-sve-order/app/base/db/impl/eorder/eorderauthlogDao.js
+3
-0
esign-sve-order/app/base/db/impl/eorder/eorderproductDao.js
+2
-2
esign-sve-order/app/base/db/models/eorder/eorderauthlog.js
+1
-0
esign-sve-order/app/base/db/models/eorder/eordersignlog.js
+1
-0
esign-sve-order/app/base/service/impl/eorder/eorderSve.js
+11
-1
esign-sve-order/app/base/service/impl/eorder/eorderauthlogSve.js
+5
-0
esign-sve-order/app/base/service/impl/eorder/eorderproductSve.js
+5
-5
No files found.
esign-sve-order/app/base/api/impl/op/action.js
View file @
8e4a39ea
...
...
@@ -59,13 +59,13 @@ class ActionAPI extends APIBase {
case
"saveEorderAuthLog"
:
// 保存身份认证日志
opResult
=
await
this
.
eorderauthlogSve
.
saveEorderAuthLog
(
action_body
);
break
;
case
"pageEorderAuthLog"
:
//
保存身份认证日志
case
"pageEorderAuthLog"
:
//
身份认证日志列表
opResult
=
await
this
.
eorderauthlogSve
.
pageEorderAuthLog
(
action_body
);
break
;
case
"saveEorderSignLog"
:
// 保存签约日志
opResult
=
await
this
.
eordersignlogSve
.
saveEorderSignLog
(
action_body
);
break
;
case
"pageEorderSignLog"
:
//
保存签约日志
case
"pageEorderSignLog"
:
//
签约日志列表
opResult
=
await
this
.
eordersignlogSve
.
pageEorderSignLog
(
action_body
);
break
;
default
:
...
...
esign-sve-order/app/base/db/impl/eorder/eorderauthlogDao.js
View file @
8e4a39ea
...
...
@@ -25,6 +25,9 @@ class EorderauthlogDao extends Dao{
if
(
params
.
id
){
sql
.
push
(
'and id=:id'
);
}
if
(
params
.
merchant_id
){
sql
.
push
(
'and merchant_id=:merchant_id'
);
}
if
(
params
.
order_id
){
sql
.
push
(
'and order_id=:order_id'
);
}
...
...
esign-sve-order/app/base/db/impl/eorder/eorderproductDao.js
View file @
8e4a39ea
...
...
@@ -50,8 +50,8 @@ class EorderproductDao extends Dao{
*/
async
findAllByOrderIdCreatedAsc
(
params
){
let
sql
=
[];
sql
.
push
(
`SELECT t1.order_id FROM e_order_product t1 INNER JOIN e_order t2 ON t1.order_id = t2.id where 1=1 and t2.live_status ='20'`
);
sql
.
push
(
`t1.
id =:
id`
);
sql
.
push
(
`SELECT t1.order_id
,t1.product_id
FROM e_order_product t1 INNER JOIN e_order t2 ON t1.order_id = t2.id where 1=1 and t2.live_status ='20'`
);
sql
.
push
(
`t1.
product_id =:product_
id`
);
sql
.
push
(
`ORDER BY t2.created_at ASC`
);
let
list
=
await
this
.
customQuery
(
sql
.
join
(
" "
),
params
);
return
list
;
...
...
esign-sve-order/app/base/db/models/eorder/eorderauthlog.js
View file @
8e4a39ea
...
...
@@ -5,6 +5,7 @@
module
.
exports
=
function
(
db
,
DataTypes
)
{
return
db
.
define
(
'eorderauthlog'
,
{
order_id
:
{
type
:
DataTypes
.
STRING
,
field
:
'order_id'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'订单号'
},
merchant_id
:
{
type
:
DataTypes
.
STRING
,
field
:
'merchant_id'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'商户id'
},
product_id
:
{
type
:
DataTypes
.
STRING
,
field
:
'product_id'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'产品id'
},
spended_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'spended_at'
,
allowNull
:
true
,
defaultValue
:
null
,
comment
:
'生效时间'
},
platform_id
:
{
type
:
DataTypes
.
STRING
,
field
:
'platform_id'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'平台ID'
},
...
...
esign-sve-order/app/base/db/models/eorder/eordersignlog.js
View file @
8e4a39ea
...
...
@@ -6,6 +6,7 @@ module.exports = function (db, DataTypes) {
return
db
.
define
(
'eordersignlog'
,
{
order_id
:
{
type
:
DataTypes
.
STRING
,
field
:
'order_id'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'订单号'
},
product_id
:
{
type
:
DataTypes
.
STRING
,
field
:
'product_id'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'产品id'
},
merchant_id
:
{
type
:
DataTypes
.
STRING
,
field
:
'merchant_id'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'商户id'
},
spended_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'spended_at'
,
allowNull
:
true
,
defaultValue
:
null
,
comment
:
'生效时间'
},
platform_id
:
{
type
:
DataTypes
.
STRING
,
field
:
'platform_id'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'平台ID'
},
platform_name
:
{
type
:
DataTypes
.
STRING
,
field
:
'platform_name'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'平台名称'
},
...
...
esign-sve-order/app/base/service/impl/eorder/eorderSve.js
View file @
8e4a39ea
...
...
@@ -146,11 +146,14 @@ class EorderSve extends ServiceBase {
if
(
!
params
.
id
){
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
let
orderBean
=
await
this
.
dao
.
getById
(
this
.
trim
(
params
.
id
));
if
(
!
orderBean
){
return
system
.
getResult
(
null
,
`订单【
${
params
.
id
}
】不存在`
);
}
if
(
params
.
merchant_id
&&
this
.
trim
(
params
.
merchant_id
)
!=
orderBean
.
merchant_id
){
return
system
.
getResult
(
null
,
`参数错误 订单【
${
params
.
id
}
】不存在`
);
}
try
{
let
orderProperties
=
{
id
:
orderBean
.
id
,
audit_status
:
this
.
trim
(
params
.
audit_status
),
audit_remark
:
this
.
trim
(
params
.
audit_remark
)
||
""
};
orderProperties
.
live_status
=
params
.
audit_status
==
'20'
?
'20'
:
'30'
;
...
...
@@ -176,6 +179,9 @@ class EorderSve extends ServiceBase {
if
(
!
orderBean
){
return
system
.
getResult
(
null
,
`订单【
${
params
.
id
}
】不存在`
);
}
if
(
params
.
merchant_id
&&
this
.
trim
(
params
.
merchant_id
)
!=
orderBean
.
merchant_id
){
return
system
.
getResult
(
null
,
`参数错误 订单【
${
params
.
id
}
】不存在`
);
}
//如果支付状态
if
(
params
.
pay_status
&&
orderBean
.
pay_status
==
'10'
&&
this
.
PAY_STATUS
.
includes
(
this
.
trim
(
params
.
pay_status
)))
{
orderBean
.
pay_status
=
this
.
trim
(
params
.
pay_status
);
...
...
@@ -215,6 +221,10 @@ class EorderSve extends ServiceBase {
if
(
!
orderBean
){
return
system
.
getResult
(
null
,
`订单不存在`
);
}
if
(
params
.
merchant_id
&&
this
.
trim
(
params
.
merchant_id
)
!=
orderBean
.
merchant_id
){
return
system
.
getResult
(
null
,
`参数错误 订单【
${
params
.
id
}
】不存在`
);
}
let
productIds
=
await
this
.
eorderproductDao
.
model
.
findAll
({
where
:{
order_id
:
orderBean
.
id
...
...
esign-sve-order/app/base/service/impl/eorder/eorderauthlogSve.js
View file @
8e4a39ea
...
...
@@ -25,6 +25,10 @@ class EorderauthlogSve extends ServiceBase {
if
(
!
params
.
actual_spend_name
){
return
system
.
getResult
(
null
,
`参数错误 实际使用方不能为空`
);
}
if
(
!
params
.
platform_name
){
return
system
.
getResult
(
null
,
`参数错误 平台名称不能为空`
);
}
params
.
platform_id
=
params
.
platform_id
?
params
.
platform_id
:
''
;
params
.
spended_num
=
Number
(
params
.
spended_num
||
0
);
params
.
spended_at
=
params
.
spended_at
?
params
.
spended_at
:
new
Date
();
try
{
...
...
@@ -36,6 +40,7 @@ class EorderauthlogSve extends ServiceBase {
if
(
!
orderBean
){
return
system
.
getResult
(
null
,
`订单【
${
params
.
order_id
}
】不存在`
);
}
params
.
merchant_id
=
orderBean
.
merchant_id
;
await
this
.
dao
.
create
(
params
);
}
catch
(
e
)
{
console
.
log
(
e
);
...
...
esign-sve-order/app/base/service/impl/eorder/eorderproductSve.js
View file @
8e4a39ea
...
...
@@ -14,10 +14,10 @@ class EorderproductSve extends ServiceBase {
*/
async
listEorderProduct
(
params
){
try
{
if
(
!
params
.
id
){
if
(
!
params
.
product_
id
){
return
system
.
getResult
(
null
,
`参数错误 产品ID不能为空`
);
}
let
list
=
await
this
.
dao
.
model
.
findAllByOrderIdCreatedAsc
({
id
:
this
.
trim
(
params
.
id
)});
let
list
=
await
this
.
dao
.
model
.
findAllByOrderIdCreatedAsc
({
product_id
:
this
.
trim
(
params
.
product_
id
)});
return
system
.
getResult
(
list
||
[]);
}
catch
(
e
)
{
console
.
log
(
e
);
...
...
@@ -31,9 +31,9 @@ class EorderproductSve extends ServiceBase {
* @returns {Promise<void>}
*/
async
listEorderProductByMerchantId
(
params
){
if
(
!
params
.
merchant_id
){
return
system
.
getResult
(
null
,
`参数错误 商户ID 不能为空`
);
}
//
if(!params.merchant_id){
//
return system.getResult(null, `参数错误 商户ID 不能为空`);
//
}
let
list
=
await
this
.
dao
.
model
.
findAll
({
where
:{
merchant_id
:
this
.
trim
(
params
.
merchant
)
...
...
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