日期:2014-05-17 浏览次数:21054 次
paramMap.put("groupId", groupId);
paramMap.put("fromIndex", page.getFromIndex());
paramMap.put("pageSize",page.getPageSize());
<!-- 根据用户组id查询该组下的所有用户 -->
<select id="selectUserByGroupId" parameterClass="java.util.Map" resultMap="resultUsers">
SELECT
a.USER_ID,
a.LOGIN_NAME,
a.SHOW_NAME,
a.PASS_WORD,
a.CREATE_TIME,
a.GROUP_ID,
a.ADMIN_FLG,
b.ID,
b.GROUP_NAME,
b.DISPLAY_ORDER,
b.HIDE_FLG
FROM
table_user AS a
LEFT JOIN
table_group AS b
ON
b.ID = a.GROUP_ID
WHERE
a.GROUP_ID = #groupId#
ORDER BY
a.USER_ID DESC
<dynamic>
<isNotNull property="fromIndex">
<isNotNull property="pageSize">
LIMIT #fromIndex# , #pageSize#
</isNotNull>
</isNotNull>
</dynamic>
</select>
org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; --- The error occurred while applying a parameter map. --- Check the Users.selectUserByGroupId-InlineParameterMap. --- Check the parameter mapping for the 'groupId' property. --- Cause: java.lang.NullPointerException; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred while applying a parameter map. --- Check the Users.selectUserByGroupId-InlineParameterMap. --- Check the parameter mapping for the 'groupId' property. --- Cause: java.lang.NullPointerException org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:124)