日期:2014-05-18 浏览次数:20864 次
<mapper namespace="cn.com.casking.statistics.dao.ReasonShowMybatisDao">
<resultMap type="cn.com.casking.statistics.domain.Reason" id="reasonMap">
<result property="id" column="ID"/>
<result property="organName" column="ORGAN_NAME"/>
<result property="praxisTitle" column="PRAXIS_TITLE"/>
<result property="subJectiveDesc" column="SUBJECTIVE_DESC"/>
</resultMap>
<select id="callResult" parameterType="java.util.HashMap" statementType="CALLABLE">
<![CDATA[
{call sp_query_que_sub_result(#{sqlparm,mode=IN,jdbcType=VARCHAR},#{outresult,mode=OUT,jdbcType=CURSOR,javaType=java.sql.ResultSet,resultMap=reasonMap})}
]]>
</select>
</mapper>
@MyBatisRepository
public interface ReasonShowMybatisDao {
void callResult(Map<String, Object> map);
}
@Component
@Transactional(readOnly = true)
public class ReasonShowService {
@Autowired
private ReasonShowMybatisDao reasonShowMybatisDao;
public void callResult(Map<String, Object> map){
reasonShowMybatisDao.callResult(map);
}
Map<String,Object> map= new HashMap<String,Object>();
map.put("sqlparm",sqlparm);
map.put("outresult",OracleTypes.CURSOR);
reasonShowService.callResult(map);//这句调用出错,报java.lang.nullpointerexception