Authored by chenchao

add seller asset policy 4 adjust pay

package com.yohoufo.order.service.impl;
import com.yohobuy.ufo.model.enums.StoredSellerStatusEnum;
import com.yohobuy.ufo.model.order.bo.SellerAssetPolicy;
import com.yohobuy.ufo.model.order.bo.SellerBo;
import com.yohobuy.ufo.model.order.common.EntrySellerType;
import com.yohobuy.ufo.model.order.common.Payment;
import com.yohobuy.ufo.model.order.common.SuperEnterStageLevel;
import com.yohobuy.ufo.model.order.constants.SettlementType;
import com.yohoufo.common.exception.UfoServiceException;
import com.yohoufo.dal.order.model.SellerLevelFunc;
import com.yohoufo.dal.order.model.StoredSeller;
... ... @@ -96,6 +99,17 @@ public class SellerWrapper {
sellerBo.setNormalSuper(sellerTypeNode.isNormalSuper());
sellerBo.setSuper(sellerTypeNode.isSuper());
sellerBo.setNotEntry(sellerTypeNode.isNotEntry());
sellerBo.setLargeSettlementSuper(sellerTypeNode.isLargeSettlementSuper());
if (sellerTypeNode.isLargeSettlementSuper()){
SellerAssetPolicy sellerAssetPolicy = SellerAssetPolicy.builder()
.payment(Payment.WALLET)
.earnestMoneyPolicy(SellerAssetPolicy.EarnestMoneyPolicy.builder().free(true).build())
.penaltyMoneyPolicy(SellerAssetPolicy.PenaltyMoneyPolicy.builder().necessary(true).build())
.goodsIncomePolicy(SellerAssetPolicy.GoodsIncomePolicy.builder()
.settlementType(SettlementType.FIXED_AMOUNT).build())
.build();
sellerBo.setSellerAssetPolicy(sellerAssetPolicy);
}
}
return this;
}
... ...
... ... @@ -92,6 +92,10 @@ public class SellerHelper {
return result;
}
public static boolean isLargeSettlement(EntrySellerType est){
return Objects.equals(est, EntrySellerType.LARGE_SETTLEMENT);
}
public static boolean isCommonEntry(EntrySellerType est){
return Objects.equals(est, EntrySellerType.COMMON);
}
... ... @@ -128,6 +132,10 @@ public class SellerHelper {
//超级卖家是否被降级
sellerTypeNode.setNormalSuper(isNormalSuper);
}
if (isLargeSettlement(est)){
sellerTypeNode.setLargeSettlementSuper(true);
}
return sellerTypeNode;
}
... ...