...
|
...
|
@@ -2,12 +2,17 @@ package com.yohoufo.order.service.impl; |
|
|
|
|
|
import com.google.common.cache.Cache;
|
|
|
import com.google.common.cache.CacheBuilder;
|
|
|
import com.yohobuy.ufo.model.order.common.EntrySellerDepositType;
|
|
|
import com.yohoufo.dal.order.EntrySellerRechargeOrderMapper;
|
|
|
import com.yohoufo.dal.order.TradeBillsMapper;
|
|
|
import com.yohoufo.dal.order.model.EntrySellerRechargeOrder;
|
|
|
import com.yohoufo.dal.order.model.TradeBills;
|
|
|
import com.yohoufo.order.common.TradeType;
|
|
|
import com.yohoufo.order.model.EntrySellerDepositBo;
|
|
|
import com.yohoufo.order.model.bo.TradeBillsBo;
|
|
|
import com.yohoufo.order.model.bo.TradeBillsSummaryBo;
|
|
|
import com.yohoufo.order.model.response.AssetsResp;
|
|
|
import com.yohoufo.order.model.response.EntrySellerDepositResp;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
...
|
...
|
@@ -35,6 +40,9 @@ public class AssetsService { |
|
|
@Autowired
|
|
|
private TradeBillsMapper tradeBillsMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private EntrySellerRechargeOrderMapper entrySellerRechargeOrderMapper;
|
|
|
|
|
|
public AssetsResp getAssetsDetails(int uid, int page, int pageSize){
|
|
|
|
|
|
//TODO get count
|
...
|
...
|
@@ -61,6 +69,38 @@ public class AssetsService { |
|
|
return assetsResp;
|
|
|
}
|
|
|
|
|
|
public EntrySellerDepositResp getStoredSellerDepositDetail(int uid, int page, int pageSize){
|
|
|
int total = entrySellerRechargeOrderMapper.selectCountByUid(uid);
|
|
|
|
|
|
List<EntrySellerDepositBo> detailList = new ArrayList<>();;
|
|
|
if(total>0){
|
|
|
List<EntrySellerRechargeOrder> orders=entrySellerRechargeOrderMapper.selectWithPageByUid(uid,page,pageSize);
|
|
|
for(EntrySellerRechargeOrder order:orders){
|
|
|
EntrySellerDepositBo bo=new EntrySellerDepositBo();
|
|
|
bo.setUid(order.getUid());
|
|
|
bo.setOrderCode(order.getOrderCode());
|
|
|
bo.setPayment(order.getPayment());
|
|
|
bo.setStatus(order.getStatus());
|
|
|
bo.setAmount(order.getAmount());
|
|
|
bo.setCreateTime(order.getCreateTime());
|
|
|
bo.setType(order.getType());
|
|
|
bo.setTypeDesc(EntrySellerDepositType.getDescByType(order.getType()));
|
|
|
detailList.add(bo);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
EntrySellerDepositResp resp=new EntrySellerDepositResp();
|
|
|
resp.setData(detailList);
|
|
|
resp.setTotal(total);
|
|
|
resp.setPage(page);
|
|
|
if(total<=0){
|
|
|
resp.setPagetotal(0);
|
|
|
}else{
|
|
|
resp.setPagetotal(total%pageSize==0?total/pageSize:((total/pageSize)+1));
|
|
|
}
|
|
|
return resp;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* TODO 可以考虑把第一页放缓存
|
|
|
* @param uid
|
...
|
...
|
|