|
|
@@ -139,7 +139,11 @@ public class DoctorUserServiceImpl implements IDoctorUserService {
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public Boolean bindTenant(BizAppUserBindHospitalDTO source) {
|
|
|
SysTenantPO tenant = tenantRepository.selectOne(new LambdaQueryWrapper<SysTenantPO>()
|
|
|
- .eq(SysTenantPO::getInviteCode, source.getInviteCode())
|
|
|
+ .nested(r->
|
|
|
+ r.eq(SysTenantPO::getInviteCode, source.getInviteCode())
|
|
|
+ .or()
|
|
|
+ .eq(SysTenantPO::getId, source.getInviteCode())
|
|
|
+ )
|
|
|
.last("limit 1"));
|
|
|
if(ObjectUtil.isNull(tenant)){
|
|
|
throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "邀请码不存在");
|