...
|
...
|
@@ -2,6 +2,7 @@ package com.yohoufo.user.service.impl; |
|
|
|
|
|
import com.yoho.error.exception.ServiceException;
|
|
|
import com.yohobuy.ufo.model.enums.StoredSellerStatusEnum;
|
|
|
import com.yohoufo.common.ApiResponse;
|
|
|
import com.yohoufo.common.caller.UfoServiceCaller;
|
|
|
import com.yohoufo.dal.user.IStoredSellerDao;
|
|
|
import com.yohoufo.dal.user.model.StoredSeller;
|
...
|
...
|
@@ -55,7 +56,25 @@ public class StoredSellerServiceImpl implements IStoredSellerService { |
|
|
throw new ServiceException(400,"商户入驻状态变化,不允许退驻!");
|
|
|
}
|
|
|
|
|
|
//TODO 检查商户是否有出售中的商品,或者有订单未完成的 ,都不可以提交
|
|
|
// 检查商户是否有出售中的商品,或者有订单未完成的 ,都不可以提交
|
|
|
ApiResponse apiResponse=ufoServiceCaller.call("ufo.sellerOrder.getUnfinishedOrderBySellerUid", ApiResponse.class,uid);
|
|
|
if(apiResponse==null||apiResponse.getCode()!=200){
|
|
|
throw new ServiceException(400,"商户订单获取异常,不允许退驻!");
|
|
|
}
|
|
|
Integer total =(Integer)apiResponse.getData();
|
|
|
if(total!=null && total>0){
|
|
|
logger.error("quitStoredSeller not allowed cause of unfinished order ,total {}" ,total);
|
|
|
throw new ServiceException(400,"商户存在未完成订单,不允许退驻!");
|
|
|
}
|
|
|
apiResponse=ufoServiceCaller.call("ufo.sellerOrder.getCanSellSkupBySellerUid", ApiResponse.class,uid);
|
|
|
if(apiResponse==null||apiResponse.getCode()!=200){
|
|
|
throw new ServiceException(400,"商户商品获取异常,不允许退驻!");
|
|
|
}
|
|
|
total =(Integer)apiResponse.getData();
|
|
|
if(total!=null && total>0){
|
|
|
logger.error("quitStoredSeller not allowed cause of can seller product ,total {}" ,total);
|
|
|
throw new ServiceException(400,"商户存在出售中商品,不允许退驻!");
|
|
|
}
|
|
|
|
|
|
|
|
|
LocalDateTime now=LocalDateTime.now();
|
...
|
...
|
|