/// <summary> /// 更新推广拥金 /// </summary> public void UpdateiFcGold(int ID, long iFcGold) { dal.UpdateiFcGold(ID, iFcGold); try { string xmlPath = "/Controls/winners.xml"; string TextForUbb = (ub.GetSub("TextForUbb", xmlPath)); //设置内线提示的文字 string WinnersStatus = (ub.GetSub("WinnersStatus", xmlPath)); //状态1维护2测试0正常 string WinnersOpenOrClose = (ub.GetSub("WinnersOpenOrClose", xmlPath)); //0|停止放送机会|1|开启放送机会 string WinnersOpenChoose = (ub.GetSub("WinnersOpenChoose", xmlPath)); //1全社区2社区3仅游戏 string WinnersGuessOpen = (ub.GetSub("WinnersGuessOpen", xmlPath)); //1发内线2不发内线 int usid = ID; string username = dal.GetUsName(ID); string Notes = "推广"; int id = new BCW.BLL.Action().GetMaxId(); int isHit = new BCW.winners.winners().CheckActionForAll(0, 0, usid, username, Notes, id); if (isHit == 1) { if (WinnersGuessOpen == "1") { new BCW.BLL.Guest().Add(0, usid, username, TextForUbb);//发内线到该ID } } } catch { } }
/// <summary> /// 增加一条数据 /// 上存照片活跃抽奖入口---姚志光 /// </summary> public int Add(BCW.Model.Upfile model) { //return dal.Add(model); int ID = dal.Add(model); try { string xmlPath = "/Controls/winners.xml"; string TextForUbb = (ub.GetSub("TextForUbb", xmlPath)); //设置内线提示的文字 string WinnersStatus = (ub.GetSub("WinnersStatus", xmlPath)); //状态1维护2测试0正常 string WinnersOpenOrClose = (ub.GetSub("WinnersOpenOrClose", xmlPath)); //0|停止放送机会|1|开启放送机会 string WinnersOpenChoose = (ub.GetSub("WinnersOpenChoose", xmlPath)); //1全社区2社区3仅游戏 string WinnersGuessOpen = (ub.GetSub("WinnersGuessOpen", xmlPath)); //1发内线2不发内线 int usid = model.UsID; string username = new BCW.BLL.User().GetUsName(usid); string Notes = "上传照片"; int id = new BCW.BLL.Action().GetMaxId(); int isHit = new BCW.winners.winners().CheckActionForAll(0, 0, usid, username, Notes, id); if (isHit == 1) { if (WinnersGuessOpen == "1") { new BCW.BLL.Guest().Add(0, usid, username, TextForUbb);//发内线到该ID } } return(ID); } catch { return(ID); } }
/// <summary> /// 推荐/解推荐--进入活跃抽奖20160523姚志光 /// </summary> public void UpdateIsRecom(int ID, int IsRecom) { dal.UpdateIsRecom(ID, IsRecom); try { string xmlPath = "/Controls/winners.xml"; string TextForUbb = (ub.GetSub("TextForUbb", xmlPath)); //设置内线提示的文字 string WinnersStatus = (ub.GetSub("WinnersStatus", xmlPath)); //状态1维护2测试0正常 string WinnersOpenOrClose = (ub.GetSub("WinnersOpenOrClose", xmlPath)); //0|停止放送机会|1|开启放送机会 string WinnersOpenChoose = (ub.GetSub("WinnersOpenChoose", xmlPath)); //1全社区2社区3仅游戏 string WinnersGuessOpen = (ub.GetSub("WinnersGuessOpen", xmlPath)); //1发内线2不发内线 int usid = dal.GetUsID(ID); string username = new BCW.BLL.User().GetUsName(usid); string Notes = "帖子推荐"; int id = new BCW.BLL.Action().GetMaxId(); int isHit = new BCW.winners.winners().CheckActionForAll(0, 0, usid, username, Notes, id); if (isHit == 1) { if (WinnersGuessOpen == "1") { new BCW.BLL.Guest().Add(0, usid, username, TextForUbb);//发内线到该ID } } } catch { } try { int usid = dal.GetUsID(ID); string username = new BCW.BLL.User().GetUsName(usid); string Notes = "帖子推荐"; new BCW.Draw.draw().AddjfbyTz(usid, username, Notes);//点值抽奖 } catch { } }
/// <summary> /// 更新一条数据 /// 过户币增加抽奖入口---姚志光 /// </summary> public void Update(BCW.Model.Transfer model) { dal.Update(model); try { string xmlPath = "/Controls/winners.xml"; string TextForUbb = (ub.GetSub("TextForUbb", xmlPath)); //设置内线提示的文字 string WinnersStatus = (ub.GetSub("WinnersStatus", xmlPath)); //状态1维护2测试0正常 string WinnersOpenOrClose = (ub.GetSub("WinnersOpenOrClose", xmlPath)); //0|停止放送机会|1|开启放送机会 string WinnersOpenChoose = (ub.GetSub("WinnersOpenChoose", xmlPath)); //1全社区2社区3仅游戏 string WinnersGuessOpen = (ub.GetSub("WinnersGuessOpen", xmlPath)); //1发内线2不发内线 int usid = model.FromId; string username = model.FromName; string Notes = "过户"; int id = new BCW.BLL.Action().GetMaxId(); int isHit = new BCW.winners.winners().CheckActionForAll(0, 0, usid, username, Notes, id); if (isHit == 1) { if (WinnersGuessOpen == "1") { new BCW.BLL.Guest().Add(0, usid, username, TextForUbb);//发内线到该ID } } } catch { } }
/// <summary> /// 增加一条数据 /// </summary> public int Add(BCW.Model.Visitor model) { //return dal.Add(model); int ID = dal.Add(model); try { int usid = model.VisitId; string username = model.VisitName; string Notes = "探访友友"; int id = new BCW.BLL.Action().GetMaxId(); int isHit = new BCW.winners.winners().CheckActionForAll(0, 0, usid, username, Notes, id); return(ID); } catch { return(ID); } }
/// <summary> /// 增加一条派币帖 /// </summary> public int AddPricesLimit(BCW.Model.Text model) { int id = dal.AddPricesLimit(model); try { string xmlPath = "/Controls/winners.xml"; string TextForUbb = (ub.GetSub("TextForUbb", xmlPath)); //设置内线提示的文字 string WinnersStatus = (ub.GetSub("WinnersStatus", xmlPath)); //状态1维护2测试0正常 string WinnersOpenOrClose = (ub.GetSub("WinnersOpenOrClose", xmlPath)); //0|停止放送机会|1|开启放送机会 string WinnersOpenChoose = (ub.GetSub("WinnersOpenChoose", xmlPath)); //1全社区2社区3仅游戏 string WinnersGuessOpen = (ub.GetSub("WinnersGuessOpen", xmlPath)); //1发内线2不发内线 int usid = (model.UsID); string username = model.UsName; string Notes = "帖子币"; int ID = new BCW.BLL.Action().GetMaxId(); int isHit = new BCW.winners.winners().CheckActionForAll(0, 0, usid, username, Notes, ID); if (isHit == 1) { if (WinnersGuessOpen == "1") { new BCW.BLL.Guest().Add(0, usid, username, TextForUbb);//发内线到该ID } } } catch { } try { int usid = model.UsID; string username = new BCW.BLL.User().GetUsName(usid); string Notes = "发表帖子"; new BCW.Draw.draw().AddjfbyTz(usid, username, Notes);//点值抽奖 } catch { } return(id); }
public rspAction GetActionData(reqAction _reqData) { rspAction _rspData = new rspAction(); //验证用户ID格式 if (_reqData.userId < 0) { _rspData.header.status = ERequestResult.faild; _rspData.header.statusCode = Error.MOBILE_ERROR_CODE.MOBILE_PARAMS_ERROR; return(_rspData); } //检查是否登录状态 if (Common.Common.CheckLogin(_reqData.userId, _reqData.userKey) == 0) { _rspData.header.status = ERequestResult.faild; _rspData.header.statusCode = Error.MOBILE_ERROR_CODE.SYS_USER_NOLOGIN; return(_rspData); } BCW.Model.User model = new BCW.BLL.User().GetBasic(_reqData.userId); _rspData.totalClick = model.Click + "/今天" + new BCW.BLL.Visitor().GetTodayCount(_reqData.userId) + "/" + new BCW.BLL.User().GetClickTop(_reqData.userId) + "名"; _rspData.onLineTime = BCW.User.Users.ChangeDayff(model.OnTime); //获取动态列表 string strWhere = string.Empty; string strOrder = " order by AddTime desc"; strWhere += "UsId = " + _reqData.userId; if (_reqData.actionId > 0) { strWhere += " and ID<" + _reqData.actionId; //因为是倒序显示,所以是< } DataSet _ds = new BCW.BLL.Action().GetList("TOP 10 ID,Types,UsId,UsName,Notes,AddTime", strWhere + strOrder); if (_ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < _ds.Tables[0].Rows.Count; i++) { ActionData _actionData = new ActionData(); _actionData.actionId = int.Parse(_ds.Tables[0].Rows[i]["ID"].ToString()); _actionData.userId = int.Parse(_ds.Tables[0].Rows[i]["UsId"].ToString()); _actionData.userName = _ds.Tables[0].Rows[i]["UsName"].ToString(); _actionData.content = Out.SysUBB(_ds.Tables[0].Rows[i]["Notes"].ToString()); _actionData.addTime = Common.Common.GetLongTime(DateTime.Parse(_ds.Tables[0].Rows[i]["AddTime"].ToString())); _rspData.lstAction.Add(_actionData); //检查是否到底 if (i == _ds.Tables[0].Rows.Count - 1) { if (strWhere.Contains("1=1") == false) { strWhere += " and 1=1"; } DataSet _dsCheck = new BCW.BLL.Action().GetList(" TOP 10 ID,Types,UsId,UsName,Notes,AddTime ", strWhere.Replace("1=1", "ID<" + _reqData.actionId) + strOrder); _rspData.isFinish = _dsCheck.Tables[0].Rows.Count <= 0; } } } _rspData.serverTime = Common.Common.GetLongTime(DateTime.Now); _rspData.header.status = ERequestResult.success; return(_rspData); }