fix : 테스트 클래스 삭제

main
이범준 1 year ago
parent f922ed7968
commit 60ac1e7560

@ -1,55 +0,0 @@
package kr.xit.fims.framework.biz.cmm.dao;
import kr.xit.fims.framework.core.utils.XitMap;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;
@Mapper
public interface XitTestMapper {
/**
* <pre> : </pre>
* @return XitMap
* @throws SQLException XitMap
* @author:
* @date: 2020. 3. 18.
*/
public XitMap findTest() throws SQLException;
public XitMap findTest(String param) throws SQLException;
/**
* <pre> : </pre>
* @return
* @throws SQLException int
* @author:
* @date: 2020. 3. 20.
*/
public int addTest() throws SQLException;
public int addTest(String error_code) throws SQLException;
public int addTest(Map<String, String> param) throws SQLException;
/**
* <pre> :
* -n insert .
* </pre>
* @param listParam
* @return
* @throws SQLException int
* @author:
* @date: 2021. 1. 17.
*/
public int addListTest(List<Map<String, String>> listParam) throws SQLException;
/**
* <pre> : </pre>
* @param param
* @return int
* @author:
* @date: 2021. 1. 17.
*/
public int removesXitConectLogForTestData(Map<String, String> param);
}

@ -1,23 +0,0 @@
package kr.xit.fims.framework.biz.cmm.service;
/**
*
* @: XIT Service
* @: .
* @: 2020. 3. 18. 6:13:48
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public interface XitTest2Service {
/**
* <pre> : </pre>
* void
* @author:
* @date: 2020. 3. 20.
*/
public void transactionOfServiceChainTest();
}

@ -1,59 +0,0 @@
package kr.xit.fims.framework.biz.cmm.service;
import kr.xit.fims.framework.core.utils.XitMap;
/**
*
* @: XIT Service
* @: .
* @: 2020. 3. 18. 6:13:48
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public interface XitTestService {
/**
* <pre> : </pre>
* @return XitMap
* @author:
* @date: 2020. 3. 18.
*/
public XitMap findTest();
/**
* <pre> : </pre>
* void
* @author:
* @date: 2020. 3. 20.
*/
public void transactionTest();
/**
* <pre> : </pre>
* void
* @author:
* @date: 2020. 3. 20.
*/
public void transactionOfServiceChainTest();
/**
* <pre> : </pre>
* @return int
* @author:
* @date: 2021. 1. 17.
*/
public int insertBatchTestBySingle(int dataSize);
/**
* <pre> :
* -n insert .
* </pre>
* @return int
* @author:
* @date: 2021. 1. 17.
*/
public int insertBatchTestByBulk(int dataSize);
}

@ -1,35 +0,0 @@
package kr.xit.fims.framework.biz.cmm.service.bean;
import cokr.xit.foundation.component.AbstractServiceBean;
import kr.xit.fims.framework.biz.cmm.dao.XitTestMapper;
import kr.xit.fims.framework.biz.cmm.service.XitTest2Service;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.sql.SQLException;
@Service
public class XitTest2ServiceBean extends AbstractServiceBean implements XitTest2Service{
@Resource
private XitTestMapper xitTestMapper;
@Override
public void transactionOfServiceChainTest() {
/**
* DB
*/
try {
xitTestMapper.addTest("22");
} catch (SQLException e) {
throw new RuntimeException("DB Insert FAIL", e);
}
/**
* error
*/
Integer.parseInt(null);
}
}

@ -1,214 +0,0 @@
package kr.xit.fims.framework.biz.cmm.service.bean;
import cokr.xit.foundation.component.AbstractServiceBean;
import kr.xit.fims.framework.biz.cmm.dao.XitTestMapper;
import kr.xit.fims.framework.biz.cmm.service.XitTest2Service;
import kr.xit.fims.framework.biz.cmm.service.XitTestService;
import kr.xit.fims.framework.core.utils.XitMap;
import org.apache.ibatis.session.ExecutorType;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public class XitTestServiceBean extends AbstractServiceBean implements XitTestService{
@Resource
private XitTestMapper xitTestMapper;
@Resource
private XitTest2Service xitTest2Service;
@Autowired
private SqlSessionFactory sqlSessionFactory;
@Override
public XitMap findTest() {
XitMap result = new XitMap();
try {
result = xitTestMapper.findTest();
result = xitTestMapper.findTest("1");
} catch (SQLException e) {
throw new RuntimeException("DB 조회 테스트 FAIL");
}
return result;
}
@Override
public void transactionTest() {
/**
* DB
*/
try {
xitTestMapper.addTest("00");
xitTestMapper.addTest("11");
} catch (SQLException e) {
throw new RuntimeException("DB Insert FAIL", e);
}
/**
* error
*/
String str = null;
str.toString();
}
@Override
public void transactionOfServiceChainTest() {
/**
* DB
*/
try {
xitTestMapper.addTest("00");
} catch (SQLException e) {
throw new RuntimeException("DB Insert FAIL", e);
}
/**
*
*/
xitTest2Service.transactionOfServiceChainTest();
}
@Override
public int insertBatchTestBySingle(int dataSize) {
final int BATCH_SIZE = 1000; //SQL 실행 단위
final boolean AUTO_COMMIT = true; //Auto Commit 여부. 2021.01.17 박민규- Spring Transaction 설정된 환경에서 true/false 차이 없음. Service 호출 시 Transaction Open... 동일하게 동작 함.
List<Map<String, String>> list = this.creatTestDataList(dataSize); //테스트 데이터 생성
//테스트 데이터 삭제
xitTestMapper.removesXitConectLogForTestData(null);
//open
//SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, AUTO_COMMIT);
//
//long startTime = System.currentTimeMillis();
//for(int i=0; i<list.size(); i++) {
// Map<String, String> param = list.get(i);
//
// //load
// sqlSession.insert("framework.xit.category.common.dao.XitTestMapper.addTest", param);
// if((i+1)%BATCH_SIZE == 0) {
// //execute
// sqlSession.flushStatements();
// }
//}
//long endTime = System.currentTimeMillis();
////execute
//sqlSession.flushStatements();
////close
//sqlSession.close();
//System.out.println("===============================================");
//System.out.println(String.format("일괄등록 테스트[총 %d건 처리소요 %d초]", list.size(), (endTime-startTime)/1000 ));
//System.out.println("===============================================");
try(SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, AUTO_COMMIT)){
long startTime = System.currentTimeMillis();
for(int i=0; i<list.size(); i++) {
Map<String, String> param = list.get(i);
//load
sqlSession.insert("kr.xit.fims.framework.biz.cmm.dao.XitTestMapper.addTest", param);
if((i+1)%BATCH_SIZE == 0) {
//execute
sqlSession.flushStatements();
}
}
long endTime = System.currentTimeMillis();
//execute
sqlSession.flushStatements();
System.out.println("===============================================");
System.out.println(String.format("일괄등록 테스트[총 %d건 처리소요 %d초]", list.size(), (endTime-startTime)/1000 ));
System.out.println("===============================================");
}
return list.size();
}
@Override
public int insertBatchTestByBulk(int dataSize) {
final int BATCH_SIZE = 1000; //SQL 실행 단위
final boolean AUTO_COMMIT = true; //Auto Commit 여부. 2021.01.17 박민규- Spring Transaction 설정된 환경에서 true/false 차이 없음. Service 호출 시 Transaction Open... 동일하게 동작 함.
List<Map<String, String>> list = this.creatTestDataList(dataSize); //테스트 데이터 생성
//테스트 데이터 삭제
xitTestMapper.removesXitConectLogForTestData(null);
//open
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, AUTO_COMMIT);
long startTime = System.currentTimeMillis();
List<Map<String, String>> listParam = new ArrayList<Map<String, String>>();
for(int i=0; i<list.size(); i++) {
Map<String, String> param = list.get(i);
listParam.add(param);
if(listParam.size()%BATCH_SIZE == 0) {
//load
sqlSession.insert("kr.xit.fims.framework.biz.cmm.dao.XitTestMapper.addListTest", listParam);
listParam.clear();
}
}
if(listParam.size()>0) { //미처리 건수가 있다면..
//load
sqlSession.insert("kr.xit.fims.framework.biz.cmm.dao.XitTestMapper.addListTest", listParam);
}
long endTime = System.currentTimeMillis();
//execute
sqlSession.flushStatements();
//close
sqlSession.close();
System.out.println("===============================================");
System.out.println(String.format("일괄등록 테스트[총 %d건 처리소요 %d초]", list.size(), (endTime-startTime)/1000 ));
System.out.println("===============================================");
return list.size();
}
/**
* <pre> : </pre>
* @return List<Map<String,String>>
* @author:
* @date: 2021. 1. 17.
*/
private List<Map<String, String>> creatTestDataList(int dataSize) {
List<Map<String, String>> listParam = new ArrayList<Map<String,String>>();
if(dataSize<1)
dataSize = 100999;
for(int i=0; i<dataSize; i++) {
Map<String, String> param = new HashMap<String, String>();
param.put("log_id", "BATCH_"+lpad(i+"", 10, '0'));
param.put("error_code", "00");
listParam.add(param);
}
return listParam;
}
private String lpad(String val, int size, char charcter) {
StringBuffer sb = new StringBuffer();
for(int i=0; i<size-val.length(); i++) {
sb.append(charcter);
}
return sb.toString()+val;
}
}

