/// <summary> /// 游戏反馈 /// </summary> /// <param name="req"></param> /// <returns></returns> public string AddFeedback(HttpRequest req) { try { int ftype = Convert.ToInt32(req["ftype"] ?? "0"); GameFeedbackInfo info = new GameFeedbackInfo(); info.Accounts = req.Form["accounts"]; info.FeedbackTitle = req.Form["title"]; info.Phone = req.Form["phone"]; info.FeedbackContent = req.Form["content"]; info.ClientIP = req.Form["client_ip"]; info.EMail = req.Form["email"]; info.QQ = req["qq"]; return(AddFeedback(ftype, info)); } catch (Exception ex) { return(JsonResultHelper.GetErrorJson(ex.Message));; } }
/// <summary> /// 获取新闻公告类型名称时间 /// </summary> /// <param name="req"></param> /// <returns></returns> public string NewTypeList(HttpRequest req) { try { object oNewsID = req.Form["newsID"]; object oSubject = req.Form["subject"]; object oClassID = req.Form["classID"]; object oIssueDate = req.Form["issueDate"]; int NewsID = 0; string Subject = ""; int ClassID = 0; string IssueDate = ""; DataTable dt = aideNativeWebFacade.GetNewTypeList(NewsID, Subject, ClassID, IssueDate); string json = GetJsonByDataTable(dt); return(JsonResultHelper.GetSuccessJsonByArray(json)); } catch (Exception ex) { return(JsonResultHelper.GetErrorJson(ex.Message));; } }
/// <summary> /// 新增问题 /// </summary> /// <param name="gameIssue"></param> public string AddGameIssue(HttpRequest req) { GameIssueInfo info = new GameIssueInfo(); string content = req["issueContent"]; info.IssueTitle = content.Length > 20 ? content.Substring(0, 20) + "..." : content; info.IssueContent = req["issueContent"]; info.QQ = req["qq"]; info.Nullity = 0; info.CollectDate = DateTime.Now; info.ModifyDate = DateTime.Now; try { aideNativeWebFacade.InsertGameIssueInfo(info); return(JsonResultHelper.GetSuccessJson("保存成功!")); } catch (Exception ex) { return(JsonResultHelper.GetErrorJson(ex.Message)); } }
public string HotGameList(HttpRequest req) { try { object oGameID = req["gameId"]; object oGameName = req["gameName"]; object oImgUrl = req["imgUrl"]; int GameID = Convert.ToInt32(oGameID ?? 0); string GameName = ""; string ImgUrl = ""; DataTable dt = aidePlatformFacade.GetHotGameList(GameID, GameName, ImgUrl); //DealImg(dt); string json = GetJsonByDataTable(dt); return(JsonResultHelper.GetSuccessJsonByArray(json)); } catch (Exception ex) { return(JsonResultHelper.GetErrorJson(ex.Message));; } }
//兑换操作-购物车下单(全部) public string OnOrder(HttpRequest req) { try { var GameID = req["GameID"]; var AddrID = req["AddrID"]; Dictionary <string, object> conditions2 = new Dictionary <string, object>(); conditions2.Add("OrderNo", NewOrder); //订单号 conditions2.Add("GameID", GameID); //玩家ID conditions2.Add("AddrID", AddrID); // 玩家地址ID int result = aidePlatformManagerFacade.OnOrderCar(conditions2); /// result 返回-1 金币不足 -2钻石不足 -3购物车为空 return(JsonResultHelper.GetSuccessJsonByArray(result.ToString())); } catch (Exception ex) { return(JsonResultHelper.GetErrorJson(ex.Message));; } }
//兑换列表 OrderDetails 包含 订单商品列表 public string OrdersList(HttpRequest req) { try { var OrderNo = req["OrderNo"]; var Accounts = req["Accounts"]; var startDate = req["startDate"]; var endDate = req["endDate"]; var UserID = req["UserID"]; var GameID = req["GameID"]; Dictionary <string, object> conditions2 = new Dictionary <string, object>(); conditions2.Add("OrderNo", OrderNo); //订单号 conditions2.Add("Accounts", Accounts); //玩家账号 conditions2.Add("startDate", startDate); //开始时间 conditions2.Add("endDate", endDate); //结束时间 conditions2.Add("UserID", UserID); //玩家ID conditions2.Add("GameID", GameID); //游戏ID PagerSet pagerSet2 = aidePlatformManagerFacade.OrdersList(1, 1000, conditions2, "ORDER BY ID DESC"); DataTable dt = pagerSet2.PageSet.Tables[1]; dt.Columns.Add("OrderDetails", typeof(System.String)); foreach (DataRow item in dt.Rows) { Dictionary <string, object> subconditions2 = new Dictionary <string, object>(); subconditions2.Add("OrderID", item["ID"].ToString());//订单ID PagerSet subpagerSet2 = aidePlatformManagerFacade.GetOrderDetailList(1, 1000, subconditions2, "ORDER BY ID DESC"); string json0 = GetJsonByDataTable(subpagerSet2.PageSet.Tables[1]); item["OrderDetails"] = json0; } string json = GetJsonByDataTable2(dt); return(JsonResultHelper.GetSuccessJsonByArray(json)); } catch (Exception ex) { return(JsonResultHelper.GetErrorJson(ex.Message));; } }
public string AccountLogonByMobile(HttpRequest req) { UserInfo user = new UserInfo(); string mobile = req["account"]; user.RegisterMobile = mobile; user.LogonPass = Utility.MD5(req["pwd"]); Message msg = aideAccountFacade.LogonByMobile(user, true); if (msg.Success) { string account = aideAccountFacade.GetAccountsByMobile(mobile); SessionHelper.SetSession("account", account); UserInfo userInfo = aideAccountFacade.GetAccountInfoByAccount(account); string json = GetJsonByObjectList(userInfo); return(JsonResultHelper.GetSuccessJsonByArray(json)); } else { return(JsonResultHelper.GetErrorJson(JsonReplace(msg.Content))); } }
//返回 ID 添加地址 public string OnAddr(HttpRequest req) { try { var ID = req["ID"]; var GameID = req["GameID"]; var ProvinceID = req["ProvinceID"]; var CountryID = req["CountryID"]; var CityID = req["CityID"]; var DistrictsID = req["DistrictsID"]; var ReceiverName = req["ReceiverName"]; var ReceiverMobile = req["ReceiverMobile"]; var Addr = req["Addr"]; var Street = req["Street"]; var IsDefault = req["IsDefault"]; Dictionary <string, object> conditions2 = new Dictionary <string, object>(); conditions2.Add("ID", ID);//0 添加 , >0 修改 conditions2.Add("GameID", GameID); conditions2.Add("ProviceID", ProvinceID); conditions2.Add("CountryID", CountryID); conditions2.Add("CityID", CityID); conditions2.Add("DistrictID", DistrictsID); conditions2.Add("ReceiverName", ReceiverName); conditions2.Add("ReceiverMobile", ReceiverMobile); conditions2.Add("Addr", Addr); conditions2.Add("Street", Street); conditions2.Add("IsDefault", IsDefault);//0不是默认 1默认地址 int result = aidePlatformManagerFacade.OnAddr(conditions2); return(JsonResultHelper.GetSuccessJsonByArray(result.ToString())); } catch (Exception ex) { return(JsonResultHelper.GetErrorJson(ex.Message));; } }
//兑换操作-购物车下单(选择部分) public string OnOrderCar(HttpRequest req) { try { var GameID = req["GameID"]; var AddrID = req["AddrID"]; var CarArray = req["CarArray"]; Dictionary <string, object> conditions2 = new Dictionary <string, object>(); conditions2.Add("OrderNo", NewOrder); //订单号 conditions2.Add("GameID", GameID); //玩家ID conditions2.Add("AddrID", AddrID); // 玩家地址ID conditions2.Add("CarArray", CarArray); // 购物车ID “27,28” int ires = aidePlatformManagerFacade.OnOrderCarArray(conditions2); /// result 返回-1 金币不足 -2钻石不足 -3购物车为空 string res = getOnOrderCarMessage(ires); return(res); } catch (Exception ex) { return(JsonResultHelper.GetErrorJson(ex.Message));; } }