Authored by gemingdan

无返利skn不展示在前台

... ... @@ -1749,13 +1749,14 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
if (CollectionUtils.isEmpty(unionShareOrdersProductlist)) {
return new ArrayList<>();
}
List<UnionShareOrdersProduct> result = new ArrayList<>();
for (UnionShareOrdersProduct p : unionShareOrdersProductlist) {
if (p.getAmount() != null && p.getAmount().compareTo(new BigDecimal(0)) < 1 && !p.getVid().equals("0")) {
if (p.getAmount() == null || (p.getVid()!=null && p.getVid().equals("0"))|| p.getAmount().compareTo(new BigDecimal(0)) > 0) {
//老数据
unionShareOrdersProductlist.remove(p);
result.add(p);
}
}
return unionShareOrdersProductlist;
return result;
}
/**
... ... @@ -3711,55 +3712,6 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
settlementLog.warn("relateSettlementAndOrder end,uid is {},settlementCode is {},totalAmount is {},insert nothing.",uid,settlementCode,totalAmount);
}
sendSettlementMqToErp(settlementCode, uid);
//todo 删除下面部分
/*
List<UnionShareOrdersBo> orderList = new ArrayList<>();//该提现对应的订单
int size = 1000;
int page = count % size > 0 ? (count / size) + 1 : count / size;
for (int i = 0; i < page; i++) {
int offset = i * size ;
List<UnionShareOrders> periodOrders = unionShareOrdersMapper.selectOrderByCondition(settlementCode, offset, size);
if (CollectionUtils.isEmpty(periodOrders) || periodOrders.get(0) == null) {
break;
}
periodOrders.forEach(o->{
UnionShareOrdersBo b = new UnionShareOrdersBo();
BeanUtils.copyProperties(o,b);
if (b.getActivityId()>0) {
b.setActivityType(2);
}
orderList.add(b);
});
}
//查询活动额外返的返利单
List<Integer> ids = unionShareOrdersMapper.selectIdForActivity(settlementCode);
List<UnionShareOrdersActivityBo> activityBos = new ArrayList<>();
if(CollectionUtils.isNotEmpty(ids)){
List<UnionShareOrdersActivityLogs> activities = unionShareOrdersActivityLogsMapper.selectByOrderIds(ids);
activities.forEach(a->{
UnionShareOrdersActivityBo bo = new UnionShareOrdersActivityBo();
BeanUtils.copyProperties(a,bo);
bo.setId(a.getOrderId());
activityBos.add(bo);
});
}
if (CollectionUtils.isEmpty(orderList)&&CollectionUtils.isEmpty(activityBos)) {
//不该查不到订单
settlementLog.warn("relateSettlementAndOrder end,uid is {},settlementCode is {},totalAmount is {},can not find orders and activity.",uid,settlementCode,totalAmount);
throw new ServiceException(ServiceError.UNION_SETTLEMENT_CANNOT_FIND_ORDER_ERROR);
}
//清缓存
clearShareOrderRedis(uid);
// 发送取现mq给erp SETTLEMENT_TOPIC
ShareSettlementBo bo = new ShareSettlementBo();
BeanUtils.copyProperties(insertReq,bo);
bo.setOrderList(orderList);
bo.setActivities(activityBos);
mqLog.info("relateSettlementAndOrder,send mq {} to erp,uid is {},settlementCode is {},bo is {}", SETTLEMENT_TOPIC, uid, settlementCode, JsonUtil.objectToJSON(bo));
yhProducer.send(SETTLEMENT_TOPIC, bo);
settlementLog.info("relateSettlementAndOrder,send mq {} to erp success,uid is {},settlementCode is {},bo is {}", SETTLEMENT_TOPIC, uid, settlementCode, bo);
*/
return totalAmount;
}
... ...