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
e7b645de
Commit
e7b645de
authored
Aug 17, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aaa
parent
86abab38
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
2 deletions
+68
-2
gsb-marketplat/app/base/controller/impl/configmag/businesstypeCtl.js
+26
-0
gsb-marketplat/app/base/controller/impl/template/templatelinkCtl.js
+0
-1
gsb-marketplat/app/base/db/impl/configmag/businesstypeDao.js
+28
-0
gsb-marketplat/app/base/db/models/configmag/businesstype.js
+2
-1
gsb-marketplat/app/base/service/impl/configmag/businesstypeSve.js
+12
-0
No files found.
gsb-marketplat/app/base/controller/impl/configmag/businesstypeCtl.js
0 → 100644
View file @
e7b645de
var
system
=
require
(
"../../../system"
)
var
settings
=
require
(
"../../../../config/settings"
);
const
CtlBase
=
require
(
"../../ctl.base"
);
var
cacheBaseComp
=
null
;
class
BusinesstypeCtl
extends
CtlBase
{
constructor
()
{
super
(
"configmag"
,
CtlBase
.
getServiceName
(
BusinesstypeCtl
));
}
async
refQuery
(
pobj
,
qobj
,
req
)
{
pobj
.
refwhere
.
company_id
=
pobj
.
company_id
;
let
rtn
=
await
this
.
service
.
refQuery
(
pobj
);
return
rtn
}
async
create
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
.
p_id
||
pobj
.
p_id
.
length
<
1
){
pobj
[
"p_id"
]
=
0
;
}
const
up
=
await
this
.
service
.
create
(
pobj
);
return
system
.
getResult
(
up
);
}
}
module
.
exports
=
BusinesstypeCtl
;
gsb-marketplat/app/base/controller/impl/template/templatelinkCtl.js
View file @
e7b645de
...
...
@@ -24,7 +24,6 @@ class TemplatelinkCtl extends CtlBase {
* @param {*} pobj
*/
async
updateLaunchStatus
(
pobj
){
var
a
=
9
;
var
result
=
await
this
.
service
.
updateLaunchStatus
(
pobj
);
return
result
;
}
...
...
gsb-marketplat/app/base/db/impl/configmag/businesstypeDao.js
0 → 100644
View file @
e7b645de
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
class
BusinesstypeDao
extends
Dao
{
constructor
(){
super
(
Dao
.
getModelName
(
BusinesstypeDao
));
}
async
refQuery
(
qobj
)
{
var
w
=
qobj
.
refwhere
?
qobj
.
refwhere
:
{};
w
[
"p_id"
]
=
0
;
if
(
qobj
.
levelinfo
)
{
w
[
qobj
.
levelinfo
.
levelfield
]
=
qobj
.
levelinfo
.
level
;
}
if
(
qobj
.
parentinfo
)
{
w
[
qobj
.
parentinfo
.
parentfield
]
=
qobj
.
parentinfo
.
parentcode
;
}
//如果需要控制数据权限
if
(
qobj
.
datapriv
)
{
w
[
"id"
]
=
{
[
this
.
db
.
Op
.
in
]:
qobj
.
datapriv
};
}
if
(
qobj
.
likestr
)
{
w
[
qobj
.
fields
[
0
]]
=
{
[
this
.
db
.
Op
.
like
]:
"%"
+
qobj
.
likestr
+
"%"
};
return
this
.
model
.
findAll
({
where
:
w
,
attributes
:
qobj
.
fields
});
}
else
{
return
this
.
model
.
findAll
({
where
:
w
,
attributes
:
qobj
.
fields
});
}
}
}
module
.
exports
=
BusinesstypeDao
;
gsb-marketplat/app/base/db/models/configmag/businesstype.js
View file @
e7b645de
...
...
@@ -7,6 +7,7 @@
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"businesstype"
,
{
p_id
:
DataTypes
.
INTEGER
(
11
),
//产品一类id
p_name
:
DataTypes
.
STRING
,
//产品一类id
code
:
DataTypes
.
STRING
(
100
),
//渠道编码
name
:
DataTypes
.
STRING
(
100
),
//渠道名称
notes
:
DataTypes
.
STRING
(
255
),
//备注
...
...
@@ -20,7 +21,7 @@ module.exports = (db, DataTypes) => {
freezeTableName
:
true
,
timestamps
:
true
,
updated_at
:
true
,
tableName
:
'c_
launch_channel
'
,
tableName
:
'c_
business_type
'
,
validate
:
{},
indexes
:
[]
});
...
...
gsb-marketplat/app/base/service/impl/configmag/businesstypeSve.js
0 → 100644
View file @
e7b645de
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../sve.base"
);
const
settings
=
require
(
"../../../../config/settings"
);
class
BusinesstypeService
extends
ServiceBase
{
constructor
()
{
super
(
"configmag"
,
ServiceBase
.
getDaoName
(
BusinesstypeService
));
}
}
module
.
exports
=
BusinesstypeService
;
\ No newline at end of file
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