Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
store-system
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
luoyangfei
store-system
Commits
0a3f566f
Commit
0a3f566f
authored
Nov 26, 2018
by
wangyihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加 跳链接
parent
5cd3b049
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
28 deletions
+7
-28
IndexController.java
...main/java/cn/com/fqy/controller/mapi/IndexController.java
+1
-0
AdvertController.java
...main/java/cn/com/fqy/controller/mgt/AdvertController.java
+4
-26
AdvertMapper.xml
...system/src/main/resources/mybatis/mapper/AdvertMapper.xml
+2
-2
No files found.
2code/server/store-system/src/main/java/cn/com/fqy/controller/mapi/IndexController.java
View file @
0a3f566f
...
@@ -58,6 +58,7 @@ public class IndexController {
...
@@ -58,6 +58,7 @@ public class IndexController {
map
.
put
(
"advertPicUrl"
,
list
.
getAdvertPicUrl
());
map
.
put
(
"advertPicUrl"
,
list
.
getAdvertPicUrl
());
map
.
put
(
"advertContent"
,
list
.
getAdvertContent
());
map
.
put
(
"advertContent"
,
list
.
getAdvertContent
());
map
.
put
(
"advertTitle"
,
list
.
getAdvertTitle
());
map
.
put
(
"advertTitle"
,
list
.
getAdvertTitle
());
map
.
put
(
"linkUrl"
,
list
.
getLinkUrl
());
listQuery
.
add
(
map
);
listQuery
.
add
(
map
);
}
}
resultInfo
.
setData
(
listQuery
);
resultInfo
.
setData
(
listQuery
);
...
...
2code/server/store-system/src/main/java/cn/com/fqy/controller/mgt/AdvertController.java
View file @
0a3f566f
...
@@ -63,42 +63,20 @@ public class AdvertController extends BaseController{
...
@@ -63,42 +63,20 @@ public class AdvertController extends BaseController{
advert
.
setAdvertContent
(
advertContent
);
advert
.
setAdvertContent
(
advertContent
);
}
}
if
(
advert
!=
null
&&
advert
.
getAdvertId
()!=
null
&&!
""
.
equals
(
advert
.
getAdvertId
()))
{
if
(
advert
!=
null
&&
advert
.
getAdvertId
()!=
null
&&!
""
.
equals
(
advert
.
getAdvertId
()))
{
Advert
advertQuery
=
advertService
.
getAdvertQuery
(
advert
.
getUsageSubclass
());
//判断使用指南子类是否已存在
if
(
advertQuery
!=
null
&&!
advertQuery
.
getAdvertId
().
equals
(
advert
.
getAdvertId
()))
{
result
.
setCode
(
"0"
);
result
.
setMsg
(
"该子类已存在,请重新添加"
);
return
result
;
}
String
html
=
"<!DOCTYPE html><html><head><meta charset=\"UTF-8\"><meta content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0\" name=\"viewport\"><title>"
+
advert
.
getAdvertTitle
()+
"</title></head><body>"
+
advert
.
getAdvertContent
()
+
"</body></html>"
;
String
html
=
"<!DOCTYPE html><html><head><meta charset=\"UTF-8\"><meta content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0\" name=\"viewport\"><title>"
+
advert
.
getAdvertTitle
()+
"</title></head><body>"
+
advert
.
getAdvertContent
()
+
"</body></html>"
;
ECFileUtil
.
uploadFile
(
html
.
getBytes
(
"UTF-8"
),
storeFilePath
,
advert
.
getAdvertId
()+
".html"
);
ECFileUtil
.
uploadFile
(
html
.
getBytes
(
"UTF-8"
),
storeFilePath
,
advert
.
getAdvertId
()+
".html"
);
advert
.
setLinkUrl
(
fileServer
+
advert
.
getAdvertId
()+
".html"
);
//
advert.setLinkUrl(fileServer+advert.getAdvertId()+".html");
result
=
advertService
.
updateAdvert
(
advert
,
getOperator
());
result
=
advertService
.
updateAdvert
(
advert
,
getOperator
());
}
else
{
}
else
{
if
(
advert
.
getAdvertType
()==
4
||
advert
.
getAdvertType
()==
6
)
{
Advert
advertQuery
=
new
Advert
();
advertQuery
.
setAdvertType
(
advert
.
getAdvertType
());
List
<
Advert
>
advertList
=
advertService
.
getAdvertList
(
new
Query
(
advertQuery
));
if
(
advertList
.
size
()>=
1
)
{
result
.
setCode
(
"0"
);
return
result
;
}
}
if
(
advert
.
getUsageSubclass
()
!=
null
&&
!
""
.
equals
(
advert
.
getUsageSubclass
()))
{
Advert
advertQuery
=
advertService
.
getAdvertQuery
(
advert
.
getUsageSubclass
());
//判断使用指南子类是否已存在
if
(
advertQuery
!=
null
)
{
result
.
setCode
(
"0"
);
result
.
setMsg
(
"该子类已存在,请重新添加"
);
return
result
;
}
}
advert
.
setAdvertId
(
advertService
.
generatePK
());
advert
.
setAdvertId
(
advertService
.
generatePK
());
if
(
advert
!=
null
&&
advert
.
getAdvertContent
()!=
null
&&!
""
.
equals
(
advert
.
getAdvertContent
()))
{
if
(
advert
!=
null
&&
advert
.
getAdvertContent
()!=
null
&&!
""
.
equals
(
advert
.
getAdvertContent
()))
{
String
html
=
"<!DOCTYPE html><html><head><meta charset=\"UTF-8\"><meta content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0\" name=\"viewport\"><title>"
+
advert
.
getAdvertTitle
()+
"</title></head><body>"
+
advert
.
getAdvertContent
()
+
"</body></html>"
;
String
html
=
"<!DOCTYPE html><html><head><meta charset=\"UTF-8\"><meta content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0\" name=\"viewport\"><title>"
+
advert
.
getAdvertTitle
()+
"</title></head><body>"
+
advert
.
getAdvertContent
()
+
"</body></html>"
;
ECFileUtil
.
uploadFile
(
html
.
getBytes
(
"UTF-8"
),
storeFilePath
,
advert
.
getAdvertId
()+
".html"
);
ECFileUtil
.
uploadFile
(
html
.
getBytes
(
"UTF-8"
),
storeFilePath
,
advert
.
getAdvertId
()+
".html"
);
}
}
advert
.
setLinkUrl
(
fileServer
+
advert
.
getAdvertId
()+
".html"
);
//
advert.setLinkUrl(fileServer+advert.getAdvertId()+".html");
result
=
advertService
.
addAdvert
(
advert
,
getOperator
());
result
=
advertService
.
addAdvert
(
advert
,
getOperator
());
}
}
return
result
;
return
result
;
...
...
2code/server/store-system/src/main/resources/mybatis/mapper/AdvertMapper.xml
View file @
0a3f566f
...
@@ -80,10 +80,10 @@ ADVERT_PIC_URL,CREATE_TIME,UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,USAGE_SUBCLASS
...
@@ -80,10 +80,10 @@ ADVERT_PIC_URL,CREATE_TIME,UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,USAGE_SUBCLASS
<if
test=
"advertSubTitle!=null and advertSubTitle!=''"
>
<if
test=
"advertSubTitle!=null and advertSubTitle!=''"
>
ADVERT_SUB_TITLE=#{advertSubTitle,jdbcType = VARCHAR},
ADVERT_SUB_TITLE=#{advertSubTitle,jdbcType = VARCHAR},
</if>
</if>
<if
test=
"advertContent!=null
and advertContent!=''
"
>
<if
test=
"advertContent!=null"
>
ADVERT_CONTENT=#{advertContent,jdbcType = VARCHAR},
ADVERT_CONTENT=#{advertContent,jdbcType = VARCHAR},
</if>
</if>
<if
test=
"linkUrl!=null
and linkUrl!=''
"
>
<if
test=
"linkUrl!=null"
>
LINK_URL=#{linkUrl,jdbcType = VARCHAR},
LINK_URL=#{linkUrl,jdbcType = VARCHAR},
</if>
</if>
<if
test=
"isAvailable!=null "
>
<if
test=
"isAvailable!=null "
>
...
...
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