ibatis动态传入表名、字段名

 java

    Map params = new HashMap();
        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);

 sqlmap.xml

 
    
  
 

你可能感兴趣的:(iBATIS,XML)