5 changed files with 63 additions and 10 deletions
@ -0,0 +1,45 @@ |
|||
package com.bnyer.file.enumeration; |
|||
|
|||
import java.util.Arrays; |
|||
|
|||
/** |
|||
* @Author qyh |
|||
* @Date 2023/4/29 18:58 |
|||
* @Description |
|||
*/ |
|||
public enum AddressEnum { |
|||
BACK(0,"back/"), |
|||
EMOJI(1,"emoji/"), |
|||
FRIEND(2,"friend/"), |
|||
HEAD(3,"head/"), |
|||
ICON(4,"icon/"), |
|||
PHONEBACK(5,"phoneBack/"), |
|||
WATCH(6,"watch/"); |
|||
private Integer businessType; |
|||
private String fileAddress; |
|||
|
|||
AddressEnum(Integer businessType, String fileAddress) { |
|||
this.businessType = businessType; |
|||
this.fileAddress = fileAddress; |
|||
} |
|||
|
|||
public Integer getBusinessType() { |
|||
return businessType; |
|||
} |
|||
|
|||
public void setBusinessType(Integer businessType) { |
|||
this.businessType = businessType; |
|||
} |
|||
|
|||
public String getFileAddress() { |
|||
return fileAddress; |
|||
} |
|||
|
|||
public void setFileAddress(String fileAddress) { |
|||
this.fileAddress = fileAddress; |
|||
} |
|||
|
|||
public static AddressEnum getMessageEnum(Integer businessType) { |
|||
return Arrays.stream(AddressEnum.values()).filter(x -> x.businessType.equals(businessType)).findFirst().orElse(null); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue