提交 d38cd96f authored 作者: chaoyanjun's avatar chaoyanjun

--no commit message

上级 b0d848ea
......@@ -7,6 +7,7 @@ import io.swagger.annotations.ApiParam;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -70,7 +71,7 @@ public class NewsController {
@ApiOperation("资讯列表")
@GetMapping(SysUserRequestPath.PAGE)
public CallBack<PageInfo<NewsVo>> list(PageParam pageParam, NewsQuery query){
if(pageParam.getOrderBy() == null) {
if(StringUtils.isEmpty(pageParam.getOrderBy())) {
pageParam.setOrderBy(" sort , updateTime desc ");
}
return CallBack.success(newsService.page(pageParam, query));
......
......@@ -3,6 +3,7 @@ package com.zrqx.bg.sysuser.service.activity;
import java.util.List;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -88,7 +89,7 @@ public class ActivityServiceImpl extends BaseModelServiceImpl<Activity, Integer>
@Override
public PageInfo<ActivityVo> page(PageParam pageParam,
ActivityQuery query) {
if(pageParam.getOrderBy() == null) pageParam.setOrderBy(" createTime desc ");
if(StringUtils.isEmpty(pageParam.getOrderBy())) pageParam.setOrderBy(" createTime desc ");
startPage(pageParam);
List<ActivityVo> activityVos = activityMapper.list(query);
if(activityVos == null){
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论