| | |
| | | package com.tourguide.modules.user.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.tourguide.common.exception.BusinessException; |
| | | import com.tourguide.modules.order.domain.OrderStatus; |
| | | import com.tourguide.modules.order.entity.TourOrder; |
| | |
| | | if (idCardNo != null && !idCardNo.trim().isEmpty()) { |
| | | guideApplicationMapper.clearIdentityByIdCard(idCardNo); |
| | | } |
| | | user.setUsername("deleted_" + UUID.randomUUID().toString().replace("-", "").substring(0, 24)); |
| | | user.setMobile(null); |
| | | user.setCertificateNo(null); |
| | | user.setIdCardNo(null); |
| | | user.setIdCardFrontUrl(null); |
| | | user.setIdCardBackUrl(null); |
| | | user.setStatus(GuideUserService.STATUS_CANCELLED); |
| | | user.setAutoDisableWhitelisted(0); |
| | | user.setAutoDisabled(0); |
| | | guideUserMapper.updateById(user); |
| | | guideUserMapper.update(null, new LambdaUpdateWrapper<GuideUser>() |
| | | .eq(GuideUser::getId, guideId) |
| | | .set(GuideUser::getUsername, "deleted_" + UUID.randomUUID().toString().replace("-", "").substring(0, 24)) |
| | | .set(GuideUser::getMobile, null) |
| | | .set(GuideUser::getCertificateNo, null) |
| | | .set(GuideUser::getIdCardNo, null) |
| | | .set(GuideUser::getIdCardFrontUrl, null) |
| | | .set(GuideUser::getIdCardBackUrl, null) |
| | | .set(GuideUser::getStatus, GuideUserService.STATUS_CANCELLED) |
| | | .set(GuideUser::getAutoDisableWhitelisted, 0) |
| | | .set(GuideUser::getAutoDisabled, 0)); |
| | | tokenSessionService.remove(payload); |
| | | } |
| | | } |