- UPDATE zanbao.t_order
- SET
- step = CASE stat
- WHEN '2' THEN '1'
- WHEN '4' THEN '2'
- END,
- sh_person = CASE stat
- WHEN '4' THEN '100006'
- ELSE sh_person
- END,
- sh_date = CASE stat
- WHEN '4' THEN NOW()
- ELSE sh_date
- END,
- sh_remarks = CASE stat
- WHEN '4' THEN ''
- ELSE sh_remarks
- END,
- qr_person = CASE stat
- WHEN '2' THEN '100006'
- ELSE qr_person
- END,
- qr_date = CASE stat
- WHEN '2' THEN NOW()
- ELSE qr_date
- END,
- qr_remarks = CASE stat
- WHEN '2' THEN ''
- ELSE qr_remarks
- END,
- stat = CASE stat
- WHEN '2' THEN '3'
- WHEN '4' THEN '5'
- END
- WHERE
- stat IN ('2' , '4')
- AND id = 'D201504090033'