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
40334627
Commit
40334627
authored
Mar 18, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
3e6a7ceb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
xggsve-order/app/base/db/models/order/oorder.js
+1
-0
xggsve-order/app/base/service/impl/order/oorderSve.js
+6
-0
No files found.
xggsve-order/app/base/db/models/order/oorder.js
View file @
40334627
...
...
@@ -22,6 +22,7 @@ module.exports = function (db, DataTypes) {
source_id
:
{
type
:
DataTypes
.
BIGINT
,
field
:
'source_id'
,
allowNull
:
true
,
defaultValue
:
0
,
comment
:
'来源id'
},
source_no
:
{
type
:
DataTypes
.
STRING
,
field
:
'source_no'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'来源订单号'
},
contact_mobile
:
{
type
:
DataTypes
.
STRING
,
field
:
'contact_mobile'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'联系电话'
},
customer_name
:
{
type
:
DataTypes
.
STRING
,
field
:
'customer_name'
,
allowNull
:
true
,
defaultValue
:
''
,
comment
:
'客户名称'
},
created_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'created_at'
,
allowNull
:
false
,
defaultValue
:
DataTypes
.
NOW
},
updated_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'updated_at'
,
allowNull
:
false
,
defaultValue
:
DataTypes
.
NOW
},
deleted_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'deleted_at'
,
allowNull
:
true
}
...
...
xggsve-order/app/base/service/impl/order/oorderSve.js
View file @
40334627
...
...
@@ -24,6 +24,11 @@ class OorderService extends ServiceBase {
/**
* 新增渠道订单
* @returns {Promise<void>}
* @params product_id 产品ID
* @params source_id 来源ID
* @params source_no 来源订单号
* @params desc 订单信息
* @params contact_mobile 联系电话
*/
async
addSourceOrder
(
params
)
{
// 整理参数
...
...
@@ -39,6 +44,7 @@ class OorderService extends ServiceBase {
order
.
source_no
=
this
.
trim
(
params
.
source_no
);
order
.
desc
=
this
.
trim
(
params
.
notes
);
order
.
contact_mobile
=
this
.
trim
(
params
.
contact_mobile
);
order
.
customer_name
=
this
.
trim
(
params
.
customer_name
);
// 验证订单是否存在
let
exists
=
await
this
.
dao
.
findOne
({
source_id
:
order
.
source_id
,
source_no
:
order
.
source_no
});
...
...
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