Commit ecb3b3a4 by rongkailun

【修改】chuli liebiao shaixuan wenti

parent 74e0daf5
...@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -9,6 +9,7 @@ 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.NewsEntity;
import io.office.modules.manage.entity.NewtopicEntity; 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.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;
...@@ -49,9 +50,9 @@ public class NewsMovieController extends AbstractController { ...@@ -49,9 +50,9 @@ 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 NewsParams params){
Page<NewsMovieEntity> page = this.newsMovieService.selectMoveList(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); PageUtils pageUtils = new PageUtils(page);
return R.ok().put("page", pageUtils); return R.ok().put("page", pageUtils);
} }
......
...@@ -3,6 +3,7 @@ package io.office.modules.manage.dao; ...@@ -3,6 +3,7 @@ package io.office.modules.manage.dao;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 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 io.office.modules.manage.entity.dto.NewsParams;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -19,5 +20,5 @@ import java.util.Map; ...@@ -19,5 +20,5 @@ import java.util.Map;
@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); List<NewsMovieEntity> selectMoveList(@Param("params") NewsParams params, Page page);
} }
...@@ -43,4 +43,6 @@ public class NewsParams extends PageParams { ...@@ -43,4 +43,6 @@ public class NewsParams extends PageParams {
private String parentCategoryId; private String parentCategoryId;
/**二级分类*/ /**二级分类*/
private String categoryId; private String categoryId;
private String clanguage;
} }
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -4,6 +4,7 @@ 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;
import io.office.modules.manage.entity.dto.NewsParams;
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.entity.SysUserEntity; import io.office.modules.sys.entity.SysUserEntity;
...@@ -23,6 +24,6 @@ public interface NewsMovieService extends IService<NewsMovieEntity> { ...@@ -23,6 +24,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); Page<NewsMovieEntity> selectMoveList(NewsParams params, Page page);
} }
package io.office.modules.manage.service.impl; package io.office.modules.manage.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 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.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;
...@@ -66,7 +67,7 @@ public class NewsMovieServiceImpl extends ServiceImpl<NewsMovieDao, NewsMovieEnt ...@@ -66,7 +67,7 @@ public class NewsMovieServiceImpl extends ServiceImpl<NewsMovieDao, NewsMovieEnt
} }
@Override @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); List<NewsMovieEntity> list = this.newsMovieDao.selectMoveList(params,page);
page.setRecords(list); page.setRecords(list);
return page; return page;
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
<if test="newsParams.author !=null and newsParams.author !=''"> <if test="newsParams.author !=null and newsParams.author !=''">
and author like concat('%',#{newsParams.author},'%') and author like concat('%',#{newsParams.author},'%')
</if> </if>
<if test="newsParams.status !=null"> <if test="newsParams.status !=null and newsParams.status !=''">
and status =#{newsParams.status} and status =#{newsParams.status}
</if> </if>
<if test="newsParams.auditor !=null and newsParams.auditor !=''"> <if test="newsParams.auditor !=null and newsParams.auditor !=''">
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<if test="params.keyword !='' and params.keyword !=null"> <if test="params.keyword !='' and params.keyword !=null">
and t.keyword like concat('%',#{params.keyword},'%') and t.keyword like concat('%',#{params.keyword},'%')
</if> </if>
<if test="params.status !=''"> <if test="params.status !='' and params.status !=null">
and t.Status =#{params.status} and t.Status =#{params.status}
</if> </if>
<if test="params.pictureType !='' and params.pictureType !=null"> <if test="params.pictureType !='' and params.pictureType !=null">
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<if test="newsParams.author !=null and newsParams.author !=''"> <if test="newsParams.author !=null and newsParams.author !=''">
and b.author like concat('%',#{newsParams.author},'%') and b.author like concat('%',#{newsParams.author},'%')
</if> </if>
<if test="newsParams.status !=null"> <if test="newsParams.status !=null and newsParams.status !=''">
and b.status =#{newsParams.status} and b.status =#{newsParams.status}
</if> </if>
<if test="newsParams.auditor !=null and newsParams.auditor !=''"> <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