ruoyi-admin/src/main/java/com/ruoyi/im/service/impl/ImApiServcieImpl.java
@@ -193,6 +193,11 @@ log.error("-----------注册账号异常:"+ErrorCodeEnum.getByCode(code).getComment()+"----im信息:"+ErrorCodeEnum.getByCode(code).getDesc()); throw new RuntimeException(errorMsg); } //修改昵称 UpdateUserBusinessDto userBusinessDto = new UpdateUserBusinessDto(); userBusinessDto.setName(dto.getNikeName()); updateUserAvatar(dto.getAccount(),userBusinessDto); //默认添加邀请人为好友 if(ObjectUtil.isNotEmpty(user)){ addFriends(userAccount.getAccount(),user.getAccount()); @@ -376,8 +381,6 @@ return result; } /** * 生成校验和 ruoyi-admin/src/main/java/com/ruoyi/im/service/impl/UserPolicyServiceImpl.java
@@ -131,7 +131,6 @@ userPolicy.setIsLifelong(insuranceProduct.getTerm() == 0 ? 0 : 1); save(userPolicy); extracted(userAccount, userPolicy.getId(), orderNo,PaymentRecord.PaymentStatus.PENDING.getCode(),userPolicy.getProductId(),userPolicy.getProductName()); return Result.success(payUrl); case 401: extracted(userAccount, null, orderNo,PaymentRecord.PaymentStatus.FAILED.getCode(),null,"获取支付通道失败"); ruoyi-admin/src/main/java/com/ruoyi/im/task/MedicalInsuranceTask.java
@@ -1,5 +1,6 @@ package com.ruoyi.im.task; import cn.hutool.core.stream.CollectorUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.ruoyi.im.service.MedicalInsuranceAccountService; import com.ruoyi.im.service.UserPolicyService; @@ -13,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; import java.time.LocalDate; import java.util.ArrayList; @@ -122,12 +124,14 @@ List<Integer> ids = list.stream() .map(UserPolicy::getId) // 提取orderId字段 .collect(Collectors.toList()); List<PaymentRecord> records = paymentRecordService.list(new LambdaQueryWrapper<PaymentRecord>() .in(PaymentRecord::getOrderId, ids) ); userPolicyService.removeByIds(list); userPolicyService.removeByIds(records); if(!CollectionUtils.isEmpty(ids)){ List<PaymentRecord> records = paymentRecordService.list(new LambdaQueryWrapper<PaymentRecord>() .in(PaymentRecord::getOrderId, ids) ); userPolicyService.removeByIds(records); } if(!CollectionUtils.isEmpty(list)){ userPolicyService.removeByIds(list); } } }