|
@@ -459,12 +459,16 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
|
|
|
// }
|
|
|
if("2".equals(commonUser.getLoginFlag())){
|
|
|
DriverInfo driverInfo = driverInfoService.selectOne(new EntityWrapper<DriverInfo>().eq("common_id",userDTO.getId()));
|
|
|
- userDTO.setDriverId(driverInfo.getId());
|
|
|
- userDTO.setStatusFlag(driverInfo.getAuthenticationStatus());
|
|
|
+ if (driverInfo != null){
|
|
|
+ userDTO.setDriverId(driverInfo.getId());
|
|
|
+ userDTO.setStatusFlag(driverInfo.getAuthenticationStatus());
|
|
|
+ }
|
|
|
}
|
|
|
if ("1".equals(commonUser.getLoginFlag())){
|
|
|
CargoOwnerInfo cargoOwnerInfo = cargoOwnerInfoService.selectOne(new EntityWrapper<CargoOwnerInfo>().eq("common_id",userDTO.getId()));
|
|
|
- userDTO.setStatusFlag(cargoOwnerInfo.getAuthenticationStatus());
|
|
|
+ if (cargoOwnerInfo != null) {
|
|
|
+ userDTO.setStatusFlag(cargoOwnerInfo.getAuthenticationStatus());
|
|
|
+ }
|
|
|
}
|
|
|
return userDTO;
|
|
|
}
|
|
@@ -589,12 +593,16 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
|
|
|
// }
|
|
|
if("2".equals(commonUser.getLoginFlag())){
|
|
|
DriverInfo driverInfo = driverInfoService.selectOne(new EntityWrapper<DriverInfo>().eq("common_id",user.getId()));
|
|
|
- user.setDriverId(driverInfo.getId());
|
|
|
- user.setStatusFlag(driverInfo.getAuthenticationStatus());
|
|
|
+ if (driverInfo != null){
|
|
|
+ user.setDriverId(driverInfo.getId());
|
|
|
+ user.setStatusFlag(driverInfo.getAuthenticationStatus());
|
|
|
+ }
|
|
|
}
|
|
|
if ("1".equals(commonUser.getLoginFlag())){
|
|
|
CargoOwnerInfo cargoOwnerInfo = cargoOwnerInfoService.selectOne(new EntityWrapper<CargoOwnerInfo>().eq("common_id",user.getId()));
|
|
|
- user.setStatusFlag(cargoOwnerInfo.getAuthenticationStatus());
|
|
|
+ if (cargoOwnerInfo != null){
|
|
|
+ user.setStatusFlag(cargoOwnerInfo.getAuthenticationStatus());
|
|
|
+ }
|
|
|
}
|
|
|
return user;
|
|
|
}
|