Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1-office-web-sit
Commits
6076b462
Commit
6076b462
authored
Dec 10, 2021
by
ZhangYunfei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
d1ffcdfc
4edf0d90
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
6 deletions
+71
-6
NewsMovieController.java
...office/modules/manage/controller/NewsMovieController.java
+7
-3
NewsMovieDao.java
src/main/java/io/office/modules/manage/dao/NewsMovieDao.java
+7
-1
NewsMovieService.java
...va/io/office/modules/manage/service/NewsMovieService.java
+2
-0
NewsMovieServiceImpl.java
...ice/modules/manage/service/impl/NewsMovieServiceImpl.java
+15
-1
NewsMovieDao.xml
src/main/resources/mapper/manage/NewsMovieDao.xml
+40
-1
No files found.
src/main/java/io/office/modules/manage/controller/NewsMovieController.java
View file @
6076b462
...
@@ -5,12 +5,15 @@ import java.util.Date;
...
@@ -5,12 +5,15 @@ import java.util.Date;
import
java.util.Map
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.common.annotation.SysLog
;
import
io.office.common.annotation.SysLog
;
import
io.office.modules.manage.entity.NewsEntity
;
import
io.office.modules.manage.entity.NewtopicEntity
;
import
io.office.modules.manage.entity.NewtopicEntity
;
import
io.office.modules.manage.vo.request.NewsMovieEntityVo
;
import
io.office.modules.manage.vo.request.NewsMovieEntityVo
;
import
io.office.modules.manage.vo.request.NewtopicEntityVo
;
import
io.office.modules.manage.vo.request.NewtopicEntityVo
;
import
io.office.modules.sys.controller.AbstractController
;
import
io.office.modules.sys.controller.AbstractController
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
io.swagger.models.auth.In
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -47,9 +50,10 @@ public class NewsMovieController extends AbstractController {
...
@@ -47,9 +50,10 @@ public class NewsMovieController extends AbstractController {
@RequestMapping
(
"/list"
)
@RequestMapping
(
"/list"
)
// @RequiresPermissions("manage:newsmovie:list")
// @RequiresPermissions("manage:newsmovie:list")
public
R
list
(
@RequestBody
Map
<
String
,
Object
>
params
){
public
R
list
(
@RequestBody
Map
<
String
,
Object
>
params
){
PageUtils
page
=
newsMovieService
.
queryPage
(
params
);
Page
<
NewsMovieEntity
>
page
=
this
.
newsMovieService
.
selectMoveList
(
params
,
new
Page
(
Integer
.
valueOf
(
params
.
get
(
"page"
).
toString
()),
Integer
.
valueOf
(
params
.
get
(
"limit"
).
toString
())));
return
R
.
ok
().
put
(
"page"
,
page
);
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"page"
,
pageUtils
);
}
}
...
...
src/main/java/io/office/modules/manage/dao/NewsMovieDao.java
View file @
6076b462
package
io
.
office
.
modules
.
manage
.
dao
;
package
io
.
office
.
modules
.
manage
.
dao
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.manage.entity.NewsMovieEntity
;
import
io.office.modules.manage.entity.NewsMovieEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* ${comments}
* ${comments}
...
@@ -13,5 +18,6 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -13,5 +18,6 @@ import org.apache.ibatis.annotations.Mapper;
*/
*/
@Mapper
@Mapper
public
interface
NewsMovieDao
extends
BaseMapper
<
NewsMovieEntity
>
{
public
interface
NewsMovieDao
extends
BaseMapper
<
NewsMovieEntity
>
{
List
<
NewsMovieEntity
>
selectMoveList
(
@Param
(
"params"
)
Map
<
String
,
Object
>
params
,
Page
page
);
}
}
src/main/java/io/office/modules/manage/service/NewsMovieService.java
View file @
6076b462
package
io
.
office
.
modules
.
manage
.
service
;
package
io
.
office
.
modules
.
manage
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.PageUtils
;
import
io.office.modules.manage.entity.NewsMovieEntity
;
import
io.office.modules.manage.entity.NewsMovieEntity
;
...
@@ -22,5 +23,6 @@ public interface NewsMovieService extends IService<NewsMovieEntity> {
...
@@ -22,5 +23,6 @@ public interface NewsMovieService extends IService<NewsMovieEntity> {
void
insert
(
NewsMovieEntityVo
newsMovieEntityVo
,
SysUserEntity
user
);
void
insert
(
NewsMovieEntityVo
newsMovieEntityVo
,
SysUserEntity
user
);
Page
<
NewsMovieEntity
>
selectMoveList
(
Map
<
String
,
Object
>
params
,
Page
page
);
}
}
src/main/java/io/office/modules/manage/service/impl/NewsMovieServiceImpl.java
View file @
6076b462
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.manage.vo.request.NewsMovieEntityVo
;
import
io.office.modules.manage.vo.request.NewsMovieEntityVo
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
@@ -22,11 +25,14 @@ import io.office.modules.manage.service.NewsMovieService;
...
@@ -22,11 +25,14 @@ import io.office.modules.manage.service.NewsMovieService;
@Service
(
"newsMovieService"
)
@Service
(
"newsMovieService"
)
public
class
NewsMovieServiceImpl
extends
ServiceImpl
<
NewsMovieDao
,
NewsMovieEntity
>
implements
NewsMovieService
{
public
class
NewsMovieServiceImpl
extends
ServiceImpl
<
NewsMovieDao
,
NewsMovieEntity
>
implements
NewsMovieService
{
@Autowired
NewsMovieDao
newsMovieDao
;
@Override
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
QueryWrapper
<
NewsMovieEntity
>
newsMovieEntityQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
NewsMovieEntity
>
newsMovieEntityQueryWrapper
=
new
QueryWrapper
<>();
newsMovieEntityQueryWrapper
.
select
(
"
id,title,keyword,author,releasedate,long as longStr,clanguage,lasteditor,showtime,auditor,status
"
);
newsMovieEntityQueryWrapper
.
select
(
""
);
if
(
params
.
containsKey
(
"levels"
))
{
if
(
params
.
containsKey
(
"levels"
))
{
newsMovieEntityQueryWrapper
.
eq
(
"levels"
,
params
.
get
(
"levels"
));
newsMovieEntityQueryWrapper
.
eq
(
"levels"
,
params
.
get
(
"levels"
));
}
else
{
}
else
{
...
@@ -59,5 +65,12 @@ public class NewsMovieServiceImpl extends ServiceImpl<NewsMovieDao, NewsMovieEnt
...
@@ -59,5 +65,12 @@ public class NewsMovieServiceImpl extends ServiceImpl<NewsMovieDao, NewsMovieEnt
baseMapper
.
insert
(
newsMovieEntity
);
baseMapper
.
insert
(
newsMovieEntity
);
}
}
@Override
public
Page
<
NewsMovieEntity
>
selectMoveList
(
Map
<
String
,
Object
>
params
,
Page
page
)
{
List
<
NewsMovieEntity
>
list
=
this
.
newsMovieDao
.
selectMoveList
(
params
,
page
);
page
.
setRecords
(
list
);
return
page
;
}
}
}
\ No newline at end of file
src/main/resources/mapper/manage/NewsMovieDao.xml
View file @
6076b462
...
@@ -32,5 +32,43 @@
...
@@ -32,5 +32,43 @@
<result
property=
"lasteditor"
column=
"lasteditor"
/>
<result
property=
"lasteditor"
column=
"lasteditor"
/>
</resultMap>
</resultMap>
<select
id=
"selectMoveList"
resultMap=
"newsMovieMap"
>
SELECT
id,
title,
keyword,
author,
releasedate,
long AS longStr,
clanguage,
lasteditor,
showtime,
auditor,
status,
editor
from news_movie
where 1=1
<if
test=
"params.title !=null and params.title !=''"
>
and title like concat('%',#{params.title},'%')
</if>
<if
test=
"params.author !=null and params.author !=''"
>
and author like concat('%',#{params.author},'%')
</if>
<if
test=
"params.editor !=null and params.editor !=''"
>
and editor like concat('%',#{params.editor},'%')
</if>
<if
test=
"params.keyword !=null and params.keyword !=''"
>
and keyword like concat('%',#{params.keyword},'%')
</if>
<if
test=
"params.status !=null and params.status !=''"
>
and status = #{params.status}
</if>
<if
test=
"params.clanguage !=null and params.clanguage !=''"
>
and clanguage =#{params.clanguage}
</if>
<if
test=
"params.levels !=null and params.levels !=''"
>
and levels = #{params.levels}
</if>
ORDER BY releasedate desc
</select>
</mapper>
</mapper>
\ No newline at end of file
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