IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_new_weixin_menuheader]') AND type = 'P')
DROP PROCEDURE [dbo].[mps_new_weixin_menuheader]
GO

CREATE procedure [dbo].[mps_new_weixin_menuheader]
@cmpid int,
@roleid int,
@stateid int
AS
BEGIN

SET NOCOUNT ON;

insert into mps_menu(mn_cmpid,mn_flag,mn_roleid,mn_terminal,mn_title) values(@cmpid,'head_state'+CONVERT(varchar,@stateid),@roleid,1,'菜单名称');
select * from mps_menu where mn_id = @@IDENTITY

END