code: public static <T extends BaseObject<Long>> Map<Long, T> convert2Map(
              List<T> enTs) {
  
          Map<Long, T> map = new HashMap<Long, T>();
  
          if (enTs == null) {
              return map;
          }
  
          for (T t : enTs) {
  
              map.put(t.getId(), t);
          }
  
          return map;
      }
docs: 转换成Map
  
  @param enTs
  
  @return