...
|
...
|
@@ -2,18 +2,13 @@ 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.Payment;
|
|
|
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;
|
...
|
...
|
@@ -70,40 +65,6 @@ 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,pageSize*(page-1),pageSize);
|
|
|
for(EntrySellerRechargeOrder order:orders){
|
|
|
EntrySellerDepositBo bo=new EntrySellerDepositBo();
|
|
|
bo.setUid(order.getUid());
|
|
|
bo.setOrderCode(order.getOrderCode());
|
|
|
bo.setPayment(order.getPayment());
|
|
|
bo.setPaymentDesc(Payment.getPaymentDesc(order.getPayment()));
|
|
|
bo.setStatus(order.getStatus());
|
|
|
bo.setStatusDesc((order.getStatus()!=null&&1==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);
|
|
|
resp.setPageSize(pageSize);
|
|
|
if(total<=0){
|
|
|
resp.setPagetotal(0);
|
|
|
}else{
|
|
|
resp.setPagetotal(total%pageSize==0?total/pageSize:((total/pageSize)+1));
|
|
|
}
|
|
|
return resp;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* TODO 可以考虑把第一页放缓存
|
...
|
...
|
|