|
|
package com.yohoufo.common.constant;
|
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* 物流发货方
|
|
|
*/
|
|
|
public enum EnumExpressSender {
|
|
|
seller("卖家物流", Lists.newArrayList(ExpressInfoConstant.EXPRESS_TYPE_1.intValue())),
|
|
|
yoho("有货平台物流", Lists.newArrayList(ExpressInfoConstant.EXPRESS_TYPE_2.intValue(),ExpressInfoConstant.EXPRESS_TYPE_3.intValue()));
|
|
|
seller("卖家物流", ExpressInfoConstant.EXPRESS_TYPE_1.intValue()),
|
|
|
yoho_to_buyer("有货平台物流", ExpressInfoConstant.EXPRESS_TYPE_2.intValue()),
|
|
|
yoho_to_seller_appraise_fail("有货平台物流", ExpressInfoConstant.EXPRESS_TYPE_3.intValue()),
|
|
|
yoho_to_seller_return_back("有货平台物流", ExpressInfoConstant.EXPRESS_TYPE_REBACK.intValue()),;
|
|
|
|
|
|
|
|
|
private String name;
|
|
|
private List<Integer> containsExpressType;
|
|
|
private int expressType;
|
|
|
|
|
|
EnumExpressSender(String name,List<Integer> containsExpressType){
|
|
|
EnumExpressSender(String name,int expressType){
|
|
|
this.name = name;
|
|
|
this.containsExpressType = containsExpressType;
|
|
|
this.expressType = expressType;
|
|
|
}
|
|
|
|
|
|
public static String getSenderName(Integer type){
|
|
|
public static String getSenderName(int type){
|
|
|
for(EnumExpressSender sender:EnumExpressSender.values()){
|
|
|
if(sender.containsExpressType.contains(type)){
|
|
|
if(sender.expressType==type){
|
|
|
return sender.name;
|
|
|
}
|
|
|
}
|
...
|
...
|
|