存储过程 正式课和迈向课的
2015-11-09 10:34
344 查看
ESI_QIANDAO4MAIXIANG
View Code
CREATE OR REPLACE PROCEDURE "ESI_MARKSTATE" (in_QRCode in varchar2, in_State in int, out_Flag out number, out_sqlcode out int, out_sqlerrm out varchar2) as /* 范 围:和微众对接 作 用:更新迈向签到课程的“有效到场/合格总裁 "1001:是;1002:否;1003:无名片"” 发生时间:微众调用我们更新签到接口后 最后更新:2015-05-08 pm */ the_State int; out_the_Flag int; begin if in_State = 0 then the_State := 1001; elsif in_State = 1 then the_State := 1002; elsif in_State = 2 then the_State := 1003; end if; begin select count(yckb_id) into out_the_Flag from tcu_yckb where yckb_int03 = 1001 -- 已签到 and qrcode = in_QRCode; if out_the_Flag = 0 then out_the_Flag := null; goto InvalidQrCode; end if; update tcu_yckb set yckb_int06 = the_State where qrcode = in_QRCode; out_Flag := 100; commit; exception when others then out_sqlcode := sqlcode; out_sqlerrm := sqlerrm; rollback; out_Flag := 999; end; <<InvalidQrCode>> if (out_Flag is null) then out_Flag := 105; -- 非法的签到二维码 out_sqlerrm := '不可识别的签到二维码,请确认。'; end if; end;
View Code
相关文章推荐
- VIM设置
- n的设计与实现
- QA Sign off template
- uml之Robustness Diagram
- poj 1328 贪心算法和快排(快排细节)
- MVC 和 MVVM
- 打开手机手电筒
- 《从零开始学Swift》学习笔记(Day 33)——属性观察者
- 阿里云服务器密码说明
- 异步任务执行之-队列
- iOS -程序启动原理和UIApplication的介绍
- 随笔
- nginx no-cache
- oracle 简单序列 自增 实例
- 各种加密算法的速度对比
- iOS -程序启动原理和UIApplication的介绍
- 手机端apk文件安装
- 11月初.wang域名总量TOP15:13家中国域名商上榜
- js页面效果
- 利用maven中resources插件的copy-resources目标进行资源copy和过滤