Authored by chenchao

optimized construct

... ... @@ -715,15 +715,6 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi
return total;
}
/**
* 商家出售中的商品
*/
public int getCanSellSkupBySellerUid(Integer uid){
log.info("in seller order getCanSellSkupBySellerUid count uid {} ", uid);
Integer total = sellerOrderGoodsMapper.selectCntByUidStatusList(uid, Arrays.asList(SkupStatus.CAN_SELL.getCode()));
log.info("in seller order getCanSellSkupBySellerUid count uid {}, total {} ", uid, total);
return total;
}
public SellerOrderListResp refresh(OrderRequest req){
int uid = req.getUid();
... ...
... ... @@ -16,6 +16,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
/**
... ... @@ -48,5 +49,14 @@ public class SkupService {
return result;
}
/**
* 商家出售中的商品
*/
public int getCanSellSkupBySellerUid(Integer uid){
logger.info("in seller order getCanSellSkupBySellerUid count uid {} ", uid);
Integer total = sellerOrderGoodsMapper.selectCntByUidStatusList(uid, Arrays.asList(SkupStatus.CAN_SELL.getCode()));
logger.info("in seller order getCanSellSkupBySellerUid count uid {}, total {} ", uid, total);
return total;
}
}
... ...
... ... @@ -71,6 +71,9 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi
@Autowired
StoredSellerCacheService storedSellerCacheService;
@Autowired
private SkupService skupService;
/**
* 充值保证金
*/
... ... @@ -200,7 +203,7 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi
throw new UfoServiceException(400,"商户存在未完成订单,不允许退驻!");
}
total=sellerOrderService.getCanSellSkupBySellerUid(uid);
total=skupService.getCanSellSkupBySellerUid(uid);
if(total!=null && total>0){
logger.error("quitStoredSeller not allowed cause of can seller product ,uid {} ,total {}" ,uid,total);
throw new UfoServiceException(400,"商户存在出售中商品,不允许退驻!");
... ...