|
|
package com.yohoufo.order.service.impl;
|
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.yoho.core.config.ConfigReader;
|
|
|
import com.yoho.core.rest.client.ServiceCaller;
|
|
|
import com.yoho.error.ServiceError;
|
|
|
import com.yoho.error.exception.ServiceException;
|
...
|
...
|
@@ -124,6 +125,9 @@ public class ShoppingServiceImpl implements IShoppingService { |
|
|
|
|
|
@Autowired
|
|
|
private OrderChangeListenerContainer orderChangeListenerContainer;
|
|
|
|
|
|
@Autowired
|
|
|
private ConfigReader configReader;
|
|
|
/**
|
|
|
* 结算页数据
|
|
|
* @param request
|
...
|
...
|
@@ -180,10 +184,11 @@ public class ShoppingServiceImpl implements IShoppingService { |
|
|
throw new ServiceException(ServiceError.ORDER_SKUP_CANNOT_SELL);
|
|
|
}
|
|
|
|
|
|
// 不可售
|
|
|
if (skupGood.getUid() == uid){
|
|
|
logger.warn("{} payment skup status {}, skup is {}", uid, skupGood.getStatus(), skup);
|
|
|
ServiceExceptions.throwServiceException("请不要购买自己销售的商品");
|
|
|
// 不允许购买自卖商品
|
|
|
if (!configReader.getBoolean("ufo.order.buyer.allow_buy_self_sell_goods",false )
|
|
|
&& skupGood.getUid() == uid){
|
|
|
logger.warn("{} buy self sell goods, skup is {}", uid, skup);
|
|
|
ServiceExceptions.throwServiceException("请不要购买自卖商品");
|
|
|
}
|
|
|
|
|
|
// 不可售
|
...
|
...
|
|