Ejemplo n.º 1
0
        public string Execute(Hashtable params_ht)
        {
            Hashtable res = params_ht;

            if (res["UID"] == null || res["UID"].ToString().Trim().Length <= 0)
            {
                return(SiteHelper.GetJsonFromHashTable(null, "faild", "参数不完整"));
            }
            else
            {
                uid = res["UID"].ToString().Trim();
                UserInfoManager uim  = new UserInfoManager();
                DataTable       user = uim.GetUserInfoByUid(uid);
                if (user == null || user.Rows.Count <= 0)
                {
                    return(SiteHelper.GetJsonFromHashTable(null, "faild", "未找到用户信息"));
                }
                else
                {
                    decimal balance = 0.00m;
                    decimal.TryParse(user.Rows[0]["Balance"].ToString(), out balance);
                    decimal balance2 = 0.00m;
                    decimal.TryParse(user.Rows[0]["Balance2"].ToString(), out balance2);
                    user.Rows[0]["Balance"] = balance + balance2;
                    if (user.Rows[0]["UserType"].ToString() == UserType.OffDepositUser.GetHashCode().ToString())//免押金用户
                    {
                        SysSettingManager settingManager = new SysSettingManager();
                        string            depositMoney   = settingManager.GetValueByKey("GoldDepositAmount");
                        user.Rows[0]["Deposit"] = depositMoney;
                    }

                    Hashtable result = DataTableHelper.DataRowToHashTable(user.Rows[0]);
                    return(SiteHelper.GetJsonFromHashTable(result, "success", "获取数据成功", "UserInfo"));
                }
            }
        }