Authored by chenchao

optimized construct

@@ -715,15 +715,6 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi @@ -715,15 +715,6 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi
715 return total; 715 return total;
716 } 716 }
717 717
718 - /**  
719 - * 商家出售中的商品  
720 - */  
721 - public int getCanSellSkupBySellerUid(Integer uid){  
722 - log.info("in seller order getCanSellSkupBySellerUid count uid {} ", uid);  
723 - Integer total = sellerOrderGoodsMapper.selectCntByUidStatusList(uid, Arrays.asList(SkupStatus.CAN_SELL.getCode()));  
724 - log.info("in seller order getCanSellSkupBySellerUid count uid {}, total {} ", uid, total);  
725 - return total;  
726 - }  
727 718
728 public SellerOrderListResp refresh(OrderRequest req){ 719 public SellerOrderListResp refresh(OrderRequest req){
729 int uid = req.getUid(); 720 int uid = req.getUid();
@@ -16,6 +16,7 @@ import org.springframework.stereotype.Service; @@ -16,6 +16,7 @@ import org.springframework.stereotype.Service;
16 import org.springframework.transaction.annotation.Propagation; 16 import org.springframework.transaction.annotation.Propagation;
17 import org.springframework.transaction.annotation.Transactional; 17 import org.springframework.transaction.annotation.Transactional;
18 18
  19 +import java.util.Arrays;
19 import java.util.List; 20 import java.util.List;
20 21
21 /** 22 /**
@@ -48,5 +49,14 @@ public class SkupService { @@ -48,5 +49,14 @@ public class SkupService {
48 return result; 49 return result;
49 } 50 }
50 51
  52 + /**
  53 + * 商家出售中的商品
  54 + */
  55 + public int getCanSellSkupBySellerUid(Integer uid){
  56 + logger.info("in seller order getCanSellSkupBySellerUid count uid {} ", uid);
  57 + Integer total = sellerOrderGoodsMapper.selectCntByUidStatusList(uid, Arrays.asList(SkupStatus.CAN_SELL.getCode()));
  58 + logger.info("in seller order getCanSellSkupBySellerUid count uid {}, total {} ", uid, total);
  59 + return total;
  60 + }
51 61
52 } 62 }
@@ -71,6 +71,9 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi @@ -71,6 +71,9 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi
71 @Autowired 71 @Autowired
72 StoredSellerCacheService storedSellerCacheService; 72 StoredSellerCacheService storedSellerCacheService;
73 73
  74 + @Autowired
  75 + private SkupService skupService;
  76 +
74 /** 77 /**
75 * 充值保证金 78 * 充值保证金
76 */ 79 */
@@ -200,7 +203,7 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi @@ -200,7 +203,7 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi
200 throw new UfoServiceException(400,"商户存在未完成订单,不允许退驻!"); 203 throw new UfoServiceException(400,"商户存在未完成订单,不允许退驻!");
201 } 204 }
202 205
203 - total=sellerOrderService.getCanSellSkupBySellerUid(uid); 206 + total=skupService.getCanSellSkupBySellerUid(uid);
204 if(total!=null && total>0){ 207 if(total!=null && total>0){
205 logger.error("quitStoredSeller not allowed cause of can seller product ,uid {} ,total {}" ,uid,total); 208 logger.error("quitStoredSeller not allowed cause of can seller product ,uid {} ,total {}" ,uid,total);
206 throw new UfoServiceException(400,"商户存在出售中商品,不允许退驻!"); 209 throw new UfoServiceException(400,"商户存在出售中商品,不允许退驻!");