首先感谢网络上以为朋友。其实我不认识。看到他的博客才做出来。
http://lohasle.iteye.com/blog/1669879 他的地址。下面的是我一些简单拓展的
?
?
存储过程都是一样的,只是根据自己的喜好,可以用MAP或者JAVABEAN传递参数。
class="sql">-- --------------------------------------------------------------------------------
-- Routine DDL
-- Note: comments before and after the routine body will not be stored by the server
-- --------------------------------------------------------------------------------
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `selectCount`(
IN pcsId int,
IN drId int,
IN partnerId int,
IN customerId int,
OUT pcsCount int,
OUT drCount int
)
BEGIN
select count(md.id) into @pcsC from mdm_device md
left join mdm_device_security mds on mds.device_id = md.id
where m