赞
踩
v_sqltext := 'select e.card_type as "cardType",
case
when e.card_type=to_char(''100'') then to_char(''获得卡片'')
when e.card_type=to_char(''101'') then to_char(''购买'')
when e.card_type=to_char(''102'') then to_char(''查看卡密'')
when e.card_type=to_char(''103'') then to_char(''解绑'')
when e.card_type=to_char(''104'') then to_char(''送出'')
when e.card_type=to_char(''105'') then to_char(''取消赠送'')
when e.card_type=to_char(''106'') then to_char(''赠送退回'')
when e.card_type=to_char(''107'') then to_char(''获赠'')
when e.card_type=to_char(''108'') then to_char(''解绑找回'')
when e.card_type=to_char(''109'') then to_char(''提货申请'')
else to_char(''其它'') end "cardTypeName",
e.mark as "mark",
to_char(e.opt_date,''yyyy-mm-dd hh24:mi:ss'') as "optDate"
from (select d.*, rownum as rn
from (select ubcl.card_type,ubcl.mark,ubcl.opt_date
from xshe_user_band_card_log ubcl
where ubcl.user_id =' || v_user_id || 'and ubcl.card_no =''' ||v_card_no ||'''and ubcl.status = 1 order by ubcl.opt_date asc,ubcl.id asc
) d
where rownum <=' || v_end_rownum || ') e
where rn >' ||v_begin_rownum;--update huzhiyang 2019-10-14 10:38:47 ,卡号为字符串
--执行SQL语句并返回josn_list数据
jl_card_list :=json_dyn.executeList(v_sqltext);--拼接字符串时注意引号数量
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。