ibatis2动态表名

Map<String,Object> params = new HashMap<String,Object>();  
        params.put("tableName", tableName);  
        params.put("sidFieldName", sidFieldName);  
        params.put("lastDateFiledName", lastDateFiledName);  
        params.put("serviceDateFiledName", serviceDateFiledName);  
        params.put("uidFieldName", uidFieldName);  
        params.put("1", userType);  
        params.put("2", uid);  
 
getSqlMapClientTemplate().update("updateUserType" , params); 


<update id="updateUserType" parameterClass="map"> 
   <![CDATA[ 
     update /*99*/ $tableName$ SET $sidFieldName$ = #1# , $lastDateFiledName$ = sysdate,$serviceDateFiledName$ = sysdate WHERE $uidFieldName$ = #2# 
   ]]> 
</update>

你可能感兴趣的:(ibatis)