select a.TradeType,a.TradeState,a.Pname,a.OutTradeNo,a.*,
(CASE a.TradeType when '1' then '充值' when '2' then '退款'when '3'then '撤销' end)交易类别,
(CASE a.TradeState when 'SUCCESS' then '成功' else '失败' end)交易状态,
(CASE a.PayMethod when 'WX_BAR' then '微信条码' when 'ALI_BAR' then '支付宝条码' when 'WX_QR' then '微信扫码' else '支付宝扫码'end)交易方式
from Pay_Transactions as a where Pname like '%黄%' order by a.CreateDate desc
转载于:https://www.cnblogs.com/Agreoself/p/10784377.html