Commit fbad6b10 by 吴迪

Merge remote-tracking branch 'origin/master'

parents 86a2d8f3 c32af98d
......@@ -34,17 +34,17 @@ public class NewsMovieServiceImpl extends ServiceImpl<NewsMovieDao, NewsMovieEnt
QueryWrapper<NewsMovieEntity> newsMovieEntityQueryWrapper = new QueryWrapper<>();
newsMovieEntityQueryWrapper.select("");
if(params.containsKey("levels")) {
newsMovieEntityQueryWrapper.eq("levels",params.get("levels"));
} else{
newsMovieEntityQueryWrapper.gt("levels",0);
if (params.containsKey("levels")) {
newsMovieEntityQueryWrapper.eq("levels", params.get("levels"));
} else {
newsMovieEntityQueryWrapper.gt("levels", 0);
}
newsMovieEntityQueryWrapper.likeLeft(params.containsKey("title") && StringUtils.isNotBlank(String.valueOf(params.get("title"))),"title",params.get("title"));
newsMovieEntityQueryWrapper.likeLeft(params.containsKey("author")&& StringUtils.isNotBlank(String.valueOf(params.get("author"))),"author",params.get("author"));
newsMovieEntityQueryWrapper.likeLeft(params.containsKey("auditor")&& StringUtils.isNotBlank(String.valueOf(params.get("auditor"))),"auditor",params.get("auditor"));
newsMovieEntityQueryWrapper.likeLeft(params.containsKey("keyword")&& StringUtils.isNotBlank(String.valueOf(params.get("keyword"))),"keyword",params.get("keyword"));
newsMovieEntityQueryWrapper.eq(params.containsKey("status")&& StringUtils.isNotBlank(String.valueOf(params.get("status"))),"status",params.get("status"));
newsMovieEntityQueryWrapper.eq(params.containsKey("clanguage")&& StringUtils.isNotBlank(String.valueOf(params.get("clanguage"))),"clanguage",params.get("clanguage"));
newsMovieEntityQueryWrapper.likeLeft(params.containsKey("title") && StringUtils.isNotBlank(String.valueOf(params.get("title"))), "title", params.get("title"));
newsMovieEntityQueryWrapper.likeLeft(params.containsKey("author") && StringUtils.isNotBlank(String.valueOf(params.get("author"))), "author", params.get("author"));
newsMovieEntityQueryWrapper.likeLeft(params.containsKey("auditor") && StringUtils.isNotBlank(String.valueOf(params.get("auditor"))), "auditor", params.get("auditor"));
newsMovieEntityQueryWrapper.likeLeft(params.containsKey("keyword") && StringUtils.isNotBlank(String.valueOf(params.get("keyword"))), "keyword", params.get("keyword"));
newsMovieEntityQueryWrapper.eq(params.containsKey("status") && StringUtils.isNotBlank(String.valueOf(params.get("status"))), "status", params.get("status"));
newsMovieEntityQueryWrapper.eq(params.containsKey("clanguage") && StringUtils.isNotBlank(String.valueOf(params.get("clanguage"))), "clanguage", params.get("clanguage"));
newsMovieEntityQueryWrapper.orderByDesc("releasedate");
IPage<NewsMovieEntity> page = this.page(
......@@ -61,27 +61,29 @@ public class NewsMovieServiceImpl extends ServiceImpl<NewsMovieDao, NewsMovieEnt
newtopicEntityVo.setReleasedate(date);
newtopicEntityVo.setUpdatedate(date);
newtopicEntityVo.setEditor(user.getUsername());
newtopicEntityVo.setShowtime(DateUtils.format(date,DateUtils.DATE_PATTERN_1));
if (StringUtils.isBlank(newtopicEntityVo.getShowtime())) {
newtopicEntityVo.setShowtime(DateUtils.format(date, DateUtils.DATE_PATTERN));
}
newtopicEntityVo.setLasteditor(user.getUsername());
if(StringUtils.isNotBlank(newtopicEntityVo.getPic())){
if (StringUtils.isNotBlank(newtopicEntityVo.getPic())) {
newtopicEntityVo.setLittlepic(newtopicEntityVo.getPic());
newtopicEntityVo.setBigpic(newtopicEntityVo.getPic());
}
newtopicEntityVo.setStatus(0);
NewsMovieEntity newsMovieEntity = new NewsMovieEntity();
BeanUtils.copyProperties(newtopicEntityVo,newsMovieEntity);
NewsMovieEntity newsMovieEntity = new NewsMovieEntity();
BeanUtils.copyProperties(newtopicEntityVo, newsMovieEntity);
newsMovieEntity.setEditor(user.getUsername());
newsMovieEntity.setReleasedate(date);
newsMovieEntity.setUpdatedate(date);
newsMovieEntity.setEditor(user.getUsername());
newsMovieEntity.setShowtime(DateUtils.format(date,DateUtils.DATE_PATTERN_1));
newsMovieEntity.setShowtime(DateUtils.format(date, DateUtils.DATE_PATTERN_1));
newsMovieEntity.setLasteditor(user.getUsername());
baseMapper.insert(newsMovieEntity);
}
@Override
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);
return 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