| | |
| | | import com.ruoyi.system.domain.*; |
| | | import com.ruoyi.system.domain.dto.UserPolicyDto; |
| | | import com.ruoyi.system.mapper.UserPolicyMapper; |
| | | import com.ruoyi.system.service.GroupWelcomeConfigService; |
| | | import com.ruoyi.system.service.PaymentRecordService; |
| | | import com.ruoyi.system.service.UserAccountService; |
| | | import org.json.JSONObject; |
| | |
| | | private PaymentRecordService paymentRecordService; |
| | | @Autowired |
| | | private UserKycService userKycService; |
| | | @Autowired |
| | | private GroupWelcomeConfigService groupWelcomeConfigService; |
| | | |
| | | |
| | | @Override |
| | |
| | | if(ObjectUtil.isEmpty(insuranceProduct)){ |
| | | return Result.error("该产品停止购买或已下架!"); |
| | | } |
| | | |
| | | if(!dto.getPayProductId().equals("0")){ |
| | | |
| | | GroupWelcomeConfig groupWelcomeConfig = groupWelcomeConfigService.getOne(new LambdaQueryWrapper<>(GroupWelcomeConfig.class) |
| | | .eq(GroupWelcomeConfig::getConfigurationName, "IM-BASICS").last(" limit 1")); |
| | | if(ObjectUtil.isNotEmpty(groupWelcomeConfig) && ObjectUtil.isNotEmpty(groupWelcomeConfig.getPaymentSwitch()) && !groupWelcomeConfig.getPaymentSwitch()){ |
| | | return Result.error("无可用支付方式!"); |
| | | } |
| | | |
| | | String orderNo = generateOrderNo(); |
| | | String payOrder = payService.createOrder( |
| | | insuranceProduct.getPremium(), |