2023-06-07 15:14 api 내용 수정
This commit is contained in:
parent
96ba96234d
commit
0fcc65f9f6
@ -1,14 +1,18 @@
|
||||
package com.itn.mjonApi.mjon.api.inqry.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.catalina.connector.Response;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.itn.mjonApi.cmn.apiServer.ApiService;
|
||||
import com.itn.mjonApi.cmn.msg.RestResponse;
|
||||
import com.itn.mjonApi.cmn.msg.SendSuccessRestResponse;
|
||||
import com.itn.mjonApi.cmn.msg.StatMsg;
|
||||
import com.itn.mjonApi.mjon.api.access.mapper.domain.AccessKeyVO;
|
||||
import com.itn.mjonApi.mjon.api.inqry.mapper.HstryMapper;
|
||||
import com.itn.mjonApi.mjon.api.inqry.service.HstryService;
|
||||
@ -45,6 +49,12 @@ public class HstryServiceImpl implements HstryService {
|
||||
|
||||
//전체 발송 이력
|
||||
log.info(" :: hstryList ::");
|
||||
log.info(hstryVO.getTest_yn());
|
||||
|
||||
if(StringUtils.isNotEmpty(hstryVO.getTest_yn())){
|
||||
// YF => 실패 테스트 데이터
|
||||
return this._getTestReturnData(hstryVO.getTest_yn());
|
||||
}
|
||||
|
||||
HstryResponseVO hstryResponseVO = new HstryResponseVO();
|
||||
|
||||
@ -173,4 +183,35 @@ public class HstryServiceImpl implements HstryService {
|
||||
|
||||
return Integer.toString(i_pageSize);
|
||||
}
|
||||
|
||||
private RestResponse _getTestReturnData(String testYn)
|
||||
{
|
||||
|
||||
// YF => 실패 테스트 데이터
|
||||
if("YS".equals(testYn))
|
||||
{
|
||||
List<Map> List = new ArrayList<Map>();
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("name", "junho85");
|
||||
map.put("nickname", "June Kim");
|
||||
|
||||
List.add(map);
|
||||
|
||||
return new RestResponse(
|
||||
HstryResponseVO.builder()
|
||||
.resultCode(0)
|
||||
.next_yn("N")
|
||||
.objectList((java.util.List<?>) map)
|
||||
.build()
|
||||
/*
|
||||
[{"totMsgCnt":4,"msgResult":"F","msgType":4,"sCnt":0,"msgGroupCnt":3,"smsTxt":"문자 테스트~![*이름*]","wCnt":0,"callFrom":"01035520132","msgTypeName":"단문(SMS)","msgGroupId":"MSGGID_0000000013200","reqdate":"2023-06-01 18:20:07","curState":3,"fCnt":3,"userId":"goodgkdus","remainMsgCnt":0,"regdate":"2023-06-01 18:20:08","reserveCYn":"N","ttlCnt":3},{"totMsgCnt":4,"msgResult":"F","msgType":4,"sCnt":0,"msgGroupCnt":3,"smsTxt":"문자 테스트~![*이름*]","wCnt":0,"callFrom":"01035520132","msgTypeName":"단문(SMS)","msgGroupId":"MSGGID_0000000013190","reqdate":"2023-06-01 17:50:07","curState":3,"fCnt":3,"userId":"goodgkdus","remainMsgCnt":0,"regdate":"2023-06-01 17:50:07","reserveCYn":"N","ttlCnt":3},{"totMsgCnt":4,"msgResult":"F","msgType":4,"sCnt":0,"msgGroupCnt":3,"smsTxt":"문자 테스트~![*이름*]","wCnt":0,"callFrom":"01035520132","msgTypeName":"단문(SMS)","msgGroupId":"MSGGID_0000000013161","reqdate":"2023-06-01 16:40:57","curState":3,"fCnt":3,"userId":"goodgkdus","remainMsgCnt":0,"regdate":"2023-06-01 16:40:57","reserveCYn":"N","ttlCnt":3},{"totMsgCnt":4,"msgResult":"F","msgType":4,"sCnt":0,"msgGroupCnt":3,"smsTxt":"문자 테스트~","wCnt":0,"callFrom":"01035520132","msgTypeName":"단문(SMS)","msgGroupId":"MSGGID_0000000013160","reqdate":"2023-06-01 16:21:49","curState":3,"fCnt":3,"userId":"goodgkdus","remainMsgCnt":0,"regdate":"2023-06-01 16:21:50","reserveCYn":"N","ttlCnt":3}]
|
||||
*/
|
||||
);
|
||||
|
||||
}else{
|
||||
// 실패 코드 중 랜덤으로 리턴
|
||||
return new RestResponse(StatMsg.randomErrorStatCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,6 +36,8 @@ public class HstryVO implements Serializable{
|
||||
@ApiModelProperty(value = "조회마감일자 기본값 내일", example = "20230524")
|
||||
private String endDate;
|
||||
|
||||
@ApiModelProperty(value = "테스트 여부 YF-실패 테스트/YS-성공테스트 기본값 ''", example = "YF")
|
||||
private String test_yn; // 테스트 여부
|
||||
|
||||
//private String mberId; // 사용자 ID
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user