AppStatus.java 627 B

123456789101112131415161718192021222324
  1. package com.xuqm.server.appmanager.enums;
  2. public enum AppStatus {
  3. // 不需要发布、没有上传安装包、已上传待审核、审核完成待发布、已发布
  4. NOT(0),ABSENT(1), AUDIT(2), WAIT(3), RELEASE(4) ;
  5. private int status = 0;
  6. AppStatus(final int status) {
  7. this.status = status;
  8. }
  9. public int status() {
  10. return this.status;
  11. }
  12. public static AppStatus getStatus(final int status) {
  13. for (final AppStatus value : AppStatus.values()) {
  14. if (value.status == status) {
  15. return value;
  16. }
  17. }
  18. return NOT;
  19. }
  20. }