|
|
@@ -3978,13 +3978,15 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
User user = userMapper.selectById(userId);
|
|
|
if (user == null) throw BusinessRuntimeException.getGatewayApiCode(GatewayApiCode.CMS_TOKEN_VALID);
|
|
|
if (user.getIsBlack()) throw BusinessRuntimeException.getInstance("系统检测操作异常,请稍后再试");
|
|
|
- List<Long> userIdList = userBindRelationService.getRelationUserIdList(userId, user);
|
|
|
- int noPayCount = orderDonMapper.selectCount(Wrappers.lambdaQuery(OrderDon.class)
|
|
|
- .in(OrderDon::getUserId, userIdList)
|
|
|
- .eq(OrderDon::getRelationId, payRequest.getRelationId())
|
|
|
- .eq(OrderDon::getStatus, OrderDon.Status.noPayment.toString()));
|
|
|
- if (noPayCount > 0) {
|
|
|
- throw new BusinessRuntimeException("您有未支付订单.");
|
|
|
+ if (payRequest.getCmt() == 1) {
|
|
|
+ List<Long> userIdList = userBindRelationService.getRelationUserIdList(userId, user);
|
|
|
+ int noPayCount = orderDonMapper.selectCount(Wrappers.lambdaQuery(OrderDon.class)
|
|
|
+ .in(OrderDon::getUserId, userIdList)
|
|
|
+ .eq(OrderDon::getRelationId, payRequest.getRelationId())
|
|
|
+ .eq(OrderDon::getStatus, OrderDon.Status.noPayment.toString()));
|
|
|
+ if (noPayCount > 0) {
|
|
|
+ throw new BusinessRuntimeException("您有未支付订单.");
|
|
|
+ }
|
|
|
}
|
|
|
GroupsRelation groupsRelation = getGroupsRelation(payRequest.getUserId(), payRequest.getRelationId());
|
|
|
GroupsTrips groupsTrips = getGroupsTrips(groupsRelation);
|