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
da56d68d
Commit
da56d68d
authored
Jul 06, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
d2192a6a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
esign-sve-order/app/base/db/models/eorder/eorder.js
+2
-2
esign-sve-order/app/base/service/impl/eorder/eorderSve.js
+10
-7
No files found.
esign-sve-order/app/base/db/models/eorder/eorder.js
View file @
da56d68d
...
...
@@ -6,8 +6,8 @@ module.exports = function (db, DataTypes) {
return
db
.
define
(
'eorder'
,
{
merchant_id
:
{
type
:
DataTypes
.
STRING
,
field
:
'merchant_id'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'商户id'
},
merchant_name
:
{
type
:
DataTypes
.
STRING
,
field
:
'merchant_name'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'商户名称'
},
sign_name
:
{
type
:
DataTypes
.
STRING
,
field
:
'sign_name'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'签署名称'
},
sign_id
:
{
type
:
DataTypes
.
STRING
,
field
:
'sign_id'
,
allowNull
:
false
,
defaultValue
:
''
,
comment
:
'签署ID
'
},
contract_id
:
{
type
:
DataTypes
.
STRING
,
field
:
'contract_id'
,
allowNull
:
false
,
defaultValue
:
''
,
comment
:
'合同ID'
},
contract_name
:
{
type
:
DataTypes
.
STRING
,
field
:
'contract_name'
,
allowNull
:
false
,
defaultValue
:
''
,
comment
:
'合同名字
'
},
product_id
:
{
type
:
DataTypes
.
STRING
,
field
:
'product_id'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'产品id'
},
product_type
:
{
type
:
DataTypes
.
STRING
,
field
:
'product_type'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'产品类型'
},
product_unit_price
:{
type
:
DataTypes
.
STRING
,
field
:
'product_unit_price'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'产品单价'
},
...
...
esign-sve-order/app/base/service/impl/eorder/eorderSve.js
View file @
da56d68d
...
...
@@ -7,6 +7,7 @@ class EorderService extends ServiceBase {
this
.
eorderproductDao
=
system
.
getObject
(
"db.eorder.eorderproductDao"
);
this
.
eordersignlogDao
=
system
.
getObject
(
"db.eorder.eordersignlogDao"
);
this
.
eorderauthlogDao
=
system
.
getObject
(
"db.eorder.eorderauthlogDao"
);
this
.
redisClient
=
system
.
getObject
(
"util.redisClient"
);
this
.
GROUP_PRODUCT_TYPE
=
"2"
;
this
.
SIGNLE_PRODUCT_TYPE
=
"1"
;
this
.
AUDIT_STATUS
=
[
'10'
,
'20'
,
'30'
];
...
...
@@ -54,11 +55,7 @@ class EorderService extends ServiceBase {
if
(
!
params
.
live_end
){
return
system
.
getResult
(
null
,
`参数错误 结束时间不能为空`
);
}
params
.
product_specifications
=
Number
(
params
.
product_specifications
||
0
);
params
.
audit_status
=
"10"
;
params
.
live_status
=
"10"
;
params
.
pay_status
=
"20"
;
params
.
pay_date
=
new
Date
();
console
.
log
(
`eorderSve->saveEorder->params`
+
JSON
.
stringify
(
params
));
try
{
if
(
params
.
id
){
//更新新操作
...
...
@@ -76,8 +73,8 @@ class EorderService extends ServiceBase {
let
_orderBeanProperties
=
{
id
:
_orderBean
.
id
};
_orderBeanProperties
.
merchant_id
=
params
.
merchant_id
?
params
.
merchant_id
:
_orderBean
.
merchant_id
;
_orderBeanProperties
.
merchant_name
=
params
.
merchant_name
?
params
.
merchant_name
:
_orderBean
.
merchant_name
;
_orderBeanProperties
.
sign_id
=
params
.
sign_id
?
params
.
sign_id
:
_orderBean
.
sign
_id
;
_orderBeanProperties
.
sign_name
=
params
.
sign_name
?
params
.
sign_name
:
_orderBean
.
sign
_name
;
_orderBeanProperties
.
contract_id
=
params
.
contract_id
?
params
.
contract_id
:
_orderBean
.
contract
_id
;
_orderBeanProperties
.
contract_name
=
params
.
contract_name
?
params
.
contract_name
:
_orderBean
.
contract
_name
;
_orderBeanProperties
.
product_id
=
params
.
product_id
?
params
.
product_id
:
_orderBean
.
product_id
;
_orderBeanProperties
.
product_type
=
params
.
product_type
?
params
.
product_type
:
_orderBean
.
product_type
;
_orderBeanProperties
.
product_unit_price
=
params
.
product_unit_price
?
params
.
product_unit_price
:
_orderBean
.
product_unit_price
;
...
...
@@ -136,6 +133,12 @@ class EorderService extends ServiceBase {
return
system
.
getResult
(
_orderBeanProperties
);
}
else
{
//新增操作
let
orderBean
=
null
;
params
.
product_specifications
=
Number
(
params
.
product_specifications
||
0
);
params
.
audit_status
=
"10"
;
params
.
live_status
=
"10"
;
params
.
pay_status
=
"20"
;
params
.
contract_id
=
await
this
.
redisClient
.
genrateId
(
`esign_sve_order_contract_id`
);
;
params
.
contract_name
=
this
.
trim
(
params
.
contract_name
)
||
""
;
await
this
.
db
.
transaction
(
async
t
=>
{
orderBean
=
await
this
.
dao
.
create
(
params
,
t
);
if
(
params
.
product_arr
&&
params
.
product_arr
.
length
>
0
){
...
...
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