public class CorpLoginDaoImpl implements CorpLoginDao
{
/**
* 打印日志信息
*/
private static Log log = LogManager.getRuntimeLog();
/**
* 注入sqlMapClient
*/
private SqlMapClient sqlMapClient;
@Resource
public void setSqlMapClient(SqlMapClient sqlMapClient)
{
this.sqlMapClient = sqlMapClient;
}
/**
* 调用函数判断是否需要修改密码
* @param operateID 操作员账号
* @param operateType 操作员类型
* @param loginPwdTimeout 密码有效期
* @return int 返回值
* @throws SQLException 数据库异常
*/
private int isUpdatePwdByType(String operateID, String operateType, String loginPwdTimeout)
throws SQLException
{
//构造请求参数
Map<String, Object> reqmaps = new HashMap<String, Object>();
reqmaps.put("int_in_operateid", operateID);
reqmaps.put("int_in_operatortype", operateType);
reqmaps.put("int_in_loginPwdTimeout", loginPwdTimeout);
int resultCode = -1;
sqlMapClient.queryForObject("Operatorinfo.isUpdatePwd", reqmaps);
//result是返回值,其他的out为输出参数
resultCode = (Integer)reqmaps.get("result");
return resultCode;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap
PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
"http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="admin.backtone">
<!-- 字段映射关系 -->
<typeAlias alias="adminbacktoneinfo" type="com.huawei.crpp.business.admin.backtonemanage.BackToneInfo" />
<resultMap id="queryBackToneResultMap"class="adminbacktoneinfo">
<result property="backToneID"column="backtoneid" />
<result property="toneName"column="tonename" />
<result property="backToneCode"column="backtonecode" />
<result property="spID"column="spid" />
<result property="toneTypeID"column="tonetypeid" />
<result property="uploadDate"column="uploaddate" />
<result property="status"column="status" />
<result property="description"column="description" />
<result property="spName" column="spname" />
<result property="telphone" column="telphone" />
<result property="phoneNumber" column="phonenumber" />
<result property="clientLinkMan" column="clientlinkman" />
<result property="linkMan" column="linkman" />
</resultMap>
<parameterMap id="query_backtone" class="java.util.HashMap">
<!-- result是函数返回值,其他的out是输出参数 -->
<parameter property="result" jdbcType="ORACLECURSOR"
javaType="java.sql.ResultSet" mode="OUT" resultMap="queryBackToneResultMap"/>
<parameter property="i_toneName" jdbcType="VARCHAR"
javaType="java.lang.String" mode="IN"/>
<parameter property="i_spid" jdbcType="VARCHAR"
javaType="java.lang.String" mode="IN"/>
<parameter property="i_result" jdbcType="INTEGER"
javaType="java.lang.Integer" mode="OUT" />
<parameter property="i_tonetype" jdbcType="INTEGER"
javaType="java.lang.Integer" mode="IN" />
<parameter property="i_querytype" jdbcType="INTEGER"
javaType="java.lang.Integer" mode="IN" />
<parameter property="i_beginnum" jdbcType="INTEGER"
javaType="java.lang.Integer" mode="IN" />
<parameter property="i_endnum" jdbcType="INTEGER"
javaType="java.lang.Integer" mode="IN" />
<parameter property="i_count" jdbcType="INTEGER"
javaType="java.lang.Integer" mode="OUT" />
</parameterMap>
<procedure id="queryBackToneInfo" parameterMap="query_backtone">
<![CDATA[
{? = call f_query_backtone(?,?,?,?,?,?,?,?)}
]]>
</procedure>
</sqlMap>