<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.modules.system.mapper.UserClickMenuRecordMapper">

    <select id="selectTopMenu" resultType="org.springblade.modules.system.vo.UserClickMenuRecordVo">
        select b.*, sum(a.click_num) as click_num
        from user_click_menu_record a
                 inner join blade_menu b on a.menu_id = b.id
        where a.click_user_id = #{userId}
        group by a.menu_id,b.id
        order by click_num desc limit #{strips}
    </select>
</mapper>