Authored by chenchao

add throw error code when wallet left not enough

... ... @@ -216,7 +216,6 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi
//发布支付超时取消消息
pushAutoCancelEvent(context);
// 发消息
GoodsInfo goodsInfo = context.getSoldProduct();
OrderSubmitResp resp = OrderSubmitResp.builder().orderCode(orderCode).productId(goodsInfo.getProductId()).build();
... ... @@ -235,13 +234,11 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi
if(isEntryShop){
log.info("in publishPrd use batchPublishPrds, req {}", req);
resp = batchPublishPrds(context, req);
}else{
log.info("in publishPrd use publishSinglePrd, req {}", req);
resp = publishSinglePrd(req, context);
cacheCleaner.cleanList(req.getUid(), TabType.SELL.getValue());
}
return resp;
}
... ... @@ -263,8 +260,7 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi
int uid = req.getUid();
SellerOrderComputeResult socr = ctx.getSellerOrderComputeResult();
BigDecimal singleEarestMoney = socr.getEarnestMoney().getEarnestMoney();
BigDecimal mEarestMoney = BigDecimalHelper.halfUp(new BigDecimal(num).multiply(singleEarestMoney));
BigDecimal mEarestMoney = sellerOrderPrepareProcessor.checkNGetMergeEarnestMoney(uid, singleEarestMoney, num, ctx.getSalePrice());
SellerWalletDetail.Type swdType = SellerWalletDetail.Type.PUBLISH;
MerchantOrderAttachInfo moai = MerchantOrderAttachInfo.builder().uid(uid)
.storageId(ctx.getStorageId()).earnestMoney(mEarestMoney)
... ...