IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_update_weixin_subgroup]') AND type = 'P')
DROP PROCEDURE [dbo].[mps_update_weixin_subgroup]
GO
-- =============================================
-- Author:<Author,,Name>
-- Create date: <Create Date,,>
-- Description:<Description,,>
-- =============================================
CREATE procedure [dbo].[mps_update_weixin_subgroup]
@mn_id int,
@mn_title varchar(200),
@mn_icon varchar(100),
@mn_layout varchar(10)
AS
BEGIN

SET NOCOUNT ON;

update mps_menu set mn_title = case when @mn_title='_none_' then mn_title else @mn_title end,
mn_icon = case when @mn_icon='_none_' then mn_icon else @mn_icon end,
mn_flag = case when @mn_layout='_none_' then mn_flag else REPLACE(REPLACE(mn_flag,'_s_','_'+@mn_layout+'_'),'_r_','_'+@mn_layout+'_') end
where mn_id=@mn_id

END