批量撤单
来自Fantasy的维基百科
恒朋批量撤单操作步骤待考证 2014-08-20
恒朋王竹清提供:
tb_ticket_info 要打的票表 --出票客户端直接从这里取票吗? TicketMatch 投进来的订单包含的具体比赛场次 match 比赛信息 22363 9 20140820 2014-08-20 17:53:00.000 日本天皇杯 1 20140820_3_011 广岛三箭:水户蜀葵 2014-08-20 17:52:00.000 2014-08-18 22:08:48.000 0 011 3 print_flag 各字段取值状态: 0,1,4是啥意思?
--decomplier看下处理逻辑 --查看下接口日志 (接口日志,打票客户端日志) --查看下主要的业务SQL --捕捉一下各类型,主要是delphi客户端的
declare @matchid varchar(10) set @matchid='22363' update Tb_Ticket_Info set print_flag=4
where id in ( select ticketSerialNo from TicketMatch with (nolock) where matchid=@matchid ) and print_Flag in (0,1) and id like '20140820%'
--单独的观察视角
select *
from MatchTicket b with(nolock) where b.anteTime between '2014-08-20 16:00:00' and '2014-08-20 16:40:00' and b.state <> 1 and b.anteCode like '%20140820*3*011%' ORDER BY b.anteTime
update MatchTicket
set printState=-1, state=-1, errMsg='投注失败。', errCode='2051'
where anteTime between '2014-08-20 16:00:00' and '2014-08-20 16:40:00' and state <> 1 and anteCode and anteCode like '%20140820*3*011%'