...
|
...
|
@@ -1900,6 +1900,32 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport |
|
|
return list;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@Database(ForceMaster = true)
|
|
|
public void reParticipateActivity(String ordercodes) {
|
|
|
logger.info("reParticipateActivity,ordercodes is {}.",ordercodes);
|
|
|
List<String> orderCodeList = Arrays.stream(ordercodes.split(",")).collect(Collectors.toList());
|
|
|
List<UnionShareOrders> orders = unionShareOrdersMapper.selectListByOrderCodesForActivity(orderCodeList);
|
|
|
orders.forEach(order->{
|
|
|
if (order.getActivityId() > 0) {
|
|
|
logger.info("reParticipateActivity,has participated,ordercode is {}.",order.getOrderCode());
|
|
|
return;
|
|
|
}
|
|
|
//活动返利
|
|
|
try {
|
|
|
List<UnionShareOrdersActivity> activityList = queryActivityByDate(order.getOrderTime());
|
|
|
for (UnionShareOrdersActivity a :activityList ) {
|
|
|
if(participateActivity(order,a)) {
|
|
|
//参加了活动,参加一个加返活动就可以了
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
logger.warn("reParticipateActivity warn,fail to handle some activities.order is {}",order);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 参加加倍返活动
|
|
|
* */
|
...
|
...
|
|