mysql 脚本

CREATE  PROCEDURE `insertMenu14`()
BEGIN
	DECLARE
		menuCount INT;
	DECLARE
		midStr VARCHAR(64);
	SELECT
		count( 1 ) INTO menuCount 
	FROM
		sys_menu 
	WHERE
		MenuNo = ‘MeiTuanMarket‘;
	SELECT
		id INTO midStr 
	FROM
		sys_menu 
	WHERE
		MenuNo = ‘Market‘;
	IF
		menuCount = 0 THEN
			INSERT INTO `sys_menu` (`ID`, `ParentId`, `MenuNo`, `MenuName`, `MenuType`, `MenuIcon`, `LinkAddr`, `Target`, `SortIndex`, `IsDelete`, `IsEnabled`, `IsShow`, `UpdateTime`, `Extend`, `CreateTime`) VALUES (‘2a63795c-6993-40d6-8933-080625ff1f3b‘, ‘f5519af0-69ea-4c4e-aa1b-bdc1a081ec47‘, ‘MeiTuanMarket‘, ‘美团营销活动‘, ‘1‘, NULL, NULL, NULL, ‘20‘, b‘0‘, b‘1‘, b‘1‘, NOW(), NULL, NOW());
INSERT INTO `sys_menu` (`ID`, `ParentId`, `MenuNo`, `MenuName`, `MenuType`, `MenuIcon`, `LinkAddr`, `Target`, `SortIndex`, `IsDelete`, `IsEnabled`, `IsShow`, `UpdateTime`, `Extend`, `CreateTime`) VALUES (‘7c79f22d-9d9f-4f45-bc39-9afb43b6b8be‘, ‘2a63795c-6993-40d6-8933-080625ff1f3b‘, ‘MarketVShop-MeiTuanMarket-MarketLog‘, ‘活动参与记录‘, ‘1‘, NULL, ‘/MarketVShop/MeiTuanMarket/MarketLog‘, ‘_self‘, ‘2‘, b‘0‘, b‘1‘, b‘1‘, NOW(), NULL, NOW());
INSERT INTO `sys_menu` (`ID`, `ParentId`, `MenuNo`, `MenuName`, `MenuType`, `MenuIcon`, `LinkAddr`, `Target`, `SortIndex`, `IsDelete`, `IsEnabled`, `IsShow`, `UpdateTime`, `Extend`, `CreateTime`) VALUES (‘b6229d83-5b8f-42c4-90fb-7c3a360b88fa‘, ‘2a63795c-6993-40d6-8933-080625ff1f3b‘, ‘MarketVShop-MeiTuanMarket-Index‘, ‘活动配置‘, ‘1‘, NULL, ‘/MarketVShop/MeiTuanMarket/Index‘, ‘_self‘, ‘1‘, b‘0‘, b‘1‘, b‘1‘, NOW(), NULL, NOW());
		
	END IF;
END

call insertMenu14()

  

mysql 脚本

上一篇:js ... 使用


下一篇:利用badboy进行脚本录制