Commit f76e592d by rongkailun

【修改】专题管理添加筛选条件,审核接口修改

parent f4723e02
......@@ -7,6 +7,7 @@ import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.office.common.annotation.SysLog;
import io.office.modules.manage.entity.dto.NewsParams;
import io.office.modules.manage.vo.request.NewtopicEntityVo;
import io.office.modules.sys.controller.AbstractController;
import io.office.modules.sys.entity.SysUserEntity;
......@@ -116,11 +117,12 @@ public class NewtopicController extends AbstractController {
@Transactional
@RequestMapping("/verify")
// @RequiresPermissions("manage:newtopic:verify")
public R verify(@RequestBody NewtopicEntityVo newtopicVo) {
public R verify(@RequestBody NewsParams params) {
Date date = new Date();
SysUserEntity user = getUser();
NewtopicEntity newtopicEntity = new NewtopicEntity();
newtopicEntity.setAuditor(user.getUsername());
newtopicEntity.setCheckflag(Integer.valueOf(params.getStatus()));
QueryWrapper<NewtopicEntity> newtopicEntityQueryWrapper = new QueryWrapper<>();
newtopicEntityQueryWrapper.eq("classid",newtopicEntity.getClassid());
newtopicService.update(newtopicEntity,newtopicEntityQueryWrapper);
......
......@@ -2,6 +2,7 @@ package io.office.modules.manage.service.impl;
import io.office.modules.manage.vo.request.NewtopicEntityVo;
import io.office.modules.sys.entity.SysUserEntity;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
......@@ -35,9 +36,28 @@ public class NewtopicServiceImpl extends ServiceImpl<NewtopicDao, NewtopicEntity
} else{
queryWrapper.gt("levels",0);
}
queryWrapper.select("classid,title,levels,categoryID,Time,Lastupdate,editor,lasteditor,auditor,checkflag");
if(params.containsKey("status")) {
if(StringUtils.isNotBlank(String.valueOf(params.get("status")))) {
queryWrapper.eq("checkflag", params.get("status"));
}
}
if(params.containsKey("inputDateStart")) {
if(StringUtils.isNotBlank(String.valueOf(params.get("inputDateStart")))){
queryWrapper.ge("Time",params.get("inputDateStart"));
}
}
if(params.containsKey("inputDateEnd")) {
if(StringUtils.isNotBlank(String.valueOf(params.get("inputDateEnd")))){
queryWrapper.ge("Time",params.get("inputDateEnd"));
}
}
if(params.containsKey("title")) {
if(StringUtils.isNotBlank(String.valueOf(params.get("title")))){
queryWrapper.like("title",params.get("title"));
}
}
queryWrapper.select("classid,title,levels,categoryID,showtime,Time,Lastupdate,editor,lasteditor,auditor,checkflag");
IPage<NewtopicEntity> page = baseMapper.selectPage(new Query<NewtopicEntity>().getPage(params), queryWrapper);
return new PageUtils(page);
}
......
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