//一般存储过程调用方式 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");```
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交