Пример #1
0
 /// <summary>
 /// 查询所有装备数据
 /// </summary>
 /// <returns></returns>
 public List <ItemsInfoBean> QueryAllData()
 {
     return(SQLiteHandle.LoadTableData <ItemsInfoBean>
                (ProjectConfigInfo.DATA_BASE_INFO_NAME, tableNameForMain,
                new string[] { tableNameForLeft, mLeftIntactTableName },
                new string[] { "id", "intact_id" },
                new string[] { "items_id", "intact_id" }));
 }
Пример #2
0
 /// <summary>
 /// 查询所有数据
 /// </summary>
 /// <returns></returns>
 public List <T> BaseQueryAllData <T>()
 {
     if (tableNameForMain == null)
     {
         LogUtil.LogError("查询数据失败,没有表名");
         return(null);
     }
     return(SQLiteHandle.LoadTableData <T>(ProjectConfigInfo.DATA_BASE_INFO_NAME, tableNameForMain));
 }
Пример #3
0
    /// <summary>
    /// 根据ID查询数据
    /// </summary>
    /// <param name="ids"></param>
    /// <returns></returns>
    public List <ItemsInfoBean> QueryDataByIds(long[] ids)
    {
        string[] leftTable  = new string[] { tableNameForLeft, mLeftIntactTableName };
        string[] mainKey    = new string[] { "id", "intact_id" };
        string[] leftKey    = new string[] { "items_id", "intact_id" };
        string[] colName    = new string[] { tableNameForMain + ".id" };
        string[] operations = new string[] { "IN" };
        string   values     = TypeConversionUtil.ArrayToStringBySplit(ids, ",");

        string[] colValue = new string[] { "(" + values + ")" };
        return(SQLiteHandle.LoadTableData <ItemsInfoBean>(ProjectConfigInfo.DATA_BASE_INFO_NAME, tableNameForMain, leftTable, mainKey, leftKey, colName, operations, colValue));
    }
Пример #4
0
 /// <summary>
 /// 链表查询所有数据
 /// </summary>
 /// <param name="leftId"></param>
 /// <returns></returns>
 public List <T> BaseQueryAllData <T>(string leftId)
 {
     if (tableNameForLeft == null)
     {
         LogUtil.LogError("查询数据失败,没有关联的副表");
         return(null);
     }
     return(SQLiteHandle.LoadTableData <T>
                (ProjectConfigInfo.DATA_BASE_INFO_NAME, tableNameForMain,
                new string[] { tableNameForLeft },
                new string[] { "id" },
                new string[] { leftId }));
 }
Пример #5
0
    public List <TextInfoBean> QueryDataForFirstOrderByFavorability(long characterId, int favorability)
    {
        GameConfigBean gameConfig = GameDataHandler.Instance.manager.GetGameConfig();

        tableNameForMain = "text_talk";
        tableNameForLeft = "text_talk_details_" + gameConfig.language;
        string[] leftTable  = new string[] { tableNameForLeft };
        string[] mainKey    = new string[] { "id" };
        string[] leftKey    = new string[] { "text_id" };
        string[] colName    = new string[] { tableNameForMain + ".user_id", tableNameForMain + ".text_order", tableNameForMain + ".condition_min_favorability", tableNameForMain + ".condition_max_favorability" };
        string[] operations = new string[] { "=", "=", "<=", ">" };
        string[] colValue   = new string[] { characterId + "", "1", favorability + "", favorability + "" };
        return(SQLiteHandle.LoadTableData <TextInfoBean>(ProjectConfigInfo.DATA_BASE_INFO_NAME, tableNameForMain, leftTable, mainKey, leftKey, colName, operations, colValue));
    }
Пример #6
0
 public List <T> BaseQueryData <T>(string leftId, string key, string operation, string value)
 {
     if (tableNameForMain == null)
     {
         LogUtil.LogError("查询数据失败,没有表名");
         return(null);
     }
     if (tableNameForLeft == null)
     {
         LogUtil.LogError("查询数据失败,没有关联的副表");
         return(null);
     }
     string[] leftTable  = new string[] { tableNameForLeft };
     string[] mainKey    = new string[] { "id" };
     string[] leftKey    = new string[] { leftId };
     string[] colName    = new string[] { key };
     string[] operations = new string[] { operation };
     string[] colValue   = new string[] { value };
     return(SQLiteHandle.LoadTableData <T>(ProjectConfigInfo.DATA_BASE_INFO_NAME, tableNameForMain, leftTable, mainKey, leftKey, colName, operations, colValue));
 }
Пример #7
0
 /// <summary>
 /// 查询所有场景数据
 /// </summary>
 /// <returns></returns>
 public List <UITextBean> QueryAllData()
 {
     return(SQLiteHandle.LoadTableData <UITextBean>(ProjectConfigInfo.DATA_BASE_INFO_NAME, mTableName, new string[] { mLeftTableName }, "id", new string[] { "text_id" }));
 }