Authored by chenchao

fastjson can not re-seri

package com.yohoufo.order.service.handler;
import com.google.common.eventbus.Subscribe;
import com.yohobuy.ufo.model.order.bo.EarnestMoneyPolicy;
import com.yohobuy.ufo.model.order.bo.OrderInfo;
import com.yohobuy.ufo.model.order.bo.SellerAssetPolicy;
import com.yohobuy.ufo.model.order.bo.SellerBo;
... ... @@ -49,7 +50,7 @@ public class BatchPublishTailHandler implements IEventHandler<BatchPublishTailEv
SellerWallet sellerWallet, SellerBo sellerBo,
int sellerUid, SkupType skupType){
SellerAssetPolicy sellerAssetPolicy = sellerBo.getSellerAssetPolicy();
SellerAssetPolicy.EarnestMoneyPolicy emp = sellerAssetPolicy.getEarnestMoneyPolicy();
EarnestMoneyPolicy emp = sellerAssetPolicy.getEarnestMoneyPolicy();
// (异步实现)记录保证金流水
if(emp.getPayment().equals(Payment.WALLET) && !emp.isFree()) {
List<OrderInfo> orderList = fjr.getSellerOrderList().parallelStream().map(sellerOrder ->
... ...
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.bo.*;
import com.yohobuy.ufo.model.order.common.EntrySellerType;
import com.yohobuy.ufo.model.order.common.Payment;
import com.yohobuy.ufo.model.order.common.SuperEnterStageLevel;
... ... @@ -10,7 +9,6 @@ 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;
import com.yohobuy.ufo.model.order.bo.SellerTypeNode;
import com.yohoufo.order.utils.SellerHelper;
import lombok.Getter;
import lombok.Setter;
... ... @@ -133,37 +131,37 @@ public class SellerWrapper {
SellerAssetPolicy sellerAssetPolicy = null;
if (sellerBo.isSuper()){
sellerAssetPolicy = SellerAssetPolicy.builder()
.earnestMoneyPolicy(SellerAssetPolicy.EarnestMoneyPolicy.builder().payment(Payment.WALLET).free(true).build())
.penaltyMoneyPolicy(SellerAssetPolicy.PenaltyMoneyPolicy.builder().payment(Payment.WALLET).necessary(true).build())
.goodsIncomePolicy(SellerAssetPolicy.GoodsIncomePolicy.builder().payment(Payment.ALIPAY).settlementType(SettlementType.ONE_TIME_TRADE).build())
.earnestMoneyPolicy(EarnestMoneyPolicy.builder().payment(Payment.WALLET).free(true).build())
.penaltyMoneyPolicy(PenaltyMoneyPolicy.builder().payment(Payment.WALLET).necessary(true).build())
.goodsIncomePolicy(GoodsIncomePolicy.builder().payment(Payment.ALIPAY).settlementType(SettlementType.ONE_TIME_TRADE).build())
.build();
}else if (sellerBo.isLargeSettlementSuper()){
sellerAssetPolicy = SellerAssetPolicy.builder()
.earnestMoneyPolicy(SellerAssetPolicy.EarnestMoneyPolicy.builder().payment(Payment.WALLET).free(true).build())
.penaltyMoneyPolicy(SellerAssetPolicy.PenaltyMoneyPolicy.builder().payment(Payment.WALLET).necessary(true).build())
.goodsIncomePolicy(SellerAssetPolicy.GoodsIncomePolicy.builder()
.earnestMoneyPolicy(EarnestMoneyPolicy.builder().payment(Payment.WALLET).free(true).build())
.penaltyMoneyPolicy(PenaltyMoneyPolicy.builder().payment(Payment.WALLET).necessary(true).build())
.goodsIncomePolicy(GoodsIncomePolicy.builder()
.settlementType(SettlementType.FIXED_AMOUNT).build())
.build();
}else if (sellerBo.isCommonEntry()){
sellerAssetPolicy = SellerAssetPolicy.builder()
.earnestMoneyPolicy(SellerAssetPolicy.EarnestMoneyPolicy.builder().payment(Payment.WALLET).free(false).build())
.penaltyMoneyPolicy(SellerAssetPolicy.PenaltyMoneyPolicy.builder().payment(Payment.WALLET).necessary(true).build())
.goodsIncomePolicy(SellerAssetPolicy.GoodsIncomePolicy.builder().payment(Payment.ALIPAY)
.earnestMoneyPolicy(EarnestMoneyPolicy.builder().payment(Payment.WALLET).free(false).build())
.penaltyMoneyPolicy(PenaltyMoneyPolicy.builder().payment(Payment.WALLET).necessary(true).build())
.goodsIncomePolicy(GoodsIncomePolicy.builder().payment(Payment.ALIPAY)
.settlementType(SettlementType.ONE_TIME_TRADE).build())
.build();
}else if (sellerBo.isNotEntry()){
sellerAssetPolicy = SellerAssetPolicy.builder()
.earnestMoneyPolicy(SellerAssetPolicy.EarnestMoneyPolicy.builder().free(false).build())
.penaltyMoneyPolicy(SellerAssetPolicy.PenaltyMoneyPolicy.builder().payment(Payment.ALIPAY).necessary(true).build())
.goodsIncomePolicy(SellerAssetPolicy.GoodsIncomePolicy.builder().payment(Payment.ALIPAY)
.earnestMoneyPolicy(EarnestMoneyPolicy.builder().free(false).build())
.penaltyMoneyPolicy(PenaltyMoneyPolicy.builder().payment(Payment.ALIPAY).necessary(true).build())
.goodsIncomePolicy(GoodsIncomePolicy.builder().payment(Payment.ALIPAY)
.settlementType(SettlementType.ONE_TIME_TRADE).build())
.build();
}else {
sellerAssetPolicy = SellerAssetPolicy.builder()
.earnestMoneyPolicy(SellerAssetPolicy.EarnestMoneyPolicy.builder().free(false).build())
.penaltyMoneyPolicy(SellerAssetPolicy.PenaltyMoneyPolicy.builder().payment(Payment.ALIPAY).necessary(true).build())
.goodsIncomePolicy(SellerAssetPolicy.GoodsIncomePolicy.builder().payment(Payment.ALIPAY)
.earnestMoneyPolicy(EarnestMoneyPolicy.builder().free(false).build())
.penaltyMoneyPolicy(PenaltyMoneyPolicy.builder().payment(Payment.ALIPAY).necessary(true).build())
.goodsIncomePolicy(GoodsIncomePolicy.builder().payment(Payment.ALIPAY)
.settlementType(SettlementType.ONE_TIME_TRADE).build())
.build();
}
... ...