|
|
@@ -2663,6 +2663,9 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
sendSubDistributeRewards(orderDon);
|
|
|
//删除用户意向标签
|
|
|
clearEpIntentionTag(goodsDon, orderDon.getUserId());
|
|
|
+
|
|
|
+ //HBO GO车队满员 车队自动下架
|
|
|
+ setTripDownIfFull(orderDon);
|
|
|
} catch (Exception e) {
|
|
|
log.error("回调修改订单信息错误,orderId:{},error:{}", orderDon.getId(), StringUtil.getErrorText(e));
|
|
|
}
|
|
|
@@ -2717,6 +2720,26 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ private void setTripDownIfFull(OrderDon orderDon) {
|
|
|
+ if (orderDon.getGoodsId() == 8l) {
|
|
|
+ Long relationId = orderDon.getRelationId();
|
|
|
+ GroupsRelation relation = groupsRelationMapper.selectById(relationId);
|
|
|
+ GroupsTrips groupsTrips = groupsMapper.selectById(relation.getGroupsId());
|
|
|
+ if (groupsTrips.getStatus() == GroupsTrips.Status.validity) {
|
|
|
+ Integer count = groupsRelationMapper.selectCount(Wrappers.lambdaQuery(GroupsRelation.class)
|
|
|
+ .eq(GroupsRelation::getGroupsId, relation.getGroupsId())
|
|
|
+ .in(GroupsRelation::getStatus, List.of(GroupsRelation.Status.none, GroupsRelation.Status.locking)));
|
|
|
+ if (count == 0) {
|
|
|
+ log.info("HBO GO车队:{}已满员,自动下架", relation.getGroupsId());
|
|
|
+ groupsMapper.update(null, Wrappers.lambdaUpdate(GroupsTrips.class)
|
|
|
+ .set(GroupsTrips::getStatus, GroupsTrips.Status.down)
|
|
|
+ .eq(GroupsTrips::getId, relation.getGroupsId()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private void mjRenewOrder(OrderDon orderDon){
|
|
|
if (orderDon.getOrderType() == 2 && orderDon.getGoodsId() == 26) {
|
|
|
GoodsDonSku goodsDonSku = goodsDonSkuMapper.selectById(orderDon.getSkuId());
|