|
@@ -6,11 +6,9 @@ import cn.hanghui.outapi.platform.common.exception.BusinessException;
|
|
|
import cn.hanghui.outapi.platform.common.utils.Preconditions;
|
|
|
import cn.hanghui.outapi.platform.tenant.entity.dto.blacklist.*;
|
|
|
import cn.hanghui.outapi.platform.tenant.entity.enums.DeviceTypeEnum;
|
|
|
-import cn.hanghui.outapi.platform.tenant.entity.po.Device;
|
|
|
-import cn.hanghui.outapi.platform.tenant.entity.po.Purchaser;
|
|
|
-import cn.hanghui.outapi.platform.tenant.entity.po.UserBlacklist;
|
|
|
-import cn.hanghui.outapi.platform.tenant.entity.po.UserBlacklistTask;
|
|
|
+import cn.hanghui.outapi.platform.tenant.entity.po.*;
|
|
|
import cn.hanghui.outapi.platform.tenant.mapper.DeviceMapper;
|
|
|
+import cn.hanghui.outapi.platform.tenant.mapper.HhLocalDeviceMapper;
|
|
|
import cn.hanghui.outapi.platform.tenant.mapper.UserBlacklistMapper;
|
|
|
import cn.hanghui.outapi.platform.tenant.mapper.UserBlacklistTaskMapper;
|
|
|
import cn.hanghui.outapi.platform.tenant.service.UserBlacklistService;
|
|
@@ -46,7 +44,8 @@ public class UserBlacklistServiceImpl implements UserBlacklistService {
|
|
|
|
|
|
@Resource
|
|
|
private UserBlacklistTaskMapper userBlacklistTaskMapper;
|
|
|
-
|
|
|
+ @Resource
|
|
|
+ private HhLocalDeviceMapper hhLocalDeviceMapper;
|
|
|
@Resource
|
|
|
private UserBlacklistMapper userBlacklistMapper;
|
|
|
|
|
@@ -175,12 +174,24 @@ public class UserBlacklistServiceImpl implements UserBlacklistService {
|
|
|
case 3:
|
|
|
//TODO。。。临时证明
|
|
|
break;
|
|
|
+ case 4:
|
|
|
+ //HHlocal
|
|
|
+ taskIds = queryTaskIdByHhLocalSn(dto.getSn());
|
|
|
+ break;
|
|
|
default:
|
|
|
throw new IllegalStateException("Unexpected value: " + deviceType);
|
|
|
}
|
|
|
return taskIds;
|
|
|
}
|
|
|
|
|
|
+ private List<Long> queryTaskIdByHhLocalSn(String sn) {
|
|
|
+ HhLocalDevice device = hhLocalDeviceMapper.selectOne(Wrappers.lambdaQuery(HhLocalDevice.class).eq(HhLocalDevice::getSn, sn).eq(HhLocalDevice::getStatus, Boolean.TRUE).isNotNull(HhLocalDevice::getUserBlacklistOfflineTaskId));
|
|
|
+ if (Preconditions.isBlank(device)) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ return device.getUserBlacklistOfflineTaskId();
|
|
|
+ }
|
|
|
+
|
|
|
private List<Long> queryTaskIdByHhFaceSn(String sn) {
|
|
|
Device device = deviceMapper.selectOne(Wrappers.lambdaQuery(Device.class).eq(Device::getSn, sn).eq(Device::getStatus, Boolean.TRUE).isNotNull(Device::getUserBlacklistOfflineTaskId));
|
|
|
if (Preconditions.isBlank(device)) {
|