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
ec8b67df
Commit
ec8b67df
authored
Aug 08, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
校验封装参数
parent
286c267a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
2 deletions
+25
-2
gsb-marketplat/app/base/service/impl/template/templatelinkSve.js
+25
-2
No files found.
gsb-marketplat/app/base/service/impl/template/templatelinkSve.js
View file @
ec8b67df
...
@@ -59,6 +59,17 @@ class TemplatelinkService extends ServiceBase {
...
@@ -59,6 +59,17 @@ class TemplatelinkService extends ServiceBase {
ab
.
user_name
=
xctx
.
username
;
ab
.
user_name
=
xctx
.
username
;
ab
.
company_id
=
xctx
.
companyid
;
ab
.
company_id
=
xctx
.
companyid
;
ab
.
is_enabled
=
0
;
ab
.
is_enabled
=
0
;
//查重
var
distinctObj
=
{
template_id
:
ab
.
template_id
,
channel_code
:
ab
.
channel_code
,
else_channel_param
:
else_channel_param
,
business_type_code
:
business_type_code
,
lauch_type_code
:
lauch_type_code
,
marketing_subject_code
:
marketing_subject_code
};
var
distinctres
=
await
this
.
dao
.
model
.
findOne
({
where
:
distinctObj
,
raw
:
true
});
if
(
distinctres
&&
distinctres
.
id
){
return
system
.
getResultFail
(
-
113
,
"操作失败,存在重复的链接"
);
}
}
else
{
//修改
}
else
{
//修改
var
linkinfo
=
await
this
.
dao
.
model
.
findOne
({
var
linkinfo
=
await
this
.
dao
.
model
.
findOne
({
where
:{
code
:
ab
.
code
},
raw
:
true
where
:{
code
:
ab
.
code
},
raw
:
true
...
@@ -70,11 +81,23 @@ class TemplatelinkService extends ServiceBase {
...
@@ -70,11 +81,23 @@ class TemplatelinkService extends ServiceBase {
return
system
.
getResultFail
(
-
301
,
"该链接正在投放中,不能执行此操作"
);
return
system
.
getResultFail
(
-
301
,
"该链接正在投放中,不能执行此操作"
);
}
}
ab
.
id
=
linkinfo
.
id
;
ab
.
id
=
linkinfo
.
id
;
//查重
var
distinctObj
=
{
template_id
:
ab
.
template_id
,
channel_code
:
ab
.
channel_code
,
else_channel_param
:
else_channel_param
,
business_type_code
:
business_type_code
,
lauch_type_code
:
lauch_type_code
,
marketing_subject_code
:
marketing_subject_code
,
id
:{[
this
.
db
.
Op
.
ne
]:
linkinfo
.
id
}
};
var
distinctres
=
await
this
.
dao
.
model
.
findOne
({
where
:
distinctObj
,
raw
:
true
});
if
(
distinctres
&&
distinctres
.
id
){
return
system
.
getResultFail
(
-
113
,
"操作失败,存在重复的链接"
);
}
}
}
ab
.
link_url_pc
=
this
.
templateLinkUrl
+
"?id="
+
ab
.
template_id
+
"&source="
+
ab
.
channel_code
+
"&device=pc&event="
+
ab
.
else_channel_param
+
ab
.
link_url_pc
=
this
.
templateLinkUrl
+
"?id="
+
ab
.
template_id
+
"&source="
+
ab
.
channel_code
+
"&device=pc&event="
+
ab
.
else_channel_param
+
"&business="
+
ab
.
business_type_code
+
"&type="
+
ab
.
lauch_type_
nam
e
+
"for="
+
ab
.
marketing_subject_code
;
"&business="
+
ab
.
business_type_code
+
"&type="
+
ab
.
lauch_type_
cod
e
+
"for="
+
ab
.
marketing_subject_code
;
ab
.
link_url_mobile
=
this
.
templateLinkUrl
+
"?id="
+
ab
.
template_id
+
"&source="
+
ab
.
channel_code
+
"&device=mobile&event="
+
ab
.
else_channel_param
+
ab
.
link_url_mobile
=
this
.
templateLinkUrl
+
"?id="
+
ab
.
template_id
+
"&source="
+
ab
.
channel_code
+
"&device=mobile&event="
+
ab
.
else_channel_param
+
"&business="
+
ab
.
business_type_code
+
"&type="
+
ab
.
lauch_type_
nam
e
+
"for="
+
ab
.
marketing_subject_code
;
"&business="
+
ab
.
business_type_code
+
"&type="
+
ab
.
lauch_type_
cod
e
+
"for="
+
ab
.
marketing_subject_code
;
return
ab
;
return
ab
;
}
}
...
...
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