| | |
| | | if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize))
|
| | | {
|
| | | String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
|
| | | PageHelper.startPage(pageNum, pageSize, orderBy);
|
| | | Boolean reasonable = pageDomain.getReasonable();
|
| | | PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | return rows > 0 ? AjaxResult.success() : AjaxResult.error();
|
| | | }
|
| | |
|
| | | /**
|
| | | * 响应返回结果
|
| | | * |
| | | * @param result 结果
|
| | | * @return 操作结果
|
| | | */
|
| | | protected AjaxResult toAjax(boolean result)
|
| | | {
|
| | | return result ? success() : error();
|
| | | }
|
| | |
|
| | | /**
|
| | | * 返回成功
|
| | | */
|
| | | public AjaxResult success()
|
| | | {
|
| | | return AjaxResult.success();
|
| | | }
|
| | |
|
| | | /**
|
| | | * 返回失败消息
|
| | | */
|
| | | public AjaxResult error()
|
| | | {
|
| | | return AjaxResult.error();
|
| | | }
|
| | |
|
| | | /**
|
| | | * 返回成功消息
|
| | | */
|
| | | public AjaxResult success(String message)
|
| | | {
|
| | | return AjaxResult.success(message);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 返回失败消息
|
| | | */
|
| | | public AjaxResult error(String message)
|
| | | {
|
| | | return AjaxResult.error(message);
|
| | | }
|
| | | }
|