public async Task <IActionResult> Delete([FromBody] List <long> ids)
        {
            long userid = UserIdentity.UserId;
            var  res    = await _roleService.DeleteAsync(ids, userid);

            return(Ok(res));
        }
Exemple #2
0
        public async Task <ApiResult <string> > Delete(string Id)
        {
            ApiResult <string> res   = new ApiResult <string>();
            TokenModelBeta     token = JwtToken.ParsingJwtToken(HttpContext);

            try
            {
                var IsSuccess = await _sysRoleService.DeleteAsync(s => s.Id == Id);

                if (!IsSuccess)
                {
                    res.code    = (int)ApiEnum.Failure;
                    res.message = "错误:删除角色失败";
                }
            }
            catch (Exception ex)
            {
                res.code    = (int)ApiEnum.Error;
                res.message = "异常:" + ex.Message;
            }

            return(await Task.Run(() => res));
        }
 public async Task <ApiResult <string> > DeleteRole(string parm)
 {
     return(await _roleService.DeleteAsync(parm));
 }
Exemple #4
0
 public async Task <ApiResult <string> > DeleteRole([FromBody] ParmString obj)
 {
     return(await _roleService.DeleteAsync(obj.parm));
 }
 public async Task <IActionResult> DeleteRole([FromBody] ParmString obj)
 {
     return(Ok(await _roleService.DeleteAsync(obj.parm)));
 }
 public async Task <bool> DeleteAsync([FromBody] RoleDeleteDTO dto)
 {
     return(await _roleService.DeleteAsync(dto.Ids, dto.UserId));
 }
Exemple #7
0
 public async Task <IResponseEntity> Delete(string id)
 {
     return(await _sysRoleService.DeleteAsync(id));
 }