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

create PROCEDURE [dbo].[mps_new_weixin_submenuheader]  
@cmpid int,  
@roleid int,  
@headid int  
AS  
BEGIN  
   
 SET NOCOUNT ON;  
 insert into mps_menu(mn_cmpid,mn_flag,mn_roleid,mn_terminal,mn_title,mn_sub) values(@cmpid,'head_sub'+CONVERT(varchar,@headid),@roleid,1,'菜单名称',@headid);  
 select * from mps_menu where mn_id = @@IDENTITY  
END