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
fe78564c
Commit
fe78564c
authored
Aug 20, 2020
by
钟占达
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'gsb-marketplat' of gitlab.gongsibao.com:jiangyong/zhichan into gsb-marketplat
parents
31cc04c3
9f00c122
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
gsb-marketplat/app/base/service/impl/template/templatelinkSve.js
+14
-11
No files found.
gsb-marketplat/app/base/service/impl/template/templatelinkSve.js
View file @
fe78564c
...
@@ -308,30 +308,33 @@ class TemplatelinkService extends ServiceBase {
...
@@ -308,30 +308,33 @@ class TemplatelinkService extends ServiceBase {
return
system
.
getResultFail
(
-
112
,
"投放终端参数不能为空"
);
return
system
.
getResultFail
(
-
112
,
"投放终端参数不能为空"
);
}
}
var
linkObj
=
{
var
linkObj
=
{
is_enabled
:
1
,
template_id
:
ab
.
template_id
,
channel_code
:
ab
.
channel_code
,
else_channel_param
:
ab
.
else_channel_param
,
template_id
:
ab
.
template_id
,
channel_code
:
ab
.
channel_code
,
else_channel_param
:
ab
.
else_channel_param
,
business_type_code
:
ab
.
business_type_code
,
lauch_type_code
:
ab
.
lauch_type_code
,
business_type_code
:
ab
.
business_type_code
,
lauch_type_code
:
ab
.
lauch_type_code
,
marketing_subject_code
:
ab
.
marketing_subject_code
marketing_subject_code
:
ab
.
marketing_subject_code
};
};
//获取链接数据
//获取链接数据
var
linkinfo
=
await
this
.
dao
.
model
.
findOne
({
var
linkinfo
=
await
this
.
dao
.
model
.
findOne
({
attributes
:[
"code"
],
where
:
linkObj
,
raw
:
true
where
:
linkObj
,
raw
:
true
});
});
if
(
!
linkinfo
||
!
linkinfo
.
id
){
if
(
!
linkinfo
||
!
linkinfo
.
code
){
return
system
.
getResultFail
(
-
300
,
"未知链接"
);
return
system
.
getResultFail
(
-
300
,
"未知链接
或链接未投放
"
);
}
}
if
(
!
linkinfo
.
is_enabled
||
linkinfo
.
is_enabled
!==
1
){
//
if(!linkinfo.is_enabled || linkinfo.is_enabled!==1){
return
system
.
getResultFail
(
-
301
,
"无效链接,该链接未投放"
);
//
return system.getResultFail(-301,"无效链接,该链接未投放");
}
//
}
var
tempObj
=
{
id
:
ab
.
template_id
};
var
tempObj
=
{
id
:
ab
.
template_id
,
is_enabled
:
1
};
var
templateinfo
=
await
this
.
templateinfoDao
.
model
.
findOne
({
var
templateinfo
=
await
this
.
templateinfoDao
.
model
.
findOne
({
attributes
:[
"title"
,
"keyword"
,
"describe"
,
"pic_url"
,
"template_content"
],
where
:
tempObj
,
raw
:
true
where
:
tempObj
,
raw
:
true
});
});
if
(
!
templateinfo
||
!
templateinfo
.
id
){
if
(
!
templateinfo
){
return
system
.
getResultFail
(
-
400
,
"未知模板"
);
return
system
.
getResultFail
(
-
400
,
"未知模板或模板未启用"
);
}
if
(
!
templateinfo
.
is_enabled
||
templateinfo
.
is_enabled
!==
1
){
return
system
.
getResultFail
(
-
401
,
"无效模板,该模板未启用"
);
}
}
// if(!templateinfo.is_enabled || templateinfo.is_enabled!==1){
// return system.getResultFail(-401,"无效模板,该模板未启用");
// }
var
resultObj
=
{
var
resultObj
=
{
templateinfo
:
templateinfo
,
linkinfo
:
linkinfo
templateinfo
:
templateinfo
,
linkinfo
:
linkinfo
};
};
...
...
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