分页参数修改

This commit is contained in:
x ronger 2019-12-02 09:02:01 +08:00
parent 8254c7fae0
commit 21682b7b7d
6 changed files with 22 additions and 14 deletions

View File

@ -8,6 +8,9 @@ import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
/**
* @author ronger
*/
@Data
@Table(name = "vertical_topic")
public class Topic {

View File

@ -1,5 +1,6 @@
package com.rymcu.vertical.entity;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import org.apache.ibatis.type.JdbcType;
import tk.mybatis.mapper.annotation.ColumnType;
@ -29,6 +30,7 @@ public class User implements Serializable,Cloneable {
* 密码
* */
@Column(name = "password")
@JSONField(serialize=false)
private String password;
/**
@ -92,17 +94,20 @@ public class User implements Serializable,Cloneable {
* 最后登录时间
* */
@Column(name = "last_login_time")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date lastLoginTime;
/**
* 创建时间
* */
@Column(name = "created_time")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date createdTime;
/**
* 创建时间
* */
@Column(name = "updated_time")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date updatedTime;
}

View File

@ -94,8 +94,8 @@ public class CommonApiController {
Map map = new HashMap(2);
map.put("articles", pageInfo.getList());
Map pagination = new HashMap(3);
pagination.put("paginationPageCount",pageInfo.getPages());
pagination.put("paginationPageNums",pageInfo.getNavigatepageNums());
pagination.put("pageSize",pageInfo.getPageSize());
pagination.put("total",pageInfo.getTotal());
pagination.put("currentPage",pageInfo.getPageNum());
map.put("pagination", pagination);
return GlobalResultGenerator.genSuccessResult(map);

View File

@ -25,11 +25,11 @@ public class TagController {
PageHelper.startPage(page, rows);
List<ArticleDTO> list = articleService.findArticlesByTagName(name);
PageInfo pageInfo = new PageInfo(list);
Map map = new HashMap();
Map map = new HashMap(2);
map.put("articles", pageInfo.getList());
Map pagination = new HashMap();
pagination.put("paginationPageCount",pageInfo.getPages());
pagination.put("paginationPageNums",pageInfo.getNavigatepageNums());
Map pagination = new HashMap(3);
pagination.put("pageSize",pageInfo.getPageSize());
pagination.put("total",pageInfo.getTotal());
pagination.put("currentPage",pageInfo.getPageNum());
map.put("pagination", pagination);
return GlobalResultGenerator.genSuccessResult(map);

View File

@ -35,11 +35,11 @@ public class TopicController {
PageHelper.startPage(page, rows);
List<ArticleDTO> list = articleService.findArticlesByTopicName(name);
PageInfo pageInfo = new PageInfo(list);
Map map = new HashMap();
Map map = new HashMap(2);
map.put("articles", pageInfo.getList());
Map pagination = new HashMap();
pagination.put("paginationPageCount",pageInfo.getPages());
pagination.put("paginationPageNums",pageInfo.getNavigatepageNums());
Map pagination = new HashMap(3);
pagination.put("pageSize",pageInfo.getPageSize());
pagination.put("total",pageInfo.getTotal());
pagination.put("currentPage",pageInfo.getPageNum());
map.put("pagination", pagination);
return GlobalResultGenerator.genSuccessResult(map);

View File

@ -40,11 +40,11 @@ public class UserController {
PageHelper.startPage(page, rows);
List<ArticleDTO> list = articleService.findUserArticlesByIdUser(userDTO.getIdUser());
PageInfo pageInfo = new PageInfo(list);
Map map = new HashMap();
Map map = new HashMap(2);
map.put("articles", pageInfo.getList());
Map pagination = new HashMap();
pagination.put("paginationPageCount",pageInfo.getPages());
pagination.put("paginationPageNums",pageInfo.getNavigatepageNums());
Map pagination = new HashMap(3);
pagination.put("pageSize",pageInfo.getPageSize());
pagination.put("total",pageInfo.getTotal());
pagination.put("currentPage",pageInfo.getPageNum());
map.put("pagination", pagination);
return GlobalResultGenerator.genSuccessResult(map);