...
|
...
|
@@ -8,8 +8,10 @@ import com.yoho.core.rest.client.ServiceCaller; |
|
|
import com.yoho.error.exception.ServiceException;
|
|
|
import com.yoho.order.dal.SellerOrderGoodsMapper;
|
|
|
import com.yoho.order.dal.SellerWalletDetailMapper;
|
|
|
import com.yoho.order.dal.SellerWalletMapper;
|
|
|
import com.yoho.order.dal.StoredSellerMapper;
|
|
|
import com.yoho.order.dal.TradeBillsMapper;
|
|
|
import com.yoho.order.model.SellerWallet;
|
|
|
import com.yoho.order.model.StoredSeller;
|
|
|
import com.yoho.order.model.StoredSellerReqVo;
|
|
|
import com.yoho.order.model.TradeBills;
|
...
|
...
|
@@ -19,6 +21,7 @@ import com.yoho.ufo.order.constant.TradeStatusEnum; |
|
|
import com.yoho.ufo.order.response.StoredSellerRespVo;
|
|
|
import com.yoho.ufo.order.service.ITradeBillsService;
|
|
|
import com.yoho.ufo.service.model.PageResponseBO;
|
|
|
import com.yoho.ufo.util.CollectionUtil;
|
|
|
import com.yohobuy.ufo.model.enums.StoredSellerStatusEnum;
|
|
|
import com.yohobuy.ufo.model.order.resp.TradeBillsResp;
|
|
|
import com.yohobuy.ufo.model.user.req.AuthorizeInfoReq;
|
...
|
...
|
@@ -66,6 +69,9 @@ public class TradeBillsServiceImpl implements ITradeBillsService { |
|
|
|
|
|
@Autowired
|
|
|
private SellerWalletDetailMapper sellerWalletDetailMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private SellerWalletMapper sellerWalletMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private SellerOrderGoodsMapper sellerOrderGoodsMapper;
|
...
|
...
|
@@ -104,6 +110,8 @@ public class TradeBillsServiceImpl implements ITradeBillsService { |
|
|
|
|
|
private List<StoredSellerRespVo> convertToStoreSellerResp(List<StoredSeller> ls ){
|
|
|
List<StoredSellerRespVo> respList = Lists.newArrayList();
|
|
|
List<SellerWallet> sws = sellerWalletMapper.selectByUidAndMerchantUids(null, CollectionUtil.distinct(ls,StoredSeller::getUid), 0, ls.size());
|
|
|
Map<Integer, SellerWallet> swsMap = CollectionUtil.extractMap(sws, SellerWallet::getUid);
|
|
|
for(StoredSeller item : ls) {
|
|
|
StoredSellerRespVo resp=new StoredSellerRespVo();
|
|
|
resp.setUid(item.getUid());
|
...
|
...
|
@@ -114,10 +122,19 @@ public class TradeBillsServiceImpl implements ITradeBillsService { |
|
|
resp.setMobile(getMobileByUidFromCache(item.getUid()));
|
|
|
resp.setEnterTime(1000L * item.getEnterTime());
|
|
|
resp.setQuitTime(1000L * item.getQuitTime());
|
|
|
// 身份等级
|
|
|
resp.setEntryType(item.getEntryType());
|
|
|
// 上架skuP
|
|
|
resp.setSelfSkuNum(sellerOrderGoodsMapper.selectCountCanCell(item.getUid()));
|
|
|
// 违约次数
|
|
|
resp.setBreakRuleTimes(sellerWalletDetailMapper.selectUserBreakRulesCount(item.getUid()));
|
|
|
// 总余额
|
|
|
SellerWallet sw = swsMap.get(item.getUid());
|
|
|
if (sw != null) {
|
|
|
resp.setMoney(sw.getLockAmount().add(sw.getAmount()).setScale(2).toString());
|
|
|
} else {
|
|
|
resp.setMoney("");
|
|
|
}
|
|
|
respList.add(resp);
|
|
|
}
|
|
|
return respList;
|
...
|
...
|
|