/// <summary>查询所有相关记录</summary> /// <param name="customTableName">自定义数据表名称</param> /// <param name="entityId">实体类标识</param> /// <param name="entityClassName">实体类名称</param> /// <returns>返回所有实例<see cref="IEntityClickInfo"/>的详细信息</returns> public IList <IEntityClickInfo> FindAllByEntityId(string customTableName, string entityId, string entityClassName, DataResultMapper mapper) { string whereClause = string.Format(" {0} = ##{1}## AND {2} = ##{3}## ORDER BY {4} DESC ", mapper["EntityId"].DataColumnName, entityId, mapper["EntityClassName"].DataColumnName, entityClassName, mapper["ModifiedDate"].DataColumnName); Dictionary <string, object> args = new Dictionary <string, object>(); args.Add("CustomTableName", StringHelper.ToSafeSQL(customTableName)); args.Add("DataColumnSql", StringHelper.ToSafeSQL(mapper.GetDataColumnSql())); args.Add("WhereClause", StringHelper.ToSafeSQL(whereClause)); args.Add("Length", 0); return(this.ibatisMapper.QueryForList <IEntityClickInfo>(StringHelper.ToProcedurePrefix(string.Format("{0}_FindAll", tableName)), args)); }
/// <summary>查询所有相关记录</summary> /// <param name="customTableName">自定义数据表名称</param> /// <param name="docToken">文档全局标识</param> /// <param name="mapper">数据结果映射器</param> /// <returns>返回所有实例<see cref="IEntityDocObjectInfo"/>的详细信息</returns> public IList <IEntityDocObjectInfo> FindAllByDocToken(string customTableName, string docToken, DataResultMapper mapper) { string whereClause = string.Format(" {0} = ##{1}## ORDER BY CreatedDate ", mapper["DocToken"].DataColumnName, docToken); Dictionary <string, object> args = new Dictionary <string, object>(); args.Add("CustomTableName", StringHelper.ToSafeSQL(customTableName)); args.Add("DataColumnSql", StringHelper.ToSafeSQL(mapper.GetDataColumnSql())); args.Add("WhereClause", StringHelper.ToSafeSQL(whereClause)); args.Add("Length", 0); return(ibatisMapper.QueryForList <IEntityDocObjectInfo>(StringHelper.ToProcedurePrefix(string.Format("{0}_FindAll", tableName)), args)); }