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
553b4db1
Commit
553b4db1
authored
Jul 07, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
ee8a9911
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
esign-sve-order/app/base/db/models/eorder/eorder.js
+1
-1
esign-sve-order/app/base/service/impl/eorder/eorderSve.js
+8
-5
No files found.
esign-sve-order/app/base/db/models/eorder/eorder.js
View file @
553b4db1
...
@@ -18,7 +18,7 @@ module.exports = function (db, DataTypes) {
...
@@ -18,7 +18,7 @@ module.exports = function (db, DataTypes) {
live_start
:
{
type
:
DataTypes
.
DATE
,
field
:
'live_start'
,
allowNull
:
true
,
defaultValue
:
null
,
comment
:
'生效时间'
},
live_start
:
{
type
:
DataTypes
.
DATE
,
field
:
'live_start'
,
allowNull
:
true
,
defaultValue
:
null
,
comment
:
'生效时间'
},
live_end
:
{
type
:
DataTypes
.
DATE
,
field
:
'live_end'
,
allowNull
:
true
,
defaultValue
:
null
,
comment
:
'结束时间'
},
live_end
:
{
type
:
DataTypes
.
DATE
,
field
:
'live_end'
,
allowNull
:
true
,
defaultValue
:
null
,
comment
:
'结束时间'
},
audit_status
:
{
type
:
DataTypes
.
STRING
,
field
:
'audit_status'
,
allowNull
:
true
,
defaultValue
:
'10'
,
comment
:
'审核状态10 待审核 20 审核成功 30 审核失败'
},
audit_status
:
{
type
:
DataTypes
.
STRING
,
field
:
'audit_status'
,
allowNull
:
true
,
defaultValue
:
'10'
,
comment
:
'审核状态10 待审核 20 审核成功 30 审核失败'
},
audit_date
:
{
type
:
DataTypes
.
STRING
,
field
:
'audit_date'
,
allowNull
:
true
,
defaultValue
:
null
,
comment
:
'审核时间'
},
audit_date
:
{
type
:
DataTypes
.
DATE
,
field
:
'audit_date'
,
allowNull
:
true
,
defaultValue
:
null
,
comment
:
'审核时间'
},
audit_remark
:
{
type
:
DataTypes
.
STRING
,
field
:
'audit_remark'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'审核备注'
},
audit_remark
:
{
type
:
DataTypes
.
STRING
,
field
:
'audit_remark'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'审核备注'
},
audit_user_id
:
{
type
:
DataTypes
.
STRING
,
field
:
'audit_user_id'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'审核人'
},
audit_user_id
:
{
type
:
DataTypes
.
STRING
,
field
:
'audit_user_id'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'审核人'
},
live_status
:
{
type
:
DataTypes
.
STRING
,
field
:
'live_status'
,
allowNull
:
true
,
defaultValue
:
'10'
,
comment
:
'生效状态10 待生效 20 已生效 30 已终止'
},
live_status
:
{
type
:
DataTypes
.
STRING
,
field
:
'live_status'
,
allowNull
:
true
,
defaultValue
:
'10'
,
comment
:
'生效状态10 待生效 20 已生效 30 已终止'
},
...
...
esign-sve-order/app/base/service/impl/eorder/eorderSve.js
View file @
553b4db1
...
@@ -127,7 +127,8 @@ class EorderService extends ServiceBase {
...
@@ -127,7 +127,8 @@ class EorderService extends ServiceBase {
_orderBeanProperties
.
eorderProducts
=
eorderProductProperties
;
_orderBeanProperties
.
eorderProducts
=
eorderProductProperties
;
await
this
.
eorderproductDao
.
bulkCreate
(
eorderProductProperties
,
t
);
await
this
.
eorderproductDao
.
bulkCreate
(
eorderProductProperties
,
t
);
}
else
{
}
else
{
await
this
.
eorderproductDao
.
create
({
order_id
:
_orderBean
.
id
,
product_id
:
this
.
trim
(
params
.
product_id
),
price
:
this
.
trim
(
params
.
product_unit_price
)},
t
);
await
this
.
eorderproductDao
.
create
({
order_id
:
_orderBean
.
id
,
product_id
:
this
.
trim
(
params
.
product_id
),
price
:
this
.
trim
(
params
.
product_unit_price
),
product_property
:
this
.
trim
(
params
.
product_property
),
product_name
:
this
.
trim
(
params
.
product_name
)},
t
);
}
}
});
});
return
system
.
getResult
(
_orderBeanProperties
);
return
system
.
getResult
(
_orderBeanProperties
);
...
@@ -137,7 +138,7 @@ class EorderService extends ServiceBase {
...
@@ -137,7 +138,7 @@ class EorderService extends ServiceBase {
params
.
audit_status
=
"10"
;
params
.
audit_status
=
"10"
;
params
.
live_status
=
"10"
;
params
.
live_status
=
"10"
;
params
.
pay_status
=
"20"
;
params
.
pay_status
=
"20"
;
params
.
contract_id
=
await
this
.
redisClient
.
genrateId
(
`esign_sve_order_contract_id`
);
;
params
.
contract_id
=
await
this
.
redisClient
.
genrateId
(
`esign_sve_order_contract_id`
);
params
.
contract_name
=
this
.
trim
(
params
.
contract_name
)
||
""
;
params
.
contract_name
=
this
.
trim
(
params
.
contract_name
)
||
""
;
await
this
.
db
.
transaction
(
async
t
=>
{
await
this
.
db
.
transaction
(
async
t
=>
{
orderBean
=
await
this
.
dao
.
create
(
params
,
t
);
orderBean
=
await
this
.
dao
.
create
(
params
,
t
);
...
@@ -160,7 +161,8 @@ class EorderService extends ServiceBase {
...
@@ -160,7 +161,8 @@ class EorderService extends ServiceBase {
}
}
await
this
.
eorderproductDao
.
bulkCreate
(
eorderProductProperties
,
t
);
await
this
.
eorderproductDao
.
bulkCreate
(
eorderProductProperties
,
t
);
}
else
{
}
else
{
await
this
.
eorderproductDao
.
create
({
order_id
:
orderBean
.
id
,
product_id
:
this
.
trim
(
params
.
product_id
),
price
:
this
.
trim
(
params
.
product_unit_price
)},
t
);
await
this
.
eorderproductDao
.
create
({
order_id
:
orderBean
.
id
,
product_id
:
this
.
trim
(
params
.
product_id
),
price
:
this
.
trim
(
params
.
product_unit_price
),
product_property
:
this
.
trim
(
params
.
product_property
),
product_name
:
this
.
trim
(
params
.
product_name
)},
t
);
}
}
});
});
this
.
handleDate
(
orderBean
.
dataValues
,
[
'live_start'
,
'live_end'
,
'created_at'
],
null
,
null
);
this
.
handleDate
(
orderBean
.
dataValues
,
[
'live_start'
,
'live_end'
,
'created_at'
],
null
,
null
);
...
@@ -199,7 +201,8 @@ class EorderService extends ServiceBase {
...
@@ -199,7 +201,8 @@ class EorderService extends ServiceBase {
}
}
try
{
try
{
let
orderProperties
=
{
id
:
orderBean
.
id
,
audit_status
:
this
.
trim
(
params
.
audit_status
),
audit_remark
:
this
.
trim
(
params
.
audit_remark
)
||
""
};
let
orderProperties
=
{
id
:
orderBean
.
id
,
audit_status
:
this
.
trim
(
params
.
audit_status
),
audit_remark
:
this
.
trim
(
params
.
audit_remark
)
||
""
,
audit_user_id
:
params
.
audit_user_id
,
audit_date
:
new
Date
()};
orderProperties
.
live_status
=
params
.
audit_status
==
'20'
?
params
.
audit_status
:
'30'
;
orderProperties
.
live_status
=
params
.
audit_status
==
'20'
?
params
.
audit_status
:
'30'
;
await
this
.
dao
.
update
(
orderProperties
);
await
this
.
dao
.
update
(
orderProperties
);
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
...
@@ -273,7 +276,7 @@ class EorderService extends ServiceBase {
...
@@ -273,7 +276,7 @@ class EorderService extends ServiceBase {
where
:{
where
:{
order_id
:
orderBean
.
id
order_id
:
orderBean
.
id
},
},
attributes
:[
'product_id'
,
'product_name'
,
'price'
,
'order_id'
]
attributes
:[
'product_id'
,
'product_name'
,
'price'
,
'order_id'
,
'product_property'
]
});
});
orderBean
.
product_arr
=
productChildren
;
orderBean
.
product_arr
=
productChildren
;
...
...
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