searchChannel
===
SELECT @pageTag(){  
		 id, orderchannel, channelname, channeltype, ifnull(newtype,'未知') as newtype, ifnull(smschannel,'未知') as smschannel, lower(conv(orderchannel, 10, 32)) sou, inserttime, updatetime
     @}

FROM tb_ordercenter_channel a

where 1=1

@if(!isEmpty(channelname)){
    and a.channelname like #'%'+channelname+'%'#
@}

@if(!isEmpty(sou)){
    and b.orderchannel = conv(sou, 32, 10)
@}
@if(!isEmpty(newtype)){
    and b.newtype = #newtype#
@}
 order by orderchannel asc

findAllChannel
===
select id, orderchannel, channelname, channeltype,newtype,smschannel, lower(conv(orderchannel, 10, 32)) sou, inserttime, updatetime
  from tb_ordercenter_channel a
 order by orderchannel asc


saveChannel
===
insert into tb_ordercenter_channel(id, orderchannel, channelname, channeltype,newtype,smschannel)
select max(id) + 1, max(orderchannel) + 1, #channelname#, #channeltype#,#newtype#,#smschannel# from tb_ordercenter_channel

updateChannel
===
update tb_ordercenter_channel 
set channelname=#channelname#,
    channeltype=#channeltype#,newtype=#newtype#,
    smschannel=#smschannel#
where id=#id#

findChannelById
===
select id, orderchannel, channelname, channeltype,ifnull(newtype,'未知') as newtype, ifnull(smschannel,'未知') as smschannel, lower(conv(orderchannel, 10, 32)) sou, inserttime, updatetime
from tb_ordercenter_channel
where id=#id#