public void PostPushParams(string mobile, string pushParams, string version, string equType, string equName) { string json = string.Empty; BLL.pushparam bll_push = new BLL.pushparam(); Model.pushparam p = Newtonsoft.Json.JsonConvert.DeserializeObject<Model.pushparam>(pushParams); int employeeId = bll_user.GetUserID(mobile); //根据用户输入的手机号或唯一码得到id p.employeeid = employeeId; p.push_num = 0; try { bll_push.AddPushParam(p.app_id, p.channel_id, p.error_code, p.request_id, p.user_id, p.employeeid, p.device_type, p.push_num); json = "{\"status\":\"true\"}"; } catch (Exception ex) { json = "{\"status\":\"false\",\"data\":\"" + ex.Message + "\"}"; } WriteWebServiceLog(version, equType, equName, "PostPushParams", ""); Context.Response.Write(json); Context.Response.End(); }
public void ResetBoundNum(string user_id, string version, string equType, string equName) { BLL.pushparam bll_push = new BLL.pushparam(); string json = string.Empty; try { bll_push.ModifyPushNum(user_id); json += "{\"status\":\"true\"}"; } catch (Exception ex) { json = "{\"status\":\"false\",\"data\":\"" + ex.Message + "\"}"; } WriteWebServiceLog(version, equType, equName, "ResetBoundNum", ""); Context.Response.Write(json); Context.Response.End(); }
public void Notification(string userId, int status, string version, string equType, string equName) { string json = string.Empty; BLL.pushparam bll_push = new BLL.pushparam(); try { bll_push.ModifyPushParamStatus(userId, status); json = "{\"status\":\"true\"}"; } catch (Exception ex) { json = "{\"status\":\"false\",\"data\":\"" + ex.Message + "\"}"; } WriteWebServiceLog(version, equType, equName, "Notification", ""); Context.Response.Write(json); Context.Response.End(); }