public async Task <object> PostUser([FromBody] User model) { var data = new MessageModel <User>() { Message = "添加成功", Success = true }; //model.LoginPwd = MD5Helper.MD5Encrypt32(model.LoginPwd); var dataList = await _userSvc.Query(a => a.LoginName == model.LoginName); if (dataList.Count > 0) { data.Message = "该用户名称已存在"; data.Success = false; } else { model.Id = await _userSvc.Add(model); data.Response = model; } return(data); }