|
|
@@ -66,6 +66,12 @@ public class UserMirrorShopOrderServiceImpl implements UserMirrorShopOrderServic
|
|
|
Long userId = shopSubmitReq.getUserId();
|
|
|
String customId = shopSubmitReq.getCustomId();
|
|
|
User user = userMapper.selectById(userId);
|
|
|
+ Integer selectCount = feeOrderDonMapper.selectCount(Wrappers.lambdaQuery(UserMirrorShopFeeOrderDon.class)
|
|
|
+ .eq(UserMirrorShopFeeOrderDon::getUserId, userId)
|
|
|
+ .eq(UserMirrorShopFeeOrderDon::getStatus, UserMirrorShopFeeOrderDon.Status.hasPayment));
|
|
|
+ if (selectCount > 0) {
|
|
|
+ throw BusinessRuntimeException.getInstance("您已支付开店加盟费");
|
|
|
+ }
|
|
|
UserMirrorShopFeeOrderDon userMirrorShopFeeOrderDon = Optional.ofNullable(feeOrderDonMapper.selectOne(Wrappers.lambdaQuery(UserMirrorShopFeeOrderDon.class).eq(UserMirrorShopFeeOrderDon::getUserId, userId)
|
|
|
.eq(UserMirrorShopFeeOrderDon::getStatus, UserMirrorShopFeeOrderDon.Status.noPayment)
|
|
|
.last("limit 1"))).orElse(new UserMirrorShopFeeOrderDon());
|