示例#1
0
 public void EditMoney(int userId, decimal money)
 {
     SqlParameter[] pramsModify =
     {
         DALUtil.MakeInParam("@money", System.Data.SqlDbType.Decimal, 9, money),
     };
     Modify(pramsModify, userId);
 }
示例#2
0
 /// <summary>
 ///新增
 /// <summary>
 /// <param name="entity">增加的实体</param>
 /// <returns>成功返回自增ID</returns>
 public int Add(UserInfoEntity entity)
 {
     SqlParameter[] pramsAdd =
     {
         DALUtil.MakeInParam("@CreateTS", System.Data.SqlDbType.DateTime, 8, entity.CreateTS),
         DALUtil.MakeInParam("@money",    System.Data.SqlDbType.Decimal,  9, entity.money),
     };
     return(Add(pramsAdd));
 }
示例#3
0
 /// <summary>
 ///新增
 /// <summary>
 /// <param name="entity">增加的实体</param>
 /// <returns>成功返回自增ID</returns>
 public int Add(BetRecordEntity entity)
 {
     SqlParameter[] pramsAdd =
     {
         DALUtil.MakeInParam("@CreateTS",    System.Data.SqlDbType.DateTime,   8, entity.CreateTS),
         DALUtil.MakeInParam("@issueNo",     System.Data.SqlDbType.BigInt,     8, entity.issueNo),
         DALUtil.MakeInParam("@BetValue",    System.Data.SqlDbType.NVarChar, 100, entity.BetValue),
         DALUtil.MakeInParam("@ResultValue", System.Data.SqlDbType.NVarChar, 100, entity.ResultValue),
         DALUtil.MakeInParam("@BetAmount",   System.Data.SqlDbType.Int,        4, entity.BetAmount),
         DALUtil.MakeInParam("@Balance",     System.Data.SqlDbType.Decimal,    9, entity.Balance),
         DALUtil.MakeInParam("@isSuccess",   System.Data.SqlDbType.Int,        4, entity.isSuccess),
         DALUtil.MakeInParam("@UserID",      System.Data.SqlDbType.Int,        4, entity.UserID),
         DALUtil.MakeInParam("@WinStatu",    System.Data.SqlDbType.Decimal,    9, entity.WinStatu),
     };
     return(Add(pramsAdd));
 }
示例#4
0
 /// <summary>
 ///新增
 /// <summary>
 /// <param name="entity">增加的实体</param>
 /// <returns>成功返回自增ID</returns>
 public int Add(JJ_一分快三Entity entity)
 {
     SqlParameter[] pramsAdd =
     {
         DALUtil.MakeInParam("@CreateTS",  System.Data.SqlDbType.DateTime,   8, entity.CreateTS),
         DALUtil.MakeInParam("@D_Date",    System.Data.SqlDbType.Date,       3, entity.D_Date),
         DALUtil.MakeInParam("@issueNo",   System.Data.SqlDbType.BigInt,     8, entity.issueNo),
         DALUtil.MakeInParam("@openTime",  System.Data.SqlDbType.VarChar,  100, entity.openTime),
         DALUtil.MakeInParam("@daxiao",    System.Data.SqlDbType.NVarChar,  10, entity.daxiao),
         DALUtil.MakeInParam("@danshuang", System.Data.SqlDbType.NVarChar,  10, entity.danshuang),
         DALUtil.MakeInParam("@Value_1",   System.Data.SqlDbType.Int,        4, entity.Value_1),
         DALUtil.MakeInParam("@Value_2",   System.Data.SqlDbType.Int,        4, entity.Value_2),
         DALUtil.MakeInParam("@Value_3",   System.Data.SqlDbType.Int,        4, entity.Value_3),
         DALUtil.MakeInParam("@Count",     System.Data.SqlDbType.Int,        4, entity.Count),
         DALUtil.MakeInParam("@DXGroup",   System.Data.SqlDbType.Int,        4, entity.DXGroup),
         DALUtil.MakeInParam("@DSGroup",   System.Data.SqlDbType.Int,        4, entity.DSGroup),
     };
     return(Add(pramsAdd));
 }
示例#5
0
        /// <summary>
        /// 执行下级分类
        /// </summary>
        private void GoChildGategory(long pid, int level)
        {
            try
            {
                ApiResult entity = apiClient.GetCategoryID(pid);
                Thread.Sleep(300);
                if (entity == null)
                {
                    KeyEntity keyEntity = keyList.Dequeue();
                    apiClient = new Common.APIClient(keyEntity.AppKey, keyEntity.SecretKey);
                    entity    = apiClient.GetCategoryID(pid);
                }
                CategoryInfoEntity categoryInfo_1688 = entity.categoryInfo[0];
                if (categoryInfo_1688 != null)
                {
                    if (categoryInfo_1688.categoryID > 0)
                    {
                        long parentID = categoryInfo_1688.parentIDs[0];
                        #region 保存到数据库

                        SqlParameter[] pramsWhere =
                        {
                            DALUtil.MakeInParam("@categoryID", SqlDbType.Int, 4, categoryInfo_1688.categoryID)
                        };
                        CategoryInfoEntity categoryEntity = DAL.CategoryInfoDAL.Get1("categoryID", pramsWhere);
                        if (categoryEntity != null && categoryEntity.categoryID > 0)
                        {
                            DAL.CategoryInfoDAL.Modify(categoryInfo_1688.categoryID, categoryInfo_1688.name, parentID, level, categoryInfo_1688.isLeaf);
                            msg("存在===" + categoryInfo_1688.name + "->【" + level + "级】" + categoryInfo_1688.name);
                        }
                        else
                        {
                            DAL.CategoryInfoDAL.Add(categoryInfo_1688.categoryID, categoryInfo_1688.name, parentID, level, categoryInfo_1688.isLeaf);
                            msg("已添加===" + "->【" + level + "级】" + categoryInfo_1688.name);
                        }
                        #endregion
                    }

                    //执行子级查询
                    ChildCategorysEntity[] childCategorys = categoryInfo_1688.childCategorys;
                    if (childCategorys != null && childCategorys.Length > 0)
                    {
                        if (childCategorys != null && childCategorys.Length > 0)
                        {
                            foreach (ChildCategorysEntity item in childCategorys)
                            {
                                GoChildGategory(item.id, level + 1);
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                KeyEntity keyEntity = keyList.Dequeue();
                if (keyEntity != null)
                {
                    apiClient = new Common.APIClient(keyEntity.AppKey, keyEntity.SecretKey);
                    GoChildGategory(pid, level);
                }
                else
                {
                    msg("-----------没有可用账号");
                }
            }
        }