...
|
...
|
@@ -295,9 +295,11 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport |
|
|
private UnionShareOrderRspBO initShareUnionOrderRspBO(String unionType,MktMarketingUrl mktMarketingUrl,UnionShareOrders orders){
|
|
|
UnionShareOrderRspBO orderRspBO=new UnionShareOrderRspBO();
|
|
|
orderRspBO.setOrderAmount(orders.getLastOrderAmount());
|
|
|
orderRspBO.setAmount(orders.getAmount());
|
|
|
orderRspBO.setOrderStatus(ShareOrdersStatusEnum.getDescByCode(orders.getStatus()));
|
|
|
orderRspBO.setIsNew(orders.getIsNew());
|
|
|
orderRspBO.setUid(orders.getPromoteUid());
|
|
|
orderRspBO.setOrderUid(orders.getOrderUid());
|
|
|
orderRspBO.setOrderCode(orders.getOrderCode());
|
|
|
orderRspBO.setId(orders.getId());
|
|
|
orderRspBO.setOrderTime(DateUtil.long2DateStr(Long.valueOf(orders.getOrderTime()) * Long.valueOf(1000), "yyyy-MM-dd HH:mm:ss"));
|
...
|
...
|
@@ -322,7 +324,11 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport |
|
|
Map<Integer,UnionShareUser> userMap=unionShareUserMapper.selectByUids(getUids(ordersDOList));
|
|
|
Map<Long,MktMarketingUrl> mktMarketMap=listMktMarketingUrls(ordersDOList,userMap);
|
|
|
for (UnionShareOrders userOrders : ordersDOList) {
|
|
|
String unionType=userMap.get(userOrders.getPromoteUid()).getUnionType();
|
|
|
UnionShareUser unionShareUser = userMap.get(userOrders.getPromoteUid());
|
|
|
if (unionShareUser == null) {
|
|
|
continue;
|
|
|
}
|
|
|
String unionType= unionShareUser.getUnionType();
|
|
|
MktMarketingUrl mktMarketingUrl = isLong(unionType)?mktMarketMap.get(Long.valueOf(unionType)):null;
|
|
|
UnionShareOrderRspBO bo=initShareUnionOrderRspBO(unionType,mktMarketingUrl,userOrders);
|
|
|
unionOrderRspBOList.add(bo);
|
...
|
...
|
@@ -333,6 +339,10 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport |
|
|
private Map<Long,MktMarketingUrl> listMktMarketingUrls(List<UnionShareOrders> ordersDOList, Map<Integer,UnionShareUser> userMap){
|
|
|
List<String> unionTypes=new ArrayList<>();
|
|
|
for (UnionShareOrders userOrders : ordersDOList) {
|
|
|
UnionShareUser unionShareUser = userMap.get(userOrders.getPromoteUid());
|
|
|
if (unionShareUser == null) {
|
|
|
continue;
|
|
|
}
|
|
|
String unionType=userMap.get(userOrders.getPromoteUid()).getUnionType();
|
|
|
if(StringUtils.isNotBlank(unionType)){
|
|
|
unionTypes.add(unionType);
|
...
|
...
|
@@ -2445,6 +2455,18 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport |
|
|
logger.info("dealWithVirtualUserTask end.Virtual data is null.bo is {},today is {}",bo,date);
|
|
|
return;
|
|
|
}
|
|
|
if (bo.getNum() > -1) {
|
|
|
//不是手动执行,需要排除分布式其他机器已执行情况
|
|
|
UnionShareVirtualAddBo addBo=redisValueCache.get(VIRTUAL_ADD_KEY, UnionShareVirtualAddBo.class);
|
|
|
if (addBo == null) {
|
|
|
logger.info("dealWithVirtualUserTask end,query redis for virtual end.does not need");
|
|
|
return;
|
|
|
}
|
|
|
if (addBo.getNum()!=bo.getNum()) {
|
|
|
logger.info("dealWithVirtualUserTask end,query redis for virtual end.has be done");
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
logger.info("dealWithVirtualUserTask.bo is {},today is {},deal num is {}",bo,date,unionShareOrdersMonths.size());
|
|
|
unionShareOrdersMonths.forEach(un->{
|
|
|
int i = new Random().nextInt(499);
|
...
|
...
|
|