示例#1
0
 public string GetFullName(int id)
 {
     try
     {
         User   user     = GetUserById(id);
         string deptName = _deptService.GetDeptName(user.ParentId);
         //处理其他逻辑
         return($"{user.Name}[{deptName}]");
     }
     catch (Exception e)
     {
         throw new UserFullNameGenException($"用户 Id 为 {id} 的 FullName 生产失败", e);
         // throw e;
     }
 }