Commit ecb3b3a4 by rongkailun

【修改】chuli liebiao shaixuan wenti

parent 74e0daf5
......@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.dto.NewsParams;
import io.office.modules.manage.vo.request.NewsMovieEntityVo;
import io.office.modules.manage.vo.request.NewtopicEntityVo;
import io.office.modules.sys.controller.AbstractController;
......@@ -49,9 +50,9 @@ public class NewsMovieController extends AbstractController {
*/
@RequestMapping("/list")
// @RequiresPermissions("manage:newsmovie:list")
public R list(@RequestBody Map<String, Object> params){
public R list(@RequestBody NewsParams params){
Page<NewsMovieEntity> page = this.newsMovieService.selectMoveList(params,
new Page(Integer.valueOf(params.get("page").toString()), Integer.valueOf(params.get("limit").toString())));
new Page(params.getPage(), params.getLimit()));
PageUtils pageUtils = new PageUtils(page);
return R.ok().put("page", pageUtils);
}
......
......@@ -3,6 +3,7 @@ package io.office.modules.manage.dao;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.modules.manage.entity.NewsMovieEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.office.modules.manage.entity.dto.NewsParams;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -19,5 +20,5 @@ import java.util.Map;
@Mapper
public interface NewsMovieDao extends BaseMapper<NewsMovieEntity> {
List<NewsMovieEntity> selectMoveList(@Param("params") Map<String, Object> params, Page page);
List<NewsMovieEntity> selectMoveList(@Param("params") NewsParams params, Page page);
}
......@@ -43,4 +43,6 @@ public class NewsParams extends PageParams {
private String parentCategoryId;
/**二级分类*/
private String categoryId;
private String clanguage;
}
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import io.office.common.utils.PageUtils;
import io.office.modules.manage.entity.NewsMovieEntity;
import io.office.modules.manage.entity.dto.NewsParams;
import io.office.modules.manage.vo.request.NewsMovieEntityVo;
import io.office.modules.manage.vo.request.NewtopicEntityVo;
import io.office.modules.sys.entity.SysUserEntity;
......@@ -23,6 +24,6 @@ public interface NewsMovieService extends IService<NewsMovieEntity> {
void insert(NewsMovieEntityVo newsMovieEntityVo, SysUserEntity user);
Page<NewsMovieEntity> selectMoveList(Map<String, Object> params, Page page);
Page<NewsMovieEntity> selectMoveList(NewsParams params, Page page);
}
package io.office.modules.manage.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.modules.manage.entity.dto.NewsParams;
import io.office.modules.manage.vo.request.NewsMovieEntityVo;
import io.office.modules.sys.entity.SysUserEntity;
import org.apache.commons.lang.StringUtils;
......@@ -66,7 +67,7 @@ public class NewsMovieServiceImpl extends ServiceImpl<NewsMovieDao, NewsMovieEnt
}
@Override
public Page<NewsMovieEntity> selectMoveList(Map<String, Object> params, Page page) {
public Page<NewsMovieEntity> selectMoveList(NewsParams params, Page page) {
List<NewsMovieEntity> list = this.newsMovieDao.selectMoveList(params,page);
page.setRecords(list);
return page;
......
......@@ -117,7 +117,7 @@
<if test="newsParams.author !=null and newsParams.author !=''">
and author like concat('%',#{newsParams.author},'%')
</if>
<if test="newsParams.status !=null">
<if test="newsParams.status !=null and newsParams.status !=''">
and status =#{newsParams.status}
</if>
<if test="newsParams.auditor !=null and newsParams.auditor !=''">
......
......@@ -49,7 +49,7 @@
<if test="params.keyword !='' and params.keyword !=null">
and t.keyword like concat('%',#{params.keyword},'%')
</if>
<if test="params.status !=''">
<if test="params.status !='' and params.status !=null">
and t.Status =#{params.status}
</if>
<if test="params.pictureType !='' and params.pictureType !=null">
......
......@@ -49,7 +49,7 @@
<if test="newsParams.author !=null and newsParams.author !=''">
and b.author like concat('%',#{newsParams.author},'%')
</if>
<if test="newsParams.status !=null">
<if test="newsParams.status !=null and newsParams.status !=''">
and b.status =#{newsParams.status}
</if>
<if test="newsParams.auditor !=null and newsParams.auditor !=''">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment