parameterType!!!

This commit is contained in:
Kane Wang 2023-07-30 20:07:59 +08:00
parent 090a551066
commit 8fd60d6b24
5 changed files with 14 additions and 9 deletions

View File

@ -2,7 +2,7 @@
* @Author: Kane
* @Date: 2023-07-27 11:05:53
* @LastEditors: Kane
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/mapper/ArchivementMapper.java
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/mapper/ArchievementMapper.java
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.

View File

@ -13,5 +13,5 @@ import java.util.HashMap;
public interface RankingListMapper
{
public void getRankdingList( HashMap<String, Object> params );
public void getRankingList( HashMap<String, Object> params );
}

View File

@ -52,9 +52,13 @@ public class CallerRankingList
SqlSession session = MybatisUtils.getSqlSession();
RankingListMapper mapper = session.getMapper(RankingListMapper.class);
HashMap<String,Object> params = new HashMap<>(5);
HashMap<String,Object> params = new HashMap<>();
mapper.getRankdingList(null);
params.put("a_department_code", departmentCode);
params.put("a_year", year);
params.put("a_month", month);
mapper.getRankingList(params);
ArrayList<CallerRankingItem> attachingRateRankingList = (ArrayList<CallerRankingItem>)params.get("a_attaching_ranking_list");
ArrayList<CallerRankingItem> renewalRateList = (ArrayList<CallerRankingItem>)params.get("a_renewal_ranking_list");

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cpic.xim.mybatis.mapper.RankingListMapper">
<select id="getRankdingList" statementType="CALLABLE" parameterMap="java.util.HashMap">
<select id="getRankingList" statementType="CALLABLE" parameterType="java.util.HashMap">
call telsale_archievement_pkg.caller_arch_ranking_list(
#{a_department_code,mode=IN,jdbcType=VARCHAR},
#{a_year,mode=IN,jdbcType=VARCHAR},
@ -10,12 +10,12 @@
#{a_renewal_ranking_list,mode=OUT,jdbcType=CURSOR, resultMap=RenewalRateRankingMap})
</select>
<resultMap id="AttachingRateRankingMap" type="CallerRankingItem">
<id property="index" column="rownum" jdbcType="Integer" javaType="int"/>
<id property="index" column="rownum" jdbcType="INTEGER" javaType="int"/>
<result property="callerName" column="caller_name" jdbcType="VARCHAR" javaType="String"/>
<result property="appraiseValue" column="attaching_rate" jdbcType="VARCHAR" javaType="String"/>
</resultMap>
<resultMap id="RenewalRateRankingMap" type="CallerRankingItem">
<id property="index" column="rownum" jdbcType="Integer" javaType="int"/>
<id property="index" column="rownum" jdbcType="INTEGER" javaType="int"/>
<result property="callerName" column="caller_name" jdbcType="VARCHAR" javaType="String"/>
<result property="appraiseValue" column="renewal_rate" jdbcType="VARCHAR" javaType="String"/>
</resultMap>

View File

@ -24,5 +24,6 @@
<mappers>
<!-- <mapper resource="mybatis/mapper/StaffMapper.xml" /> -->
<mapper resource="mybatis/mapper/ArchievementMapper.xml" />
<mapper resource="mybatis/mapper/RankingListMapper.xml" />
</mappers>
</configuration>