@ -1,467 +0,0 @@
package kr.xit.fims.framework.biz.cmm.web;
import cokr.xit.foundation.web.AbstractController;
import kr.xit.fims.framework.biz.cmm.service.XitFrameCrudService;
import kr.xit.fims.framework.biz.cmm.service.XitTestService;
import kr.xit.fims.framework.biz.mng.user.XitUserInfoVO;
import kr.xit.fims.framework.core.constants.FrameworkConstants.TILES_TYPE;
import kr.xit.fims.framework.core.utils.XitCmmnUtil;
import kr.xit.fims.framework.core.utils.XitMap;
import kr.xit.fims.framework.core.utils.XitScrtyUtil;
import org.egovframe.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.*;
/**
*
* @: Xit Controller
* @: Controller
* @: 2020. 3. 20. 6:32:38
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Controller
@RequestMapping(name = "", value="/xitframe/test/")
public class XitTestController extends AbstractController {
private static final Logger logger = LoggerFactory.getLogger(XitTestController.class);
@Resource
private XitTestService xitTestService;
@Resource
private XitFrameCrudService xitFrameCrudService;
private final String TEST_JSP_PATH = "framework/test/";
/**
* <pre> :
* -DB .
* </pre>
* void
* @author:
* @throws IOException
* @date: 2020. 3. 18.
*/
@RequestMapping(name = "", value="case1")
public void case1(HttpServletResponse resp) throws IOException {
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
if (!isAuthenticated) {
// model.addAttribute("message", egovMessageSource.getMessage("fail.common.login"));
// return "framework/egov/uat/uia/EgovLoginUsr";
resp.setCharacterEncoding("UTF-8");
resp.setContentType("text/html charset=UTF-8");
Writer writer = resp.getWriter();
writer.write("================================================================");
writer.write(String.format("<br/>권한이 없습니다.<br/>"));
writer.write("================================================================");
writer.close();
return;
}
/**
*
*/
//DB 조회
XitMap xitMap = xitTestService.findTest();
/**
*
*/
resp.setCharacterEncoding("UTF-8");
resp.setContentType("text/html charset=UTF-8");
Writer writer = resp.getWriter();
writer.write("================================================================");
writer.write(String.format("<br/>조회 테스트 결과:::::::%s<br/>", xitMap.toString()));
writer.write("================================================================");
writer.close();
}
/**
* <pre> : </pre>
* @param resp
* @throws IOException void
* @author:
* @date: 2020. 3. 20.
*/
@RequestMapping(name = "", value="case2")
public void case2(HttpServletResponse resp) throws IOException {
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
if (!isAuthenticated) {
resp.setCharacterEncoding("UTF-8");
resp.setContentType("text/html charset=UTF-8");
Writer writer = resp.getWriter();
writer.write("================================================================");
writer.write(String.format("<br/>권한이 없습니다.<br/>"));
writer.write("================================================================");
writer.close();
return;
}
// try {
xitTestService.transactionTest();
// } catch (Exception e) {
// resp.setCharacterEncoding("UTF-8");
// resp.setContentType("text/html charset=UTF-8");
// Writer writer = resp.getWriter();
// writer.write("================================================================");
// writer.write(String.format("<br/>처리 도중 error 발생.<br/>"));
// writer.write(String.format("<br/>error details...-> %s<br/>", e.getMessage()));
// writer.write("================================================================");
// writer.close();
// }
}
/**
* <pre> : </pre>
* @param resp
* @throws IOException void
* @author:
* @date: 2020. 3. 20.
*/
@RequestMapping(name = "", value="case3")
public void case3(HttpServletResponse resp) throws IOException {
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
if (!isAuthenticated) {
resp.setCharacterEncoding("UTF-8");
resp.setContentType("text/html charset=UTF-8");
Writer writer = resp.getWriter();
writer.write("================================================================");
writer.write(String.format("<br/>권한이 없습니다.<br/>"));
writer.write("================================================================");
writer.close();
return;
}
try {
xitTestService.transactionOfServiceChainTest();
} catch (Exception e) {
resp.setCharacterEncoding("UTF-8");
resp.setContentType("text/html charset=UTF-8");
Writer writer = resp.getWriter();
writer.write("================================================================");
writer.write(String.format("<br/>처리 도중 error 발생.<br/>"));
writer.write(String.format("<br/>error details...-> %s<br/>", e.getMessage()));
writer.write("================================================================");
writer.close();
throw new RuntimeException(e);
}
}
/**
* <pre> : tiles </pre>
* @param resp
* @throws IOException void
* @author:
* @date: 2020. 3. 20.
*/
@RequestMapping(name = "", value="case4")
public String case4(@RequestParam(name="tiles", required=false, defaultValue="") String tiles) throws IOException {
switch (tiles.toUpperCase()) {
case "N":
return TEST_JSP_PATH+"test"+TILES_TYPE.NONE.getVal();
default:
return TEST_JSP_PATH+"test";
}
}
/**
* <pre> :
* - .
* </pre>
* @param resp
* @throws IOException void
* @author:
* @date: 2020. 4. 29.
*/
@RequestMapping(name = "", value="case5")
public void case5(HttpServletResponse resp
, @RequestParam(name="trget", required=false, defaultValue="one") String trget
, @RequestParam(name="trgetId", required=false, defaultValue="") String trgetId
) throws IOException {
List<XitUserInfoVO> listUserInfo = null;
try {
XitUserInfoVO vo = new XitUserInfoVO();
if("all".equalsIgnoreCase(trget))
listUserInfo = xitFrameCrudService.findXitUserInfos(vo);
else {
if(XitCmmnUtil.isEmpty(trgetId))
throw new RuntimeException("사용자ID는 필수조건 입니다.");
vo.setUserId(trgetId);
listUserInfo = xitFrameCrudService.findXitUserInfos(vo);
}
for(XitUserInfoVO userInfoVO : listUserInfo) {
String newPassword = XitScrtyUtil.encryptPassword("1", userInfoVO.getUserId());
vo = new XitUserInfoVO();
vo.setUserId(userInfoVO.getUserId());
vo.setPasswd(newPassword);
xitFrameCrudService.modifyXitUserInfo(vo);
}
} catch (Exception e) {
resp.setCharacterEncoding("UTF-8");
resp.setContentType("text/html charset=UTF-8");
Writer writer = resp.getWriter();
writer.write("================================================================");
writer.write(String.format("<br/>처리 도중 error 발생.<br/>"));
writer.write(String.format("<br/>error details...-> %s<br/>", e.getMessage()));
writer.write("================================================================");
writer.close();
return;
}
resp.setCharacterEncoding("UTF-8");
resp.setContentType("text/html charset=UTF-8");
Writer writer = resp.getWriter();
writer.write("================================================================");
writer.write(String.format("<br/>처리 결과:::::::%s건의 사용자 비밀번호 초기화 완료<br/>", listUserInfo.size()));
writer.write("================================================================");
writer.close();
}
/**
* <pre> : tui grid </pre>
* @param resp
* @throws IOException void
* @author:
* @date: 2020. 5. 17.
*/
@RequestMapping(name = "", value="case6")
public String case6(HttpServletResponse resp, @RequestParam(name="tiles", required=false, defaultValue="") String tiles) throws IOException {
switch (tiles.toUpperCase()) {
case "N":
return TEST_JSP_PATH+"TuiGrid"+TILES_TYPE.NONE.getVal();
default:
return TEST_JSP_PATH+"TuiGrid";
}
}
/**
* <pre> : tui grid </pre>
* @return
* @throws IOException Map<String,Object>
* @author:
* @date: 2020. 5. 17.
*/
@RequestMapping(name = "", value="case7")
@ResponseBody
public Map<String, Object> case7(@RequestParam Map<String, String> m) throws IOException {
/**
*
*/
List<XitUserInfoVO> list = xitFrameCrudService.findXitUserInfos(new XitUserInfoVO());
/**AA
*
*/
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("data", list);
resultMap.putAll(m);
return resultMap;
}
/**
* <pre> : insert </pre>
* @param m
* @return
* @throws IOException Map<String,Object>
* @author:
* @date: 2021. 1. 17.
*/
@RequestMapping(name = "", value="case8")
@ResponseBody
public Map<String, Object> case8(@RequestParam Map<String, String> m) throws IOException {
/**
*
*/
int dataSize = XitCmmnUtil.isEmpty(m.get("dataSize"))?0:Integer.parseInt(m.get("dataSize"));
String type = "unknown";
int result = 0;
long startTime = System.currentTimeMillis();
switch (m.get("type")) {
case "single":
case "1":
//single insert SQL 사용
type = "Single";
result = xitTestService.insertBatchTestBySingle(dataSize);
break;
case "bulk":
case "2":
//foreach insert SQL 사용
type = "Bulk";
result = xitTestService.insertBatchTestByBulk(dataSize);
break;
default:
//single insert SQL 사용
type = "Single";
result = xitTestService.insertBatchTestBySingle(dataSize);
break;
}
long endTime = System.currentTimeMillis();
/**
*
*/
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("message", String.format("%s 타입으로 총 %d건 등록 %d초 소요", type, result, (endTime-startTime)/1000 ));
return resultMap;
}
@RequestMapping(name = "", value="case9")
public void case9(@RequestParam Map<String, String> m, HttpServletResponse response) throws IOException {
final String PATH = "C:/xit/test/";
final String FILE_NAME = "api.log";
printLog(PATH, FILE_NAME, "hahaha");
printLog(PATH, FILE_NAME, "kkkkkk");
printLog(PATH, FILE_NAME, "hohoho");
downloadLog(response, PATH+FILE_NAME);
}
/**
* <pre> : </pre>
* @param m
* @param response
* @author:
* @throws Exception
* @date: 2021. 9. 24.
*/
@RequestMapping(name = "", value="case10")
public String case10(HttpServletRequest request, HttpServletResponse response, ModelMap model) throws Exception {
response.setHeader("Content-disposition", "attachment; filename=" + XitCmmnUtil.getFileNameForDownload(request, "엑셀파일 저장 테스트.xlsx"));
StringBuffer columns = new StringBuffer(); //jsonArray 포맷 String으로 작성
columns.append("[")
.append("{\"title\" : \"컬럼1\", \"name\" : \"col1\"}")
.append(",{\"title\" : \"컬럼2\", \"name\" : \"col2\"}")
.append(",{\"title\" : \"컬럼3\", \"name\" : \"col3\"}")
.append(",{\"title\" : \"컬럼4\", \"name\" : \"col4\"}")
.append("]");
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); //contents
Map<String, Object> row = new HashMap<String, Object>();
row.put("col1", 123); row.put("col2", "2021-09-21"); row.put("col3", "123,456,789" ); row.put("col4", "abc");
list.add(row);
row = new HashMap<String, Object>();
row.put("col1", 456); row.put("col2", "2021-09-22"); row.put("col3", "123,456,789.22"); row.put("col4", "가나다");
list.add(row);
row = new HashMap<String, Object>();
row.put("col1", 789); row.put("col2", "2021-09-23"); row.put("col3", 123456789L ); row.put("col4", "0123456789");
list.add(row);
row = new HashMap<String, Object>();
row.put("col1", 012); row.put("col2", "2021-09-24"); row.put("col3", 123456789.44 ); row.put("col4", "010-1111-222");
list.add(row);
logger.debug("EXCEL LIST : " + list);
model.put("header", columns.toString());
model.put("contents", list);
return "excelView";
}
/**
* <pre> :
* - API .
* </pre>
* @param PATH (ex> C:/logs/ : /logs/)
* @param FILE_NAME (ex> api.log)
* @param MESSAGE
* @throws IOException void
* @author:
* @date: 2021. 1. 28.
*/
private void printLog(final String PATH, final String FILE_NAME, final String MESSAGE) throws IOException {
//디렉토리가 없으면.. 생성
File dir = new File(PATH);
if(!dir.isDirectory())
dir.mkdirs();
//로그 출력
SimpleDateFormat date = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
FileOutputStream fos = new FileOutputStream(PATH+FILE_NAME, true);
OutputStreamWriter osw = new OutputStreamWriter(fos, "UTF-8");
BufferedWriter writer = null;
try {
writer = new BufferedWriter(osw);
writer.write(String.format("%s LOG [%s]", date.format(new Date()), MESSAGE ));
writer.write("\r\n");
} catch (Exception e) {
e.printStackTrace();
} finally {
//BufferedWriter close..
if(writer != null) {
writer.close();
}
//OutputStreamWriter close..
if(osw != null) {
osw.close();
}
//FileOutputSteam close..
if(fos != null) {
fos.close();
}
}
}
private void downloadLog(HttpServletResponse response, String pathname) throws IOException {
File file = new File(pathname);
if (!file.exists()) {
throw new FileNotFoundException(pathname);
}
if (!file.isFile()) {
throw new FileNotFoundException(pathname);
}
response.setContentLength((int) file.length());
response.addHeader("Content-Disposition", "attachment;filename=" + file.getName() + ";");
FileInputStream fis = new FileInputStream(file);
OutputStream os = response.getOutputStream();
byte[] bytes = new byte[256];
int readBytes = 0;
while ((readBytes = fis.read(bytes, 0, bytes.length)) != -1) {
os.write(bytes, 0, readBytes);
}
os.flush();
}
}

