人脸删除
This commit is contained in:
parent
f563492a17
commit
6959ea6699
|
|
@ -76,9 +76,10 @@ public class DeviceMqPersonalUpdateMessageDTO {
|
|||
this.updatePerson = updatePerson;
|
||||
return this;
|
||||
}
|
||||
public DeviceMqPersonalUpdateMessageDTO setUpdatePersonPhoto(final Integer updatePersonPhoto) {
|
||||
public DeviceMqPersonalUpdateMessageDTO setUpdatePersonPhoto(final Integer updatePersonPhoto,String type) {
|
||||
this.currentTime = DateUtils.getTime();
|
||||
this.updatePersonPhoto = updatePersonPhoto;
|
||||
this.type = type;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,9 @@ public class UserFaceServiceImpl implements IUserFaceService {
|
|||
}
|
||||
if (StringUtils.isEmpty(dto.getPhotoUrl())) {
|
||||
userFaceMapper.deleteUserFace(dto);
|
||||
//发送mq
|
||||
DeviceMqPersonalUpdateMessageDTO bean = new DeviceMqPersonalUpdateMessageDTO().setUpdatePersonPhoto(dto.getUserId().intValue(),"del");
|
||||
MqUtil.pushToTenantAllDevice(bean, LeMqConstant.Topic.DEVICE_UPDATE_PERSONAL_CONFIG_V4);
|
||||
} else {
|
||||
log.info("开始采集虹软人脸");
|
||||
ArcFaceHelper arcFaceHelper = new ArcFaceHelper();
|
||||
|
|
@ -82,10 +85,10 @@ public class UserFaceServiceImpl implements IUserFaceService {
|
|||
if (code == 0){
|
||||
throw new ServiceException("[虹软算法]:保存失败");
|
||||
}
|
||||
//发送mq
|
||||
DeviceMqPersonalUpdateMessageDTO bean = new DeviceMqPersonalUpdateMessageDTO().setUpdatePersonPhoto(dto.getUserId().intValue(),"update");
|
||||
MqUtil.pushToTenantAllDevice(bean, LeMqConstant.Topic.DEVICE_UPDATE_PERSONAL_CONFIG_V4);
|
||||
}
|
||||
//发送mq
|
||||
DeviceMqPersonalUpdateMessageDTO bean = new DeviceMqPersonalUpdateMessageDTO().setUpdatePersonPhoto(1);
|
||||
MqUtil.pushToTenantAllDevice(bean, LeMqConstant.Topic.DEVICE_UPDATE_PERSONAL_CONFIG_V4);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue