Authored by LUOXC

Merge branch 'hotfix-20190325' into test6.8.9

... ... @@ -19,13 +19,12 @@ import com.yohoufo.dal.order.model.StoredSeller;
import com.yohoufo.order.common.Payment;
import com.yohoufo.order.model.request.ShoppingRequest;
import com.yohoufo.order.model.response.OrderSubmitResponse;
import com.yohoufo.order.service.IStoredSellerService;
import com.yohoufo.order.service.IStoredSellerDepositService;
import com.yohoufo.order.service.IStoredSellerService;
import com.yohoufo.order.service.MerchantOrderPaymentService;
import com.yohoufo.order.service.cache.StoredSellerCacheService;
import com.yohoufo.order.service.proxy.InBoxFacade;
import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -45,6 +44,9 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi
@Value("${deposit.prestore}")
private Double depositPreStore;
@Value("${seller_earnest_money_deposit_limit:100}")
private BigDecimal earnestMoneyDepositLimit;
@Autowired
UfoServiceCaller ufoServiceCaller;
... ... @@ -102,6 +104,13 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi
throw new UfoServiceException(400, "不是入驻商户,无法充值!");
}
// TODO 获取剩余保证金金额
BigDecimal totalEarnestMoney = BigDecimal.ZERO;
if (totalEarnestMoney.add(amount).compareTo(earnestMoneyDepositLimit) > 0) {
throw new UfoServiceException(400, "账户余额不能超过" + earnestMoneyDepositLimit);
}
// 生成订单号
long orderCode = orderCodeGenerator.generate(OrderCodeType.SELLER_RECHARGE_EARNEST_TYPE);
... ...