作者 若依
提交者 Gitee

!251 修复日志列表取消字段排序时的报错问题

Merge pull request !251 from 稚屿/N/A
1 -package com.ruoyi.common.core.page;  
2 -  
3 -import com.ruoyi.common.utils.StringUtils;  
4 -  
5 -/**  
6 - * 分页数据  
7 - *  
8 - * @author ruoyi  
9 - */  
10 -public class PageDomain  
11 -{  
12 - /** 当前记录起始索引 */  
13 - private Integer pageNum;  
14 -  
15 - /** 每页显示记录数 */  
16 - private Integer pageSize;  
17 -  
18 - /** 排序列 */  
19 - private String orderByColumn;  
20 -  
21 - /** 排序的方向desc或者asc */  
22 - private String isAsc = "asc";  
23 -  
24 - public String getOrderBy()  
25 - {  
26 - if (StringUtils.isEmpty(orderByColumn))  
27 - {  
28 - return "";  
29 - }  
30 - return StringUtils.toUnderScoreCase(orderByColumn) + " " + isAsc;  
31 - }  
32 -  
33 - public Integer getPageNum()  
34 - {  
35 - return pageNum;  
36 - }  
37 -  
38 - public void setPageNum(Integer pageNum)  
39 - {  
40 - this.pageNum = pageNum;  
41 - }  
42 -  
43 - public Integer getPageSize()  
44 - {  
45 - return pageSize;  
46 - }  
47 -  
48 - public void setPageSize(Integer pageSize)  
49 - {  
50 - this.pageSize = pageSize;  
51 - }  
52 -  
53 - public String getOrderByColumn()  
54 - {  
55 - return orderByColumn;  
56 - }  
57 -  
58 - public void setOrderByColumn(String orderByColumn)  
59 - {  
60 - this.orderByColumn = orderByColumn;  
61 - }  
62 -  
63 - public String getIsAsc()  
64 - {  
65 - return isAsc;  
66 - }  
67 -  
68 - public void setIsAsc(String isAsc)  
69 - {  
70 - // 兼容前端排序类型  
71 - if ("ascending".equals(isAsc))  
72 - {  
73 - isAsc = "asc";  
74 - }  
75 - else if ("descending".equals(isAsc))  
76 - {  
77 - isAsc = "desc";  
78 - }  
79 - this.isAsc = isAsc;  
80 - }  
81 -} 1 +package com.ruoyi.common.core.page;
  2 +
  3 +import com.ruoyi.common.utils.StringUtils;
  4 +
  5 +/**
  6 + * 分页数据
  7 + *
  8 + * @author ruoyi
  9 + */
  10 +public class PageDomain
  11 +{
  12 + /** 当前记录起始索引 */
  13 + private Integer pageNum;
  14 +
  15 + /** 每页显示记录数 */
  16 + private Integer pageSize;
  17 +
  18 + /** 排序列 */
  19 + private String orderByColumn;
  20 +
  21 + /** 排序的方向desc或者asc */
  22 + private String isAsc = "asc";
  23 +
  24 + public String getOrderBy()
  25 + {
  26 + if (StringUtils.isEmpty(orderByColumn))
  27 + {
  28 + return "";
  29 + }
  30 + return StringUtils.toUnderScoreCase(orderByColumn) + " " + isAsc;
  31 + }
  32 +
  33 + public Integer getPageNum()
  34 + {
  35 + return pageNum;
  36 + }
  37 +
  38 + public void setPageNum(Integer pageNum)
  39 + {
  40 + this.pageNum = pageNum;
  41 + }
  42 +
  43 + public Integer getPageSize()
  44 + {
  45 + return pageSize;
  46 + }
  47 +
  48 + public void setPageSize(Integer pageSize)
  49 + {
  50 + this.pageSize = pageSize;
  51 + }
  52 +
  53 + public String getOrderByColumn()
  54 + {
  55 + return orderByColumn;
  56 + }
  57 +
  58 + public void setOrderByColumn(String orderByColumn)
  59 + {
  60 + this.orderByColumn = orderByColumn;
  61 + }
  62 +
  63 + public String getIsAsc()
  64 + {
  65 + return isAsc;
  66 + }
  67 +
  68 + public void setIsAsc(String isAsc)
  69 + {
  70 + if (StringUtils.isNotEmpty(isAsc)) {
  71 + // 兼容前端排序类型
  72 + if ("ascending".equals(isAsc))
  73 + {
  74 + isAsc = "asc";
  75 + }
  76 + else if ("descending".equals(isAsc))
  77 + {
  78 + isAsc = "desc";
  79 + }
  80 + this.isAsc = isAsc;
  81 + }
  82 + }
  83 +}