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