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
916edf9a
Commit
916edf9a
authored
Aug 11, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
temp
parent
ff72169e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
gsb-marketplat/app/base/controller/impl/templatemag/templateinfoCtl.js
+11
-5
gsb-marketplat/app/base/service/impl/template/templateinfoSve.js
+4
-6
No files found.
gsb-marketplat/app/base/controller/impl/templatemag/templateinfoCtl.js
View file @
916edf9a
...
...
@@ -3,12 +3,18 @@ var settings = require("../../../../config/settings");
const
CtlBase
=
require
(
"../../ctl.base"
);
var
cacheBaseComp
=
null
;
class
FormI
nfoCtl
extends
CtlBase
{
class
Templatei
nfoCtl
extends
CtlBase
{
constructor
()
{
super
(
"template
infomag"
,
CtlBase
.
getServiceName
(
FormI
nfoCtl
));
super
(
"template
"
,
CtlBase
.
getServiceName
(
Templatei
nfoCtl
));
this
.
templateinfoSve
=
system
.
getObject
(
'service.template.templateinfoSve'
);
}
/**
* 创建模板
* @param {*} pobj
*/
async
createTemplate
(
pobj
){
return
this
.
templateinfoSve
.
createTemplate
(
pobj
);
}
/**
* 重写查询方法
* @param pobj
...
...
@@ -25,9 +31,9 @@ class FormInfoCtl extends CtlBase {
* @returns {Promise<void>}
*/
async
create
(
pobj
){
let
result
=
await
this
.
templateinfoSve
.
createTemplate
(
pobj
);
let
result
=
await
this
.
templateinfoSve
.
editTemplateTdk
(
pobj
);
return
result
;
}
}
module
.
exports
=
FormI
nfoCtl
;
module
.
exports
=
Templatei
nfoCtl
;
gsb-marketplat/app/base/service/impl/template/templateinfoSve.js
View file @
916edf9a
...
...
@@ -19,14 +19,13 @@ class TemplateinfoService extends ServiceBase {
*/
async
createTemplate
(
pobj
){
var
ab
=
{};
var
xctx
=
pobj
.
xctx
;
var
code
=
await
this
.
getBusUid
(
"mt"
);
//自动生成模板编码
var
name
=
"营销模板"
;
//模板名称
ab
.
code
=
code
;
ab
.
name
=
name
;
ab
.
user_id
=
xctx
.
cred
id
;
ab
.
user_name
=
xctx
.
username
;
ab
.
company_id
=
xctx
.
company
id
;
ab
.
user_id
=
pobj
.
user
id
;
ab
.
user_name
=
pobj
.
username
;
ab
.
company_id
=
pobj
.
company_
id
;
ab
.
is_enabled
=
0
;
var
res
=
await
this
.
create
(
ab
);
return
system
.
getResultSuccess
(
res
);
...
...
@@ -112,9 +111,8 @@ class TemplateinfoService extends ServiceBase {
* @param {*} pobj
*/
async
editTemplateTdk
(
pobj
){
var
ab
=
pobj
.
actionBody
;
var
ab
=
pobj
;
var
updateObj
=
{};
var
xctx
=
pobj
.
xctx
;
if
(
!
ab
){
return
system
.
getResultFail
(
-
100
,
"参数错误"
);
}
...
...
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