存储过程:create or replace procedure USER_Recharge(in_uuid in varchar2,
in_dynamic_pwd in varchar2,
in_deviceid in varchar2,
in_charge_amount in number,
in_citycardid in varchar2,
in_membercardid in varchar2,
in_giftcardid in varchar2,
in_bankid in varchar2,
result_flag out number) is records_count number;
acct_balance number;
temp_re varchar2(64);
temp_cardid varchar2(32);
temp_state varchar2(2);begin select count(*)
into records_count
from USER_INFO
where UUID = in_uuid;
-- and DYNAMIC_PWD = in_dynamic_pwd; if records_count > 0 then
--??????????????,??????????
select nvl(AMOUNT, 0)
into acct_balance
from USER_INFO
where UUID = in_uuid
for update of AMOUNT; --??
update USER_INFO
set AMOUNT = acct_balance + in_charge_amount
where UUID = in_uuid;
--????
commit; --???????
if in_bankid <> '1' then
temp_re := '?????';
temp_cardid := in_bankid;
end if;
if in_citycardid <> '1' then
temp_re := '?????';
temp_cardid := in_citycardid;
end if;
if in_membercardid <> '1' then
temp_re := '???????';
temp_cardid := in_membercardid;
end if;
if in_giftcardid <> '1' then
temp_re := '?????';
temp_cardid := in_giftcardid;
end if;
if in_deviceid <> '12030008' then
temp_state := '1';
else
temp_state := '5';
end if; insert into ACOUNT_BALANCE_OPER
(UU_ID,
CARD_ID,
DEVICE_ID,
HANDLE_TYPE,
HANDLE_AMOUNT,
HANDLE_DATE,
R_STATE,
REMARK,
AC_BALANCE,
TRAN_SN)
values
(in_uuid,
temp_cardid,
in_deviceid,
temp_state,
in_charge_amount,
to_char(sysdate, 'yyyy-mm-dd hh24:mi:ss'),
'0',
temp_re,
acct_balance + in_charge_amount,
TRAN_SN.Nextval); --??????
update USER_INFO
set DYNAMIC_PWD = round(dbms_random.value(10000000, 99999999))
where UUID = in_uuid; result_flag := 0;
dbms_output.put_line('?????'); else
--?????,?????
insert into ACOUNT_BALANCE_OPER
(UU_ID,
CARD_ID,
DEVICE_ID,
HANDLE_TYPE,
HANDLE_AMOUNT,
HANDLE_DATE,
R_STATE,
REMARK,
AC_BALANCE,
TRAN_SN)
values
(in_uuid,
'0000000000000000',
in_deviceid,
'11',
in_charge_amount,
to_char(sysdate, 'yyyy-mm-dd hh24:mi:ss'),
'1',
'无此会员数据或动态密码校验错误',
acct_balance,
TRAN_SN.Nextval); result_flag := 1;
dbms_output.put_line('?????????????????????');
end if;
commit;
end USER_Recharge;编译报错:
PROCEDURE ZHONGYUE.USER_RECHARGE 编译错误错误:PLS-00103: 出现符号 "="在需要下列之一时:
( - + all case
mod new null <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
continue any avg count current max min prior some sql stddev
sum variance execute forall merge time timestamp interval
date <a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<一个带有字符集说明的可带引号的字符串文字>
<一个可带引号的 SQL 字符串> purge
行:60
文本:if in_deviceid <> '12030008' then
存储
in_dynamic_pwd in varchar2,
in_deviceid in varchar2,
in_charge_amount in number,
in_citycardid in varchar2,
in_membercardid in varchar2,
in_giftcardid in varchar2,
in_bankid in varchar2,
result_flag out number) is records_count number;
acct_balance number;
temp_re varchar2(64);
temp_cardid varchar2(32);
temp_state varchar2(2);begin select count(*)
into records_count
from USER_INFO
where UUID = in_uuid;
-- and DYNAMIC_PWD = in_dynamic_pwd; if records_count > 0 then
--??????????????,??????????
select nvl(AMOUNT, 0)
into acct_balance
from USER_INFO
where UUID = in_uuid
for update of AMOUNT; --??
update USER_INFO
set AMOUNT = acct_balance + in_charge_amount
where UUID = in_uuid;
--????
commit; --???????
if in_bankid <> '1' then
temp_re := '?????';
temp_cardid := in_bankid;
end if;
if in_citycardid <> '1' then
temp_re := '?????';
temp_cardid := in_citycardid;
end if;
if in_membercardid <> '1' then
temp_re := '???????';
temp_cardid := in_membercardid;
end if;
if in_giftcardid <> '1' then
temp_re := '?????';
temp_cardid := in_giftcardid;
end if;
if in_deviceid <> '12030008' then
temp_state := '1';
else
temp_state := '5';
end if; insert into ACOUNT_BALANCE_OPER
(UU_ID,
CARD_ID,
DEVICE_ID,
HANDLE_TYPE,
HANDLE_AMOUNT,
HANDLE_DATE,
R_STATE,
REMARK,
AC_BALANCE,
TRAN_SN)
values
(in_uuid,
temp_cardid,
in_deviceid,
temp_state,
in_charge_amount,
to_char(sysdate, 'yyyy-mm-dd hh24:mi:ss'),
'0',
temp_re,
acct_balance + in_charge_amount,
TRAN_SN.Nextval); --??????
update USER_INFO
set DYNAMIC_PWD = round(dbms_random.value(10000000, 99999999))
where UUID = in_uuid; result_flag := 0;
dbms_output.put_line('?????'); else
--?????,?????
insert into ACOUNT_BALANCE_OPER
(UU_ID,
CARD_ID,
DEVICE_ID,
HANDLE_TYPE,
HANDLE_AMOUNT,
HANDLE_DATE,
R_STATE,
REMARK,
AC_BALANCE,
TRAN_SN)
values
(in_uuid,
'0000000000000000',
in_deviceid,
'11',
in_charge_amount,
to_char(sysdate, 'yyyy-mm-dd hh24:mi:ss'),
'1',
'无此会员数据或动态密码校验错误',
acct_balance,
TRAN_SN.Nextval); result_flag := 1;
dbms_output.put_line('?????????????????????');
end if;
commit;
end USER_Recharge;编译报错:
PROCEDURE ZHONGYUE.USER_RECHARGE 编译错误错误:PLS-00103: 出现符号 "="在需要下列之一时:
( - + all case
mod new null <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
continue any avg count current max min prior some sql stddev
sum variance execute forall merge time timestamp interval
date <a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<一个带有字符集说明的可带引号的字符串文字>
<一个可带引号的 SQL 字符串> purge
行:60
文本:if in_deviceid <> '12030008' then
存储
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货