미사용 코드 제거(sample)

main
이범준 5 days ago
parent 2dd1e14f84
commit 69898de9c9

@ -1,12 +0,0 @@
package cfs.common.dao;
import java.util.HashMap;
import java.util.List;
import org.springframework.stereotype.Repository;
@Repository("cfsSampleDao")
public interface CfsSampleDao {
List<HashMap<String, Object>> findCfsSample();
}

@ -1,7 +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="cfs.common.dao.CfsSampleDao">
<select id="findCfsSample" resultType="java.util.LinkedHashMap">
SELECT * FROM BM_PROGRAM_AUTHORITY
</select>
</mapper>

@ -1,9 +0,0 @@
package cfs.common.service;
import java.util.HashMap;
import java.util.List;
public interface CfsSampleService {
List<HashMap<String, Object>> selectSampleList() throws Exception;
}

@ -1,24 +0,0 @@
package cfs.common.service.impl;
import java.util.HashMap;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import cfs.common.dao.CfsSampleDao;
import cfs.common.service.CfsSampleService;
@Service("cfsSampleService")
public class CfsSampleServiceImpl implements CfsSampleService {
@Resource(name = "cfsSampleDao")
private CfsSampleDao cfsSampleDao;
@Override
public List<HashMap<String, Object>> selectSampleList() throws Exception {
return cfsSampleDao.findCfsSample();
}
}

@ -1,47 +0,0 @@
package cfs.common.web;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import cfs.common.service.CfsSampleService;
import cfs.common.util.Result;
@Controller
public class CfsSampleController {
protected Logger logger = LoggerFactory.getLogger(this.getClass());
@Resource(name = "cfsSampleService")
private CfsSampleService cfsSampleService;
@RequestMapping(value="/cfs/common/sample", method=RequestMethod.POST)
public @ResponseBody Map<String, Object> searchMenu(@RequestBody Map<String, Object> param) {
Map<String, Object> rMap = new HashMap<String, Object>();
rMap.put("MSG","sample");
Result result = new Result();
try {
List<HashMap<String, Object>> rList = (List<HashMap<String, Object>>) cfsSampleService.selectSampleList();
for(HashMap<String, Object> rMapItem : rList) {
System.out.println(rMapItem.toString());
}
}catch(RuntimeException e) {
result.setErrorMsg(Result.STATUS_ERROR, Result.STATUS_ERROR_MESSAGE);
} catch (Exception e) {
result.setErrorMsg(Result.STATUS_ERROR, Result.STATUS_ERROR_MESSAGE);
}
return rMap;
}
}
Loading…
Cancel
Save