Compare commits
No commits in common. "e436fbf89e0610e9261144aca0fb2b4216495c2e" and "a5b008f056f4970834dd523d6098c45993bc40d3" have entirely different histories.
e436fbf89e
...
a5b008f056
|
@ -20,14 +20,14 @@ import org.apache.ibatis.session.SqlSessionFactoryBuilder;
|
||||||
public class MybatisUtils
|
public class MybatisUtils
|
||||||
{
|
{
|
||||||
private static HashMap<String, SqlSession> SessionMap = new HashMap<>();
|
private static HashMap<String, SqlSession> SessionMap = new HashMap<>();
|
||||||
private static String DEFAULT_CONFIGFILE = "mybatis/mybatis-config.xml";
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param configFile
|
* @param configFile
|
||||||
* @return
|
* @return
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
public static SqlSession getSqlSession(String configFile = "mybatis/mybatis-config.xml" )
|
public static SqlSession getSqlSession(String configFile )
|
||||||
throws IOException
|
throws IOException
|
||||||
{
|
{
|
||||||
// 根据配置文件的路径,查找是否已经创建了对应的session
|
// 根据配置文件的路径,查找是否已经创建了对应的session
|
||||||
|
|
|
@ -16,9 +16,7 @@ import java.sql.DriverManager;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
|
||||||
import org.apache.ibatis.session.SqlSession;
|
import org.apache.ibatis.session.SqlSession;
|
||||||
import com.cpic.xim.mybatis.mapper.RankingListMapper;
|
|
||||||
import com.cpic.xim.mybatis.utils.MybatisUtils;
|
import com.cpic.xim.mybatis.utils.MybatisUtils;
|
||||||
import oracle.jdbc.OracleCallableStatement;
|
import oracle.jdbc.OracleCallableStatement;
|
||||||
import oracle.jdbc.OracleTypes;
|
import oracle.jdbc.OracleTypes;
|
||||||
|
@ -53,15 +51,6 @@ public class CallerRankingList
|
||||||
String yearRegx = "202[0-9]";
|
String yearRegx = "202[0-9]";
|
||||||
|
|
||||||
SqlSession session = MybatisUtils.getSqlSession(yearRegx);
|
SqlSession session = MybatisUtils.getSqlSession(yearRegx);
|
||||||
RankingListMapper mapper = session.getMapper(RankingListMapper.class);
|
|
||||||
HashMap<String,Object> params = new HashMap<>(5);
|
|
||||||
|
|
||||||
mapper.getRankdingList(null);
|
|
||||||
|
|
||||||
ArrayList<CallerRankingItem> attachingRateRankingList = (ArrayList<CallerRankingItem>)params.get("a_attaching_ranking_list");
|
|
||||||
ArrayList<CallerRankingItem> renewalRateList = (ArrayList<CallerRankingItem>)params.get("a_renewal_ranking_list");
|
|
||||||
|
|
||||||
rankingList = new CallerRankingList(departmentCode, yearRegx, monthRegx, attachingRateRankingList, renewalRateList);
|
|
||||||
|
|
||||||
return rankingList;
|
return rankingList;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue