xhxu 3 лет назад
Родитель
Сommit
05871da3aa
1 измененных файлов: 18 добавлений и 18 удалений
  1. +18
    -18
      mallinkService/src/main/java/com/iformall/service/impl/WxCardSpendServiceImpl.java

+ 18
- 18
mallinkService/src/main/java/com/iformall/service/impl/WxCardSpendServiceImpl.java Просмотреть файл

@@ -531,10 +531,11 @@ public class WxCardSpendServiceImpl implements WxCardSpendService {
}
private List<WxCardSpendVo> handleToCardSpendVoList(List<WxCardSpend> list,TenantEntity tenantEntity) {
List<WxCardSpendVo> retList = new ArrayList<WxCardSpendVo>();
if (null != list && list.size() > 0 ){
List<Long> merchantIdList = new ArrayList<Long>();
List<Long> cardInfoIdList = new ArrayList<Long>();
List<Long> merchantSubsidyOrderIdList = new ArrayList<Long>();
// List<Long> merchantSubsidyOrderIdList = new ArrayList<Long>();
List<Long> userIdList = new ArrayList<Long>();
List<Long> couponIdList = new ArrayList<Long>();
for (int i = 0 ; i < list.size(); i++ ){
@@ -545,9 +546,9 @@ public class WxCardSpendServiceImpl implements WxCardSpendService {
if (null != _wcs.getCardId() && (!cardInfoIdList.contains(_wcs.getCardId()))) {
cardInfoIdList.add(_wcs.getCardId()) ;
}
if (null != _wcs.getOrderId() && (!merchantSubsidyOrderIdList.contains(_wcs.getOrderId()))) {
merchantSubsidyOrderIdList.add(_wcs.getOrderId()) ;
}
// if (null != _wcs.getOrderId() && (!merchantSubsidyOrderIdList.contains(_wcs.getOrderId()))) {
// merchantSubsidyOrderIdList.add(_wcs.getOrderId()) ;
// }
if (null != _wcs.getOwnerId() && (!userIdList.contains(_wcs.getOwnerId()))) {
userIdList.add(_wcs.getOwnerId()) ;
}
@@ -555,8 +556,7 @@ public class WxCardSpendServiceImpl implements WxCardSpendService {
}
Map<Long,WxMerchant> merchantMap = getMerchantMap(merchantIdList, tenantEntity);

Map<Long,Long> cardCouponIdMap = new HashMap<Long,Long>();
Map<Long,WxCardInfo> cardInfoMap = new HashMap<Long,WxCardInfo>();
if (cardInfoIdList.size() > 0 ){
@@ -578,11 +578,11 @@ public class WxCardSpendServiceImpl implements WxCardSpendService {
Map<Long,WxCoupon> couponMap = getCouponMap(couponIdList, tenantEntity);
Map<Long,WxMerchantSubsidy> orderSubsidyMap = getOrderSubsidyMap(merchantSubsidyOrderIdList, tenantEntity);
// Map<Long,WxMerchantSubsidy> orderSubsidyMap = getOrderSubsidyMap(merchantSubsidyOrderIdList, tenantEntity);
Map<Long,WxCUserBasicInfo> userMap = getUserMap(userIdList, tenantEntity);
List<WxCardSpendVo> retList = new ArrayList<WxCardSpendVo>();
for (int i = 0 ; i < list.size(); i++ ){
WxCardSpend _wcs = list.get(i);
WxCardSpendVo vo = new WxCardSpendVo();
@@ -608,14 +608,14 @@ public class WxCardSpendServiceImpl implements WxCardSpendService {
vo.setWxCardInfo(cardInfo);
}
}
if (null != _wcs.getOrderId()) {
WxMerchantSubsidy subsidy = orderSubsidyMap.get(_wcs.getOrderId());
if (null != subsidy) {
vo.setSubsidy(subsidy.getSubsidy());
vo.setRealSubsidy(subsidy.getRealSubsidy());
vo.setStatus(subsidy.getStatus());
}
}
// if (null != _wcs.getOrderId()) {
// WxMerchantSubsidy subsidy = orderSubsidyMap.get(_wcs.getOrderId());
// if (null != subsidy) {
// vo.setSubsidy(subsidy.getSubsidy());
// vo.setRealSubsidy(subsidy.getRealSubsidy());
// vo.setStatus(subsidy.getStatus());
// }
// }
if (null != _wcs.getOwnerId()) {
WxCUserBasicInfo user = userMap.get(_wcs.getOwnerId());
if (null != user) {
@@ -632,7 +632,7 @@ public class WxCardSpendServiceImpl implements WxCardSpendService {
}
return retList;
}
return null;
return retList;
}

@Override
@@ -692,7 +692,7 @@ public class WxCardSpendServiceImpl implements WxCardSpendService {
record.setMerchantIdList(merchantIds);
}
}
if(EnumCardInfoType.CARD.equals(record.getCardType()) && record.getCardId() != null){
if(EnumCardInfoType.CARD.getCode().equals(record.getCardType()) && record.getCardId() != null){
WxCardInfo cardInfo = wxCardInfoService.getByCouponPasswordId(record.getCardId(), record);
if(cardInfo == null){
record.setId(-999L);


Загрузка…
Отмена
Сохранить