feat: portal管理和其他调整
This commit is contained in:
@@ -1,22 +1,24 @@
|
||||
package org.wfc.common.core.utils;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.wfc.common.core.constant.HttpStatus;
|
||||
import org.wfc.common.core.utils.sql.SqlUtil;
|
||||
import org.wfc.common.core.web.page.PageDomain;
|
||||
import org.wfc.common.core.web.page.TableDataInfo;
|
||||
import org.wfc.common.core.web.page.TableSupport;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分页工具类
|
||||
*
|
||||
*
|
||||
* @author wfc
|
||||
*/
|
||||
public class PageUtils extends PageHelper
|
||||
{
|
||||
public class PageUtils extends PageHelper {
|
||||
/**
|
||||
* 设置请求分页数据
|
||||
*/
|
||||
public static void startPage()
|
||||
{
|
||||
public static void startPage() {
|
||||
PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||
Integer pageNum = pageDomain.getPageNum();
|
||||
Integer pageSize = pageDomain.getPageSize();
|
||||
@@ -28,8 +30,18 @@ public class PageUtils extends PageHelper
|
||||
/**
|
||||
* 清理分页的线程变量
|
||||
*/
|
||||
public static void clearPage()
|
||||
{
|
||||
public static void clearPage() {
|
||||
PageHelper.clearPage();
|
||||
}
|
||||
|
||||
/**
|
||||
* 响应请求分页数据
|
||||
*/
|
||||
public static TableDataInfo getDataTable(List<?> list, Long total) {
|
||||
TableDataInfo rspData = new TableDataInfo(list, total);
|
||||
rspData.setCode(HttpStatus.SUCCESS);
|
||||
rspData.setMsg("Query successful");
|
||||
|
||||
return rspData;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package org.wfc.common.core.utils;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.wfc.common.core.constant.WifiConstants;
|
||||
import org.wfc.common.core.exception.OmadaException;
|
||||
|
||||
/**
|
||||
* @description: reponseutil
|
||||
* @author: cyc
|
||||
* @since: 2025-02-17
|
||||
*/
|
||||
@Slf4j
|
||||
public class ResponseUtils {
|
||||
|
||||
public static void checkResponse(Integer errorCode, String msg) {
|
||||
if (errorCode != WifiConstants.ERROR_CODE_SUCCESS) {
|
||||
log.error("Omada error msg: {}", msg);
|
||||
throw new OmadaException(msg);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user