@ -1,26 +1,12 @@
package kr.xit.fims.framework.biz.util; package kr.xit.fims.framework.biz.util;
import kr.xit.fims.biz.FimsConst;
import kr.xit.fims.biz.cmm.NtriDTO;
import kr.xit.fims.biz.ec.CctvCrackdownDTO;
import kr.xit.fims.framework.biz.cmm.CmmFileDTO;
import kr.xit.fims.framework.support.exception.BizRuntimeException; import kr.xit.fims.framework.support.exception.BizRuntimeException;
import kr.xit.fims.framework.support.util.Checks;
import kr.xit.fims.framework.support.util.CommUtils; import kr.xit.fims.framework.support.util.CommUtils;
import kr.xit.fims.framework.support.util.DateUtils;
import kr.xit.fims.framework.support.util.FileUtils;
import kr.xit.fims.framework.support.util.constants.MessageKey; import kr.xit.fims.framework.support.util.constants.MessageKey;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.io.RandomAccessFile; import java.io.RandomAccessFile;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
@Slf4j @Slf4j
public class ExtnlInterfaceUtils { public class ExtnlInterfaceUtils {

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.fims.framework.biz.cmm.dao.XitTestMapper">
<select id="findTest" resultType="xitMap">
/** findTest */
/** 조회 테스트 */
SELECT 'admin' AS "ID"
,'123' AS "PWD"
FROM DUAL
WHERE 1=#{param}
</select>
<insert id="addTest">
/** addTest */
/** 등록 테스트 */
INSERT INTO LETTNLOGINLOG(
LOG_ID
,CONECT_MTHD
,ERROR_OCCRRNC_YN
,ERROR_CODE
,CREAT_DT
)VALUES(
CONCAT('TEST_',LPAD((SELECT IFNULL(REPLACE(MAX(LOG_ID),'TEST_',''),0)+1 AS "LOG_ID" FROM LETTNLOGINLOG WHERE LOG_ID LIKE 'TEST_%') ,14 ,'0') )
,'I'
,'N'
,IFNULL(#{error_code}, '00')
,NOW()
)
</insert>
</mapper>
Loading…
Cancel
Save