<p>@Select('<script>
' +        '        SELECT * FROM (SELECT ID, USER_ID, MENU_ID, COUNT, CREATE_TIME, UPDATE_TIME
' +        '        FROM T_IAC_USER_ACTION
' +        '        WHERE USER_ID = #{id}
' +        '        <if test='!isAdministrator'>
' +        '        AND MENU_ID IN
' +        '        <foreach item='item' index='index' collection='userAssociatedMenuIdSet' open='(' separator=',' close=')'>
' +        '        #{item}
' +        '        </foreach>
' +        '        </if>
' +        '        ORDER BY COUNT)
' +        '        WHERE ROWNUM &lt;= 5
' +        '        </script>')
' +        'List<UserAction> getUserActionList(@Param('isAdministrator') boolean isAdministrator,
' +        '                                   @Param('id') String id,
' +        '                                   @Param('userAssociatedMenuIdSet') Set<String> userAssociatedMenuIdSet);</p>

原文地址: https://www.cveoy.top/t/topic/nw6W 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录