| | |
| | | /// <param name="username">用户编码</param> |
| | | /// <param name="password">密码</param> |
| | | /// <param name="usertype">操作端类型(PC APP)</param> |
| | | /// <param name="rid">极光推送获取设备的id(唯一)</param> |
| | | /// <returns></returns> |
| | | [Route(template: "LoginAppSave")] |
| | | [HttpGet] |
| | | public HttpResponseMessage LoginAppSave(string username, string password, string usertype) |
| | | public HttpResponseMessage LoginAppSave(string username, string password, string usertype, string rid) |
| | | { |
| | | var sql = ""; |
| | | List<object> list = new List<object>(); |
| | | try |
| | | { |
| | | DataTable dt = LoginBLL.LoginSearch(username, password); |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | //写入登录操作记录 |
| | | mes = LoginBLL.LoginBas(username, usertype); |
| | | //更新rid |
| | | sql = @"update [dbo].[TUser] set rid=@rid where usercode=@usercode"; |
| | | list.Add(new { str = sql, parm = new { rid = rid, usercode = username } }); |
| | | bool aa = DapperHelper.DoTransaction(list); |
| | | |
| | | List<User> mss = new List<User>(); |
| | | User ms = new User(); |
| | | ms.guid = username + password + Guid.NewGuid().ToString(); |
| | | //ms.guid = username + password + Guid.NewGuid().ToString(); |
| | | ms.guid = rid.ToString(); |
| | | ms.userid = Convert.ToInt32(dt.Rows[0]["ID"].ToString()); |
| | | ms.usercode = dt.Rows[0]["USERCODE"].ToString(); |
| | | ms.username = dt.Rows[0]["USERNAME"].ToString(); |
| | |
| | | |
| | | #region[App登录查询安灯呼叫信息] |
| | | /// <summary> |
| | | /// |
| | | /// App登录查询安灯呼叫信息 |
| | | /// </summary> |
| | | /// <param name="userid">用户id</param> |
| | | /// <param name="rid">手机设备id(极光生成)</param> |
| | | /// <param name="usercode">用户编码</param> |
| | | /// <param name="username">用户名称</param> |
| | | /// <param name="usertype">操作端PC/APP</param> |
| | | /// <returns></returns> |
| | | [Route(template: "LoginAppAnDonMessage")] |
| | | [HttpPost] |
| | | public HttpResponseMessage LoginAppAnDonMessage(int userid, string usercode, string username, string usertype) |
| | | public HttpResponseMessage LoginAppAnDonMessage(string rid, string usercode, string username, string usertype) |
| | | { |
| | | mes = LoginBLL.LoginAppAnDonMessage(userid, usercode, username, usertype); |
| | | mes = LoginBLL.LoginAppAnDonMessage(rid, usercode, username, usertype); |
| | | return mes.ResponseMess(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | } |
| | | } |