forked from gz-yami/mall4j
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
58 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
yami-shop-bean/src/main/java/com/yami/shop/bean/enums/UploadType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved. | ||
* | ||
* https://www.mall4j.com/ | ||
* | ||
* 未经允许,不可做商业用途! | ||
* | ||
* 版权所有,侵权必究! | ||
*/ | ||
|
||
package com.yami.shop.bean.enums; | ||
|
||
/** | ||
* @author lanhai | ||
* 文件上传方式 1.本地文件上传 2.七牛云 | ||
*/ | ||
public enum UploadType { | ||
|
||
/** | ||
* 本地文件上传 | ||
*/ | ||
LOCAL(1), | ||
|
||
/** | ||
* 七牛云 | ||
*/ | ||
QINIU(2); | ||
|
||
private Integer num; | ||
|
||
public Integer value() { | ||
return num; | ||
} | ||
|
||
UploadType(Integer num) { | ||
this.num = num; | ||
} | ||
|
||
public static UploadType instance(Integer value) { | ||
UploadType[] enums = values(); | ||
for (UploadType statusEnum : enums) { | ||
if (statusEnum.value().equals(value)) { | ||
return statusEnum; | ||
} | ||
} | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters