Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
adc9d3f4
Commit
adc9d3f4
authored
Sep 09, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-hf' into base-modify
parents
deb643f4
e81206b3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
SEOBiz.java
...rver/src/main/java/com/xxfc/platform/uccn/biz/SEOBiz.java
+14
-3
SEOMapper.xml
...cn/xx-uccn-server/src/main/resources/mapper/SEOMapper.xml
+1
-0
No files found.
xx-uccn/xx-uccn-server/src/main/java/com/xxfc/platform/uccn/biz/SEOBiz.java
View file @
adc9d3f4
...
...
@@ -8,10 +8,13 @@ import com.xxfc.platform.uccn.entity.SEO;
import
com.xxfc.platform.uccn.mapper.SEOMapper
;
import
com.xxfc.platform.uccn.vo.SEOQuery
;
import
com.xxfc.platform.uccn.vo.SEOVo
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.beanutils.BeanUtilsBean
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
tk.mybatis.mapper.entity.Example
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -20,7 +23,9 @@ import java.util.List;
* @author Administrator
*/
@Service
@Slf4j
public
class
SEOBiz
extends
BaseBiz
<
SEOMapper
,
SEO
>
{
public
PageInfo
<
SeoDTO
>
getList
(
SEOQuery
query
)
{
PageHelper
.
startPage
(
query
.
getPage
(),
query
.
getLimit
());
List
<
SeoDTO
>
seodtoList
=
mapper
.
getSEODTOList
();
...
...
@@ -33,18 +38,24 @@ public class SEOBiz extends BaseBiz<SEOMapper, SEO> {
try
{
if
(
seoVo
==
null
)
{
return
false
;
}
SEO
seo
=
new
SEO
();
BeanUtilsBean
.
getInstance
().
copyProperties
(
seo
,
seoVo
);
if
(
seo
.
getId
()==
null
)
{
Example
example
=
new
Example
(
SEO
.
class
);
example
.
createCriteria
().
andEqualTo
(
"modelId"
,
seo
.
getModelId
());
List
<
SEO
>
list
=
mapper
.
selectByExample
(
example
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
seo
.
setCreTime
(
new
Date
());
mapper
.
insertSelective
(
seo
);
}
else
{
}
else
if
(
list
.
size
()==
1
)
{
seo
.
setUpdTime
(
new
Date
());
mapper
.
updateByPrimaryKeySelective
(
seo
);
}
else
{
log
.
error
(
"错误!该模块保存有多个seo"
);
return
false
;
}
return
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
xx-uccn/xx-uccn-server/src/main/resources/mapper/SEOMapper.xml
View file @
adc9d3f4
...
...
@@ -7,6 +7,7 @@
select
m.name as modelName ,
m.id as model_id,
s.id,
s.title as title,
s.keywords as keywords,
s.description as description,
...
...
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