public Respbase AutoChargeVPoint(Reqbase req) { var facade = new UserFacade(); var flag = facade.AutoChargeVPoint(req.Nodeid); return(facade.PromptInfo); }
/// <summary> /// 本月竞拍数据(我的竞拍总数和竞拍记录) /// </summary> /// <param name="req"></param> /// <returns></returns> public ThisMonthDataDto GetThisMonthData(Reqbase req) { var now = DateTime.Now; var config = GetConfigCahce(); if (config == null) { Alert("本月没有竞拍"); return(null); } var myanum = GetMyADianCache(req.Nodeid); var his = db.TpxinPaiHisSet.Where(w => w.Nodeid == req.Nodeid && w.Configid == config.Configid).ToList(); var leading = his.Where(s => s.Status == 0).Sum(e => e.Num); var outs = his.Where(w => w.Status == -1 || w.Status == -2).Sum(s => s.Num); var agree = GetProtocolCache(req.Nodeid); var data = new ThisMonthDataDto() { ANum = config.Num, AddPrice = config.Addprice, MyLeading = leading, MyOut = outs, MyA = myanum, MinPrice = config.Minprice, IsAgreement = agree, }; #region 竞拍排名 var list = GetAuctionRanking(); data.AuctionHis = list; #endregion return(data); }
public Respbase <List <MySvcDto> > GetMySvc(Reqbase req) { // tblc_centcard PXinContext db = HttpContext.Current.GetDbContext <PXinContext>(); var query = from tc in db.TblcCentcardSet where tc.Usenodeid == req.Nodeid && tc.Status == 1 && tc.Areaid == "1" orderby tc.Createdtime descending select new MySvcDto { Amount = (decimal)tc.Amount, Cardno = tc.Cardno, Areaid = tc.Areaid, }; var result = query.ToList(); if (result != null) { return(new Respbase <List <MySvcDto> > { Data = result, Result = 1, Message = "成功" }); } return(new Respbase <List <MySvcDto> > { Result = -1, Message = "未找到数据" }); }
public Respbase TransferTest(Reqbase req) { FriFacade facade = new FriFacade(); facade.TransferTest(); return(facade.PromptInfo); }
public Respbase <List <PurseHisTypeLogoDto> > GetPurseHisTypeLogo(Reqbase req) { return(new Respbase <List <PurseHisTypeLogoDto> >() { Data = purseFacade.GetPurseHisTypeLogo(req) }); }
/// <summary> /// 钱包列表 /// </summary> public Respbase <List <PurseDto> > GetPurses(Reqbase req) { var query = (from purseConfig in db.TnetPurseConfigSet join purse in db.TblcUserPurseSet on new { Pursetype = purseConfig.Pursetype, Subid = purseConfig.Subid, Currencytype = purseConfig.Currencytype } equals new { Pursetype = purse.Pursetype, Subid = purse.Subid, Currencytype = purse.Currencytype } join currency in db.TblcCurrencySet on purseConfig.Currencytype equals currency.Currencyid join currency2 in db.TblcCurrencySet on purseConfig.Showunit equals currency2.Currencyid where purse.Ownertype == 1 && purse.Ownerid == req.Nodeid && purseConfig.Isshow >= 1 orderby purseConfig.Isshow descending, purseConfig.Infoid descending select new PurseDto { Id = purseConfig.Infoid, Purseid = purse.Purseid, Pursename = purseConfig.Showname, Balance = (purse.Balance - purse.Freezevalue) * currency2.ExchangeRate / currency.ExchangeRate, Freeze = (purse.Freezevalue - purse.Minvalue) * currency2.ExchangeRate / currency.ExchangeRate, Purseunit = purseConfig.Showunit, Purseunitname = purseConfig.Showunitname, IconUrl = purseConfig.Picurl, Note = purseConfig.Note, IsShow = purseConfig.Isshow, PurseType = purseConfig.Pursetype, Subid = purseConfig.Subid, BgPic = purseConfig.Bgpic }); List <PurseDto> purselist = query.ToList(); //var tpxinUserInfo = db.TpxinUserinfoSet.FirstOrDefault(w => w.Nodeid == req.Nodeid); var vp = new VPHelper(); var tpxinUserInfo = vp.GetTpxinUserinfo(req.Nodeid); var VBalance = (tpxinUserInfo == null ? 0 : tpxinUserInfo.VDianBalance); var PBalance = (tpxinUserInfo == null ? 0 : tpxinUserInfo.PDianBalance); query = db.TnetPurseConfigSet.Where(w => w.Infoid < 0 && w.Isshow == 1).Select(s => new PurseDto() { Id = s.Infoid, Purseid = s.Infoid, Pursename = s.Showname, Balance = s.Infoid == -1 ? VBalance : PBalance, Freeze = 0, Purseunit = s.Showunit, Purseunitname = s.Showunitname, IconUrl = s.Picurl, Note = s.Note, IsShow = s.Isshow, PurseType = s.Pursetype, Subid = s.Subid, BgPic = s.Bgpic }); query.ToList().ForEach(item => purselist.Add(item)); purselist.ForEach(item => { item.Balance = Math.Truncate(item.Balance * 100) / 100.0M; item.Freeze = Math.Truncate(item.Freeze * 100) / 100.0M; //item.DetailUrl = string.Format("http://client.p.cn/html/balanceinfo.aspx?purseid={0}&title={1}收支明细", item.Purseid, item.Pursename); }); return(new Respbase <List <PurseDto> > { Data = purselist.OrderByDescending(p => p.Balance).ToList() }); }
public Respbase <List <AuctionHisDto> > GetAuctionRanking(Reqbase req) { var data = facade.GetAuctionRanking(); return(new Respbase <List <AuctionHisDto> > { Result = 1, Data = data }); }
public Respbase AddFriendNoticeEvent(Reqbase req) { Facade.Bus.EventBus.GetInstance().Publish(new Facade.Bus.Event.AddFriendNoticeEvent("hello bus")); return(new Respbase() { }); }
public Respbase <List <LuckDrawHis> > GetLuckDrawHis(Reqbase req) { var dto = _redpacketFacade.GetLuckDrawHis(req); return(new Respbase <List <LuckDrawHis> > { Data = dto }); }
public Respbase <List <MyAuctionADto> > GetMyAuctionA(Reqbase req) { var data = facade.GetMyAuctionA(req); return(new Respbase <List <MyAuctionADto> > { Result = 1, Message = "成功", Data = data }); }
/// <summary> /// 获取11月活动-迪拜见证之旅 服务费的数量 /// </summary> public NovemberActivityCountDto GetNovemberActivityCount(Reqbase req) { return(new NovemberActivityCountDto { SatisfyCondiCount = db.VpxinOctoberActivitySet.Count(x => x.Pnodeid == req.Nodeid), QualifyCount = db.VpxinOctoberActivitySet.Count(x => x.Nodeid == req.Nodeid) }); }
/// <summary> /// 获取转账原因图标列表 /// </summary> /// <param name="req"></param> /// <returns></returns> public List <PurseHisTypeLogoDto> GetPurseHisTypeLogo(Reqbase req) { List <PurseHisTypeLogoDto> dtos = new List <PurseHisTypeLogoDto>(); dtos.Add(new PurseHisTypeLogoDto() { TypeID = 0 }); dtos.Add(new PurseHisTypeLogoDto() { TypeID = -1 }); dtos.Add(new PurseHisTypeLogoDto() { TypeID = 1 }); dtos.Add(new PurseHisTypeLogoDto() { TypeID = 2 }); dtos.Add(new PurseHisTypeLogoDto() { TypeID = 3 }); dtos.Add(new PurseHisTypeLogoDto() { TypeID = 4 }); dtos.Add(new PurseHisTypeLogoDto() { TypeID = 5 }); dtos.Add(new PurseHisTypeLogoDto() { TypeID = 6 }); dtos.Add(new PurseHisTypeLogoDto() { TypeID = 7 }); dtos.Add(new PurseHisTypeLogoDto() { TypeID = 2000 }); dtos.Add(new PurseHisTypeLogoDto() { TypeID = 2001 }); dtos.Add(new PurseHisTypeLogoDto() { TypeID = 3000 }); dtos.Add(new PurseHisTypeLogoDto() { TypeID = 3001 }); return(dtos); }
public Respbase <List <ActivityDto> > GetActivitys(Reqbase req) { var facade = new ActivityFacade(); var result = facade.GetActivitys(req); return(new Respbase <List <ActivityDto> > { Data = result, Message = facade.PromptInfo.Message, Result = facade.PromptInfo.Result }); }
public Respbase <List <ChatGroupDto> > MyGroup(Reqbase req) { ChatFacade facade = new ChatFacade(); List <ChatGroupDto> dtos = facade.MyGroup(req); return(new Respbase <List <ChatGroupDto> > { Data = dtos }); }
public Respbase <NovemberActivityCountDto> GetNovemberActivityCount(Reqbase req) { var facade = new ActivityFacade(); var result = facade.GetNovemberActivityCount(req); return(new Respbase <NovemberActivityCountDto> { Data = result, Message = facade.PromptInfo.Message, Result = facade.PromptInfo.Result }); }
public Respbase GetChatHis(Reqbase req) { ChatFacade facade = new ChatFacade(); var result = facade.GetChatHis(); return(new Respbase { Message = result }); }
public Respbase <List <ChatUserDto> > MyFriend(Reqbase req) { ChatFacade facade = new ChatFacade(); List <ChatUserDto> dtos = facade.MyFriend(req); return(new Respbase <List <ChatUserDto> > { Data = dtos }); }
public Respbase <int> IsNewMessage(Reqbase req) { FriFacade facade = new FriFacade(); int infoid = facade.IsNewMessage(req); return(new Respbase <int> { Message = facade.PromptInfo.Message, Result = facade.PromptInfo.Result, Data = infoid }); }
public Respbase RefreshUserInfo(Reqbase req) { Log log = new Log(typeof(ChatController)); log.Info("刷新用户信息,nodeid=" + req.Nodeid); ChatFacade facade = new ChatFacade(); bool result = facade.RefreshUserInfo(req); return(facade.PromptInfo); }
public Respbase <DosInfoDto> GetDosInfo(Reqbase reqbase) { var data = facade.GetDosInfo(reqbase.Nodeid); if (data == null) { return(new Respbase <DosInfoDto> { Result = 0, Message = "用户不存在", Data = null }); } return(new Respbase <DosInfoDto> { Result = 1, Data = data }); }
public Respbase <OpenInfUeoDto> OpenInfo(Reqbase req) { var data = facade.OpenInfo(req); if (data == null) { return(new Respbase <OpenInfUeoDto> { Result = 0, Message = facade.PromptInfo.Message, Data = null }); } return(new Respbase <OpenInfUeoDto> { Result = 1, Data = data }); }
public Respbase <MyTpxinPaiConfig> GetAuctionConfig(Reqbase req) { var data = facade.GetAuctionConfig(req.Nodeid); if (data == null) { return(new Respbase <MyTpxinPaiConfig> { Result = 0, Message = "本月没有竞拍" }); } return(new Respbase <MyTpxinPaiConfig> { Result = 1, Data = data }); }
public Respbase <AuctionAddpriceDto> GetAuctionAddprice(Reqbase req) { var data = facade.GetAuctionAddprice(req); if (data == null) { return(new Respbase <AuctionAddpriceDto> { Result = 0, Message = facade.PromptInfo.Message }); } return(new Respbase <AuctionAddpriceDto> { Result = 1, Data = data }); }
/// <summary> /// 获取活动列表 /// </summary> /// <param name="req"></param> public List <ActivityDto> GetActivitys(Reqbase req) { return(db.TpxinActivitySet.Where(p => DateTime.Now > p.ActivityStarttime).Select(p => new ActivityDto { Id = p.Id, ActivityName = p.ActivityName, ActivityStarttime = p.ActivityStarttime, ActivityEndtime = p.ActivityEndtime, PayStarttime = p.PayStarttime, PayEndtime = p.PayEndtime, Cover = p.Cover, Createtime = p.Createtime }).ToList()); }
private TzcAuthLog GetAuthLogFromPcnByPcnUserNodeid(string pcnNodecode, Reqbase req) { string time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); string sign = Md5.SignString(time + AppConfig.AppSecurityString); var myRet = HttpSimulation.Instance.RequestByJsonOrQueryString($"{AppConfig.PCNDomainUrl}/api/auth/GetAuthLog", new { Nodecode = pcnNodecode, Client = req.Client, Tm = req.Tm, Sign = req.Sign, Sid = req.Sid, Nodeid = req.Nodeid, ReqTime = time, AppSign = sign }); var ret = JsonConvert.DeserializeObject <Respbase <TzcAuthLog> >(myRet); if (ret.Result <= 0 || string.IsNullOrEmpty(ret.Data.Idcardpic1)) { log.Info("GetAuthLog," + myRet); Alert("此PCN账号未进行认证"); return(null); } return(ret.Data); }
public Respbase <InvioceStatisticsDto> GetInvioceStatistics(Reqbase req) { InvioceFacade facade = new InvioceFacade(); var result = facade.GetInvioceStatistics(req); if (result != null) { return(new Respbase <InvioceStatisticsDto> { Result = 1, Message = facade.PromptInfo.Message, Data = result }); } return(new Respbase <InvioceStatisticsDto> { Result = facade.PromptInfo.Result, Message = facade.PromptInfo.Message }); }
public Respbase VerifyDaRen(Reqbase req) { DaRenFacade facade = new DaRenFacade(); var result = facade.VerifyDaRen(req); if (result) { return(new Respbase { Result = 1, Message = "成功" }); } return(new Respbase { Result = facade.PromptInfo.Result, Message = facade.PromptInfo.Message }); }
public Respbase <LoginInfoDto> GetMy(Reqbase my) { UserFacade user = new UserFacade(); var result = user.GetMy(my); if (result == null) { return(new Respbase <LoginInfoDto> { Result = user.PromptInfo.Result, Message = user.PromptInfo.Message, Data = null }); } return(new Respbase <LoginInfoDto> { Result = 1, Message = "操作成功", Data = result }); }
public Respbase <IsMailDto> IsMails(Reqbase req) { UserFacade user = new UserFacade(); var result = user.IsMails(req); if (result == null) { return(new Respbase <IsMailDto> { Result = user.PromptInfo.Result, Message = user.PromptInfo.Message, Data = null }); } return(new Respbase <IsMailDto> { Data = result }); }
public Respbase <List <VideoBase> > GetMyVideo(Reqbase req) { DaRenFacade facade = new DaRenFacade(); var result = facade.GetMyVideo(req); if (result != null) { return(new Respbase <List <VideoBase> > { Result = 1, Message = "成功", Data = result }); } return(new Respbase <List <VideoBase> > { Result = facade.PromptInfo.Result, Message = facade.PromptInfo.Message }); }