示例#1
0
        public IActionResult DeleteUser([FromBody] Users user, string token)
        {
            var json = new JsonResultModels();

            if (_tokenHelper.ValiToken(token))
            {
                if (_usersBLL.DeleteUsr(user))
                {
                    json.Code = 200;
                    json.Msg  = "数据删除成功";
                }
                else
                {
                    json.Code = 400;
                    json.Msg  = "删除数据失败,请检查是否操作有误!";
                }
            }
            else
            {
                json.Code = 300;
                json.Msg  = "删除数据失败,token验证失败!";
            }
            json.Data    = null;
            json.TnToken = null;
            return(Ok(json));
        }