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
a01b79ad
Commit
a01b79ad
authored
Jun 01, 2020
by
王勇飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add bizchance dev
parent
89468a85
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
60 additions
and
4 deletions
+60
-4
ic-deliver/app/base/controller/ctl.base.js
+2
-0
ic-deliver/app/base/controller/impl/bizchance/bizoptCtl.js
+36
-2
ic-deliver/app/base/db/impl/bizchance/bizoptDao.js
+16
-0
ic-deliver/app/base/db/models/delivery/business_opportunity.js
+5
-1
ic-deliver/app/base/db/models/delivery/delivery_bill.js
+1
-1
No files found.
ic-deliver/app/base/controller/ctl.base.js
View file @
a01b79ad
...
@@ -50,6 +50,8 @@ class CtlBase {
...
@@ -50,6 +50,8 @@ class CtlBase {
credid
:
req
.
headers
[
"x-credential-identifier"
],
credid
:
req
.
headers
[
"x-credential-identifier"
],
regrole
:
req
.
headers
[
"xregrole"
],
regrole
:
req
.
headers
[
"xregrole"
],
bizpath
:
req
.
headers
[
"xbizpath"
],
bizpath
:
req
.
headers
[
"xbizpath"
],
opath
:
req
.
headers
[
'xopath'
],
ptags
:
req
.
headers
[
'xptags'
],
}
}
if
(
!
req
.
xctx
.
appkey
)
{
if
(
!
req
.
xctx
.
appkey
)
{
return
[
-
200
,
"请求头缺少应用x-app-key"
]
return
[
-
200
,
"请求头缺少应用x-app-key"
]
...
...
ic-deliver/app/base/controller/impl/bizchance/bizoptCtl.js
View file @
a01b79ad
var
system
=
require
(
"../../../system"
)
var
system
=
require
(
"../../../system"
)
;
const
http
=
require
(
"http"
)
const
http
=
require
(
"http"
)
;
const
querystring
=
require
(
'querystring'
);
const
querystring
=
require
(
'querystring'
);
var
settings
=
require
(
"../../../../config/settings"
);
var
settings
=
require
(
"../../../../config/settings"
);
const
CtlBase
=
require
(
"../../ctl.base"
);
const
CtlBase
=
require
(
"../../ctl.base"
);
const
moment
=
require
(
'moment'
);
class
BizOptCtl
extends
CtlBase
{
class
BizOptCtl
extends
CtlBase
{
constructor
()
{
constructor
()
{
super
(
"bizchance"
,
CtlBase
.
getServiceName
(
BizOptCtl
));
super
(
"bizchance"
,
CtlBase
.
getServiceName
(
BizOptCtl
));
}
}
async
findAndCountAll
(
pobj
,
qobj
,
req
)
{
try
{
//TODO 根据业务员id获取该业务员所有列表
//设置查询条件
console
.
log
(
"pobj--"
,
pobj
)
const
rs
=
await
this
.
service
.
findAndCountAll
(
pobj
);
let
rarr
=
[];
let
results
=
rs
.
results
.
rows
;
results
.
forEach
(
element
=>
{
let
robj
=
{};
robj
.
demand_code
=
element
.
demand_code
;
robj
.
source
=
element
.
source
;
robj
.
business_type
=
element
.
business_type
;
robj
.
business_info_person
=
element
.
business_info
.
person
;
robj
.
business_info_phone
=
element
.
business_info
.
phone
;
robj
.
business_status
=
element
.
business_status
;
robj
.
updated_at
=
this
.
timeFormat
(
element
.
updated_at
);
rarr
.
push
(
robj
);
});
rs
.
results
.
rows
=
rarr
;
return
system
.
getResult
(
rs
);
}
catch
(
error
)
{
return
system
.
getResultError
(
error
);
}
}
timeFormat
(
date
)
{
let
localTime
=
moment
.
utc
(
date
).
toDate
();
localTime
=
moment
(
localTime
).
format
(
"YYYY-MM-DD"
);
return
localTime
;
}
}
}
module
.
exports
=
BizOptCtl
;
module
.
exports
=
BizOptCtl
;
ic-deliver/app/base/db/impl/bizchance/bizoptDao.js
0 → 100644
View file @
a01b79ad
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
class
BizoptDao
extends
Dao
{
constructor
()
{
super
(
Dao
.
getModelName
(
BizoptDao
));
}
extraWhere
(
qobj
,
qw
,
qc
)
{
qc
.
raw
=
true
;
qc
.
where
.
business_type
=
qc
.
where
.
business_type
||
{
[
this
.
db
.
Op
.
notIn
]:
[
"ICP"
,
"EDI"
]
}
return
qw
;
}
}
module
.
exports
=
BizoptDao
;
ic-deliver/app/base/db/models/delivery/business_opportunity.js
View file @
a01b79ad
...
@@ -22,7 +22,11 @@ module.exports = (db, DataTypes) => {
...
@@ -22,7 +22,11 @@ module.exports = (db, DataTypes) => {
allowNull
:
false
,
allowNull
:
false
,
type
:
DataTypes
.
JSON
type
:
DataTypes
.
JSON
},
},
sourse_number
:
{
// 来源单号 (下单时产生的编号)
source_number
:
{
// 来源单号 (下单时产生的编号)
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
source
:
{
//渠道来源
allowNull
:
true
,
allowNull
:
true
,
type
:
DataTypes
.
STRING
type
:
DataTypes
.
STRING
},
},
...
...
ic-deliver/app/base/db/models/delivery/delivery_bill.js
View file @
a01b79ad
...
@@ -10,7 +10,7 @@ module.exports = (db, DataTypes) => {
...
@@ -10,7 +10,7 @@ module.exports = (db, DataTypes) => {
allowNull
:
false
,
allowNull
:
false
,
type
:
DataTypes
.
STRING
type
:
DataTypes
.
STRING
},
},
sour
s
e_number
:
{
// 来源单号 (订单编号)
sour
c
e_number
:
{
// 来源单号 (订单编号)
allowNull
:
false
,
allowNull
:
false
,
type
:
DataTypes
.
STRING
type
:
DataTypes
.
STRING
},
},
...
...
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