PROCEDURE Logistics(p_order_id in varchar2,p_create_time in varchar2,p_order_from in varchar2,p_is_ec_protocol in varchar2,p_pay_status in number ,p_order_type in varchar2 ,p_tel in varchar2,p_pay_type in varchar2,p_order_fee in in number,p_account_name in varchar2,p_deal_memo in varchar2, p_deal_status in number, p_size in number,p_index in number,p_count out number,cur_out OUT T_CURSOR) is
v_sql varchar2(1000):='';
BEGIN
if(p_order_id<>'-1') then
v_sql:=v_sql||' and u.order_id='''||p_order_id||''' ';
end if;
if(p_create_time<>'-1') then
v_sql:=v_sql||' and (to_char(u.create_time,''yyyy-mm-dd'')= '''||p_create_time||''') ';
end if;
if(p_order_from<>'-1') then
v_sql:=v_sql||' and u.order_from='''||p_order_from||''' ';
end if;
if(p_is_ec_protocol<>'-1') then
v_sql:=v_sql||' and c.is_ec_protocol='''||p_is_ec_protocol||''' ';
end if;
if(p_tel<>'-1') then
v_sql:=v_sql||' and u.tel='''||p_tel||''' ';
end if;
if(p_order_type<>'-1') then
v_sql:=v_sql||' and u.order_type='''||p_order_type||''' ';
end if;
if(p_pay_type<>'-1') then
v_sql:=v_sql||' and u.pay_type='''||p_pay_type||''' ';
end if;
if(p_deal_status<>'-1') then
v_sql:=v_sql||' and u.order_status='''||p_deal_status||''' ';
end if;
OPEN cur_out FOR
pkg_common.tablePager('select u.order_id,to_char(create_time,''yyyy-mm-dd HH24:mi:ss'') as create_time,u.order_from,u.pay_status,u.order_type,u.tel,
u.pay_type,u.order_fee,floor(((sysdate-u.create_time) * 24)) as ordertime,c.IS_EC_PROTOCOL,u.DEAL_MEMO,u.ORDER_STATUS,u.ORDER_STATUS_ITEM
from TB_ORDER u
left join TB_ORDER_BINFO c
on u.order_id=c.order_id
where 1=1 '||v_sql||' ORDER BY order_id','',p_size,p_index+1,p_count);
END;
这个存储过程应该没有错吧,有的话,能不能把错误提示贴出来呢?