保存进度!
This commit is contained in:
parent
ada65278a1
commit
0875919b5f
|
@ -20,14 +20,14 @@ import org.apache.ibatis.session.SqlSessionFactoryBuilder;
|
|||
public class MybatisUtils
|
||||
{
|
||||
private static HashMap<String, SqlSession> SessionMap = new HashMap<>();
|
||||
|
||||
private static String DEFAULT_CONFIGFILE = "mybatis/mybatis-config.xml";
|
||||
/**
|
||||
*
|
||||
* @param configFile
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
public static SqlSession getSqlSession(String configFile )
|
||||
public static SqlSession getSqlSession(String configFile = "mybatis/mybatis-config.xml" )
|
||||
throws IOException
|
||||
{
|
||||
// 根据配置文件的路径,查找是否已经创建了对应的session
|
||||
|
|
|
@ -16,7 +16,9 @@ import java.sql.DriverManager;
|
|||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import com.cpic.xim.mybatis.mapper.RankingListMapper;
|
||||
import com.cpic.xim.mybatis.utils.MybatisUtils;
|
||||
import oracle.jdbc.OracleCallableStatement;
|
||||
import oracle.jdbc.OracleTypes;
|
||||
|
@ -51,6 +53,15 @@ public class CallerRankingList
|
|||
String yearRegx = "202[0-9]";
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue