http://www.javashuo.com/article/p-wlvwcknf-do.htmlhtml
public int update(MappedStatement ms, Object parameter) throws SQLException { ErrorContext.instance().resource(ms.getResource()).activity("executing an update").object(ms.getId()); if (closed) throw new ExecutorException("Executor was closed."); //清理緩存 clearLocalCache(); return doUpdate(ms, parameter); }
public int update(MappedStatement ms, Object parameterObject) throws SQLException { //清理緩存,而且!isselect語句的flushcache都是默認爲true的。 flushCacheIfRequired(ms); return delegate.update(ms, parameterObject); }
<select id="selectUserRoles" resultType="UserRoleVO"> select * from user_role a,role b where a.roleid = b.roleid and a.userid = #{userid} </select>