IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_update_weixin_menu]') AND type = 'P')
DROP PROCEDURE [dbo].[mps_update_weixin_menu]
GO
CREATE proc [dbo].[mps_update_weixin_menu]
@mn_id int,
@mn_title varchar(200),
@mn_link varchar(500),
@mn_sub int,
@mn_icon varchar(100),
@mn_iconover varchar(100),
@mn_order int
as
begin
set nocount on
update mps_menu set
mn_title= case when @mn_title='_none_' then mn_title  else @mn_title end,
mn_link= case when @mn_link='_none_' then mn_link  else @mn_link end,
mn_icon= case when @mn_icon='_none_' then mn_icon  else @mn_icon end,
mn_iconover= case when @mn_iconover='_none_' then mn_iconover  else @mn_iconover end,
mn_order= case when @mn_order=-999999999 then mn_order  else @mn_order end,
mn_sub= case when @mn_sub=-999999999 then mn_sub  else @mn_sub end
where mn_id=@mn_id
end