|
|
@@ -1171,6 +1171,8 @@ public class CmsOrderDonServiceImpl extends ServiceImpl<OrderDonMapper,OrderDon>
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //HBO GO退款,车队上架
|
|
|
+ setUpIfEmpty(orderDon.getGoodsId(), orderDon.getRelationId());
|
|
|
}
|
|
|
|
|
|
//处理下级渠道分销提成
|
|
|
@@ -1601,4 +1603,26 @@ public class CmsOrderDonServiceImpl extends ServiceImpl<OrderDonMapper,OrderDon>
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 车队退款 自动上架
|
|
|
+ */
|
|
|
+ private void setUpIfEmpty(Long goodsId, Long relationId) {
|
|
|
+ if (goodsId == Constant.HBO_GO_GOODS_ID) {
|
|
|
+ GroupsRelation relation = relationMapper.selectById(relationId);
|
|
|
+ if (relation == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ GroupsTrips groupsTrips = groupsMapper.selectById(relation.getGroupsId());
|
|
|
+ if (groupsTrips == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (groupsTrips.getStatus() == GroupsTrips.Status.down) {
|
|
|
+ log.info("HBO GO车队:{}存在退款,自动上架", groupsTrips.getId());
|
|
|
+ groupsMapper.update(null, Wrappers.lambdaUpdate(GroupsTrips.class)
|
|
|
+ .set(GroupsTrips::getStatus, GroupsTrips.Status.validity)
|
|
|
+ .eq(GroupsTrips::getId, groupsTrips.getId()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|