PageIndex, PageLastIndex 명칭으로 변경
This commit is contained in:
parent
d888669dc6
commit
a2f17d884d
@ -124,8 +124,8 @@ public class BoardController extends NlibCommonController
|
||||
//-------------------------------
|
||||
DataApiReqVO reqVO = new DataApiReqVO();
|
||||
reqVO.setAuthKey(createAuthKey(req, authentication));
|
||||
reqVO.setPageNo(pageNo);
|
||||
reqVO.setPageRows(pageRows);
|
||||
reqVO.setPageIndex(pageNo);
|
||||
reqVO.setPageSize(pageRows);
|
||||
|
||||
// 추가 정보 설정
|
||||
HashMap<String, Object> info = new HashMap<String, Object>();
|
||||
@ -167,8 +167,8 @@ public class BoardController extends NlibCommonController
|
||||
//-------------------------------
|
||||
DataApiReqVO reqVO = new DataApiReqVO();
|
||||
reqVO.setAuthKey(createAuthKey(req, authentication));
|
||||
reqVO.setPageNo(pageNo);
|
||||
reqVO.setPageRows(pageRows);
|
||||
reqVO.setPageIndex(pageNo);
|
||||
reqVO.setPageSize(pageRows);
|
||||
|
||||
// 추가 정보 설정 : 게시판ID, 게시물번호
|
||||
HashMap<String, Object> info = new HashMap<String, Object>();
|
||||
@ -274,8 +274,8 @@ public class BoardController extends NlibCommonController
|
||||
//-------------------------------
|
||||
DataApiReqVO reqVO = new DataApiReqVO();
|
||||
reqVO.setAuthKey(createAuthKey(req, authentication));
|
||||
reqVO.setPageNo(pageNo);
|
||||
reqVO.setPageRows(pageRows);
|
||||
reqVO.setPageIndex(pageNo);
|
||||
reqVO.setPageSize(pageRows);
|
||||
|
||||
// 추가 정보 설정 : 게시판ID, 게시물번호
|
||||
HashMap<String, Object> info = new HashMap<String, Object>();
|
||||
|
||||
@ -91,8 +91,8 @@ public interface DataApiInterface {
|
||||
|
||||
// 공통
|
||||
map.add("authKey", reqVO.getAuthKey());
|
||||
map.add("rows", "" + reqVO.getPageRows());
|
||||
map.add("page", "" + reqVO.getPageNo());
|
||||
map.add("rows", "" + reqVO.getPageSize());
|
||||
map.add("page", "" + reqVO.getPageIndex());
|
||||
|
||||
// 추가 정보
|
||||
if(reqVO.hasInfo()) {
|
||||
@ -196,21 +196,23 @@ public interface DataApiInterface {
|
||||
int codeInt = 0;
|
||||
try {
|
||||
codeInt = Integer.parseInt(code);
|
||||
|
||||
if(codeInt != 0) {
|
||||
resVO.setResultCode(String.format("ERR_BIZERR(%s)", code));
|
||||
} else {
|
||||
resVO.setResultCode("S0000");
|
||||
}
|
||||
} catch(Exception e) {
|
||||
if(StringUtil.isNotEmpty(code) && code.startsWith("S")) {
|
||||
codeInt = 0;
|
||||
resVO.setResultCode("S0000");
|
||||
} else {
|
||||
resVO.setResultCode(String.format("ERR_BIZERR(%s)", code));
|
||||
log.error("회신 code 정보를 정수로 변환처리 중 오류가 발생하였습니다." + e.toString());
|
||||
codeInt = -1;
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
if(codeInt != 0) {
|
||||
resVO.setResultCode(String.format("ERR_BIZERR(%s)", code));
|
||||
} else {
|
||||
resVO.setResultCode("S0000");
|
||||
}
|
||||
}
|
||||
|
||||
if(lowerKey.equals("message")) {
|
||||
@ -218,11 +220,11 @@ public interface DataApiInterface {
|
||||
}
|
||||
|
||||
if(lowerKey.equals("page")) {
|
||||
resVO.setPageNo(StringUtil.toNumber((String)map.get(key)));
|
||||
resVO.setPageIndex(StringUtil.toNumber((String)map.get(key)));
|
||||
}
|
||||
|
||||
if(lowerKey.equals("totpages")) {
|
||||
resVO.setPageTotCount(StringUtil.toNumber((String)map.get(key)));
|
||||
resVO.setPageLastIndex(StringUtil.toNumber((String)map.get(key)));
|
||||
}
|
||||
|
||||
if(lowerKey.equals("records")) {
|
||||
|
||||
@ -29,14 +29,14 @@ import java.util.Map;
|
||||
public class DataApiReqVO {
|
||||
|
||||
public static final int DEFAULT_PAGE_SIZE = 10;
|
||||
public static final int DEFAULT_PAGE_NO = 1;
|
||||
public static final int DEFAULT_PAGE_INDEX = 1;
|
||||
|
||||
/* 처리결과 */
|
||||
private String authKey; /* 로그인키 */
|
||||
|
||||
/* 페이징 정보 */
|
||||
private int pageNo = 0; /* 요청 페이지 번호 */
|
||||
private int pageRows = 0; /* 페이지별 표출할 레코드 수 */
|
||||
private int pageIndex = 0; /* 요청 페이지 번호 */
|
||||
private int pageSize = 0; /* 페이지별 표출할 레코드 수 */
|
||||
|
||||
/* 기본정보 */
|
||||
private HashMap<String, Object> info = null;
|
||||
@ -58,37 +58,37 @@ public class DataApiReqVO {
|
||||
this.authKey = authKey;
|
||||
}
|
||||
|
||||
public int getPageNo() {
|
||||
return (pageNo < 1 ? DEFAULT_PAGE_NO : pageNo);
|
||||
public int getPageIndex() {
|
||||
return (pageIndex < 1 ? DEFAULT_PAGE_INDEX : pageIndex);
|
||||
}
|
||||
|
||||
public void setPageNo(int pageNo) {
|
||||
this.pageNo = pageNo;
|
||||
public void setPageIndex(int pageIndex) {
|
||||
this.pageIndex = pageIndex;
|
||||
}
|
||||
|
||||
public void setPageNo(String pageNo) {
|
||||
public void setPageIndex(String pageIndex) {
|
||||
try {
|
||||
this.pageNo = Integer.parseInt(pageNo);
|
||||
this.pageIndex = Integer.parseInt(pageIndex);
|
||||
} catch(Exception e) {
|
||||
this.pageNo = DEFAULT_PAGE_NO;
|
||||
this.pageIndex = DEFAULT_PAGE_INDEX;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public int getPageRows() {
|
||||
return (pageRows < 1 ? DEFAULT_PAGE_SIZE : pageRows);
|
||||
public int getPageSize() {
|
||||
return (pageSize < 1 ? DEFAULT_PAGE_SIZE : pageSize);
|
||||
}
|
||||
|
||||
public void setPageRows(String pageRows) {
|
||||
public void setPageSize(String pageSize) {
|
||||
try {
|
||||
this.pageRows = Integer.parseInt(pageRows);
|
||||
this.pageSize = Integer.parseInt(pageSize);
|
||||
} catch(Exception e) {
|
||||
this.pageRows = DEFAULT_PAGE_SIZE;
|
||||
this.pageSize = DEFAULT_PAGE_SIZE;
|
||||
}
|
||||
}
|
||||
|
||||
public void setPageRows(int pageRows) {
|
||||
this.pageRows = pageRows;
|
||||
public void setPageSize(int pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public HashMap<String, Object> getInfo() {
|
||||
|
||||
@ -54,14 +54,14 @@ public class DataApiResVO {
|
||||
String resultMessage; /* 결과내용(오류내용) */
|
||||
|
||||
/* 페이징 정보 */
|
||||
int pageNo = 0; /* 요청 페이지 번호 */
|
||||
int pageTotCount = 0; /* 페이지총수 */
|
||||
int pageIndex = 0; /* 요청 페이지 번호 (page) */
|
||||
int pageLastIndex = 0; /* 마지막페이지번호 (totPages) */
|
||||
|
||||
/* 기본/추가 정보 */
|
||||
HashMap<String, Object> info = null;
|
||||
|
||||
/* 목록정보 */
|
||||
int recordTotCount = 0; /* 총 레코드수 */
|
||||
int recordTotCount = 0; /* 총 레코드수 (records) */
|
||||
|
||||
/**
|
||||
* 응답 처리결과가 성공인지의 여부를 리턴한다.
|
||||
@ -88,17 +88,17 @@ public class DataApiResVO {
|
||||
public void setResultMessage(String resultMessage) {
|
||||
this.resultMessage = resultMessage;
|
||||
}
|
||||
public int getPageNo() {
|
||||
return pageNo;
|
||||
public int getPageIndex() {
|
||||
return pageIndex;
|
||||
}
|
||||
public void setPageNo(int pageNo) {
|
||||
this.pageNo = pageNo;
|
||||
public void setPageIndex(int pageIndex) {
|
||||
this.pageIndex = pageIndex;
|
||||
}
|
||||
public int getPageTotCount() {
|
||||
return pageTotCount;
|
||||
public int getPageLastIndex() {
|
||||
return pageLastIndex;
|
||||
}
|
||||
public void setPageTotCount(int pageTotCount) {
|
||||
this.pageTotCount = pageTotCount;
|
||||
public void setPageLastIndex(int pageLastIndex) {
|
||||
this.pageLastIndex = pageLastIndex;
|
||||
}
|
||||
public HashMap<String, Object> getInfo() {
|
||||
return info;
|
||||
|
||||
@ -73,8 +73,8 @@ public class SampleDataApiController {
|
||||
|
||||
DataApiReqVO reqVO = new DataApiReqVO();
|
||||
reqVO.setAuthKey(authKey);
|
||||
reqVO.setPageNo(page);
|
||||
reqVO.setPageRows(rows);
|
||||
reqVO.setPageIndex(page);
|
||||
reqVO.setPageSize(rows);
|
||||
|
||||
DataApiResVO resVO = sampleDataApiService.getSampleInfo(reqVO);
|
||||
model.addAttribute("result", resVO);
|
||||
|
||||
@ -56,8 +56,8 @@ public class SecUserDetailsService implements UserDetailsService {
|
||||
|
||||
DataApiReqVO reqVO = new DataApiReqVO();
|
||||
reqVO.setAuthKey("NONE");
|
||||
reqVO.setPageNo("1");
|
||||
reqVO.setPageRows("1");
|
||||
reqVO.setPageIndex("1");
|
||||
reqVO.setPageSize("1");
|
||||
|
||||
HashMap<String, Object> info = new HashMap<String, Object>();
|
||||
info.put("id", username);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user