相关文章推荐
拉风的领结  ·  api.weixin.qq.com:443 ...·  1 年前    · 
温柔的长颈鹿  ·  flutter - The ...·  1 年前    · 

mybatis调用如下:

<select id="getEcardInfo" parameterType="map" statementType="CALLABLE" resultMap="ecardMap">
call sp_card_rw
#{curDate,mode=IN,jdbcType=VARCHAR},
#{jylx,mode=IN,jdbcType=VARCHAR},
#{organNo,mode=IN,jdbcType=VARCHAR},
#{cardNo,mode=IN,jdbcType=VARCHAR},
#{jmkh,mode=IN,jdbcType=VARCHAR},
#{djjf,mode=IN,jdbcType=NUMERIC},
#{xfe,mode=IN,jdbcType=NUMERIC},
#{yhe,mode=IN,jdbcType=NUMERIC},
#{jye,mode=IN,jdbcType=NUMERIC},
#{jh,mode=IN,jdbcType=VARCHAR},
#{xph,mode=IN,jdbcType=VARCHAR},
#{zy,mode=IN,jdbcType=VARCHAR}
</select>

ecardMap结果集如下:

<resultMap id="ecardMap" type="map">
<result property="flag" column="FLAG" javaType="Integer" jdbcType="SMALLINT"/>
<result property="msg" column="MSG" javaType="String" jdbcType="VARCHAR"/>
<result property="cardNo" column="KH" javaType="String" jdbcType="VARCHAR"/>
<result property="accountBalance" column="YE" javaType="Double" jdbcType="DECIMAL"/>
<result property="pointFlag" column="JFBJ" javaType="String" jdbcType="VARCHAR"/>
<result property="czbj" column="CZBJ" javaType="String" jdbcType="VARCHAR"/>
<result property="syzt" column="SYZT" javaType="Integer" jdbcType="SMALLINT"/>
<result property="lxid" column="LXID" javaType="Integer" jdbcType="SMALLINT"/>
<result property="lxmc" column="LXMC" javaType="String" jdbcType="VARCHAR"/>
<result property="fkrq" column="fkrq" javaType="java.util.Date" jdbcType="TIMESTAMP"/>
<result property="sxrq" column="sxrq" javaType="java.util.Date" jdbcType="TIMESTAMP"/>
<result property="point" column="JF" javaType="Double" jdbcType="DECIMAL"/>
<result property="xfe" column="XFE" javaType="Double" jdbcType="DECIMAL"/>
<result property="sr" column="SR" javaType="java.util.Date" jdbcType="TIMESTAMP"/>
<result property="xb" column="XB" javaType="String" jdbcType="VARCHAR"/>
<result property="hymc" column="HYMC" javaType="String" jdbcType="VARCHAR"/>
</resultMap>

syabse存储过程内容如下:

CREATE  PROCEDURE sp_card_rw( @rq smalldatetime,@jylx char(1),@fdbh char(4),@kh varchar(20),@jmkh varchar(40),@djjf decimal(12,2),
@xfe decimal(12,2),@yhe decimal(12,2),@jye decimal(12,2),@jh char(4),@xph char(8),@zy varchar(50
))
AS
BEGIN
declare @lxmc varchar(20),@jfbj char(1),@xb char(2),@hymc varchar(50),@czbj char(1),@flag char(1),
@zkbj char(1),@mkh varchar(20),@lxid smallint,@syzt smallint,@fkrq smalldatetime,@ye decimal(12,2),


@sxrq smalldatetime,@sr smalldatetime,@jf decimal(12,2),@msg varchar(100),@qybh char(6),@brye decimal(12,2),
@hybh varchar(20),@rhfs smallint,@bj smallint,@lx smallint ,@oldlxid smallint,@jllx smallint,
@yhybh varchar(
20),@count int,@ysyzt smallint,@hyid int,@khid int,@rq1 smalldatetime

select @flag='1',@msg='执行成功'
if @jylx='3'
begin
if exists (select * from icczmx where kh=@kh )
select @kh=kh,@ye=fxje from icczmx where kh=@kh
else if exists(select * from ickzd where kh=@kh )
select @kh=kh,@ye=qcje + fxje - ssje from ickzd where kh=@kh
else
begin


select @flag='2',@msg='执行失败'
select @flag,@msg,@kh,@jfbj,@czbj,@syzt,@lxid,@lxmc,@fkrq,@sxrq,@jf,@ye,@xfe,@sr,@xb,@hymc
return
end
end
select @flag,@msg,@kh,@jf
bj,@czbj,@syzt,@lxid,@lxmc,@fkrq,@sxrq,@jf,@ye,@xfe,@sr,@xb,@hymc
END