//一般存储过程调用方式 mybatis
<select id="findTimeVague" resultMap="cqsfMap" statementType="CALLABLE" >
call cqsfFindTimeVague(#{pageSize},#{page},#{day_only},#{hour_only},#{address_name},#{search});
</select>
//带有out和in的存储过程调用方式
<select id="findAllCount" resultMap="cqsfMap" parameterType="java.util.HashMap" statementType="CALLABLE">
call cqsfFindAllCount(#{count,mode=OUT,jdbcType=INTEGER,javaType=java.lang.Integer})
</select>
//dao层
List<Cqsfmodel> findAllCount(Map<String, Object> map);
//service层
@Override
public List<Cqsfmodel> findAllCount(Map<String,Object> map) {
return cqsfDao.findAllCount(map);
}
//controller
Map<String,Object> map = new HashMap<>();
List<Cqsfmodel> listCount = cqsfService.findAllCount(map);
Integer count = (Integer) map.get("count");```
来源:CSDN
作者:Cao6666666
链接:https://blog.csdn.net/Cao6666666/article/details/103920052