toInt static method

int toInt(
  1. MessageStatusEnum status
)

将枚举转换为整型

Implementation

static int toInt(MessageStatusEnum status) {
  switch (status) {
    case MessageStatusEnum.Unknown:
      return 0;
    case MessageStatusEnum.Sending:
      return 1;
    case MessageStatusEnum.SendSucc:
      return 2;
    case MessageStatusEnum.SendFail:
      return 3;
    case MessageStatusEnum.HasDeleted:
      return 4;
    case MessageStatusEnum.HasRevoked:
      return 6;
  }
}