add new field for operate log
This commit is contained in:
parent
ca02e0e9ee
commit
a0f02003e8
@ -124,4 +124,14 @@ public class OperateLogReq {
|
||||
* 操作表名
|
||||
*/
|
||||
private String operateTable;
|
||||
|
||||
/**
|
||||
* 当前操作人姓名
|
||||
*/
|
||||
private String operateUserName;
|
||||
|
||||
/**
|
||||
* 当前操作人手机号码
|
||||
*/
|
||||
private String operateUserPhone;
|
||||
}
|
||||
|
||||
@ -17,12 +17,6 @@ public class OperateLogQueryDetailRespDTO {
|
||||
@ApiModelProperty(value = "记录ID", position = 1)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 操作人
|
||||
*/
|
||||
@ApiModelProperty(value = "操作人名称", position = 1)
|
||||
private String operateUserName;
|
||||
|
||||
/**
|
||||
* 事件类型
|
||||
*/
|
||||
@ -48,12 +42,6 @@ public class OperateLogQueryDetailRespDTO {
|
||||
@ApiModelProperty(value = "操作时间", position = 5)
|
||||
private Date operateTime;
|
||||
|
||||
/**
|
||||
* 操作人手机号
|
||||
*/
|
||||
@ApiModelProperty(value = "操作人手机号", position = 6)
|
||||
private String operateUserPhone;
|
||||
|
||||
/**
|
||||
* 所属单位名称
|
||||
*/
|
||||
|
||||
@ -145,4 +145,16 @@ public class OperateLogReqDTO {
|
||||
*/
|
||||
@ApiModelProperty(value = "操作表名", position = 20)
|
||||
private String operateTable;
|
||||
|
||||
/**
|
||||
* 当前操作人姓名()
|
||||
*/
|
||||
@ApiModelProperty(value = "操作人姓名", position = 21)
|
||||
private String identityUserName;
|
||||
|
||||
/**
|
||||
* 当前操作人手机号码
|
||||
*/
|
||||
@ApiModelProperty(value = "操作人手机号", position = 22)
|
||||
private String identityUserPhone;
|
||||
}
|
||||
|
||||
@ -219,11 +219,14 @@ public class OperateLogServiceImpl extends BaseEsService implements OperateLogSe
|
||||
private OperateLogRecordEntity fieldFill(OperateLogReqDTO req) {
|
||||
//补充 termimnal identityType featureName.
|
||||
OperateLogRecordEntity unifiedLogRecord = operateLogConverter.toEntity(req);
|
||||
// 通过接口调用,获取用户手机姓名
|
||||
IdentityProfileDto identityProfile = qryIdentityProfile(req.getIdentityId(), req.getIdentityType());
|
||||
if (identityProfile != null && identityProfile.getPersonProfile() != null) {
|
||||
unifiedLogRecord.setIdentityUserName(identityProfile.getPersonProfile().getRealName());
|
||||
unifiedLogRecord.setIdentityUserPhone(identityProfile.getPersonProfile().getPhone());
|
||||
//判断是否已经传手机和姓名存在,如果不存在则(通过接口调用,获取用户手机姓名)
|
||||
if (!StringUtils.hasText(unifiedLogRecord.getIdentityUserPhone())
|
||||
|| StringUtils.hasText(unifiedLogRecord.getIdentityUserName())) {
|
||||
IdentityProfileDto identityProfile = qryIdentityProfile(req.getIdentityId(), req.getIdentityType());
|
||||
if (identityProfile != null && identityProfile.getPersonProfile() != null) {
|
||||
unifiedLogRecord.setIdentityUserName(identityProfile.getPersonProfile().getRealName());
|
||||
unifiedLogRecord.setIdentityUserPhone(identityProfile.getPersonProfile().getPhone());
|
||||
}
|
||||
}
|
||||
// 通过接口方式调用 workspaceApi单位等信息,
|
||||
GetDetailRes workspaceInf = qryWorkspaceInfo(req.getWorkspaceId());
|
||||
@ -357,7 +360,14 @@ public class OperateLogServiceImpl extends BaseEsService implements OperateLogSe
|
||||
return response.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param identityId
|
||||
* @param identityType
|
||||
* @return
|
||||
*/
|
||||
private IdentityProfileDto qryIdentityProfile(Long identityId, Integer identityType) {
|
||||
//todo 需要根据类型判断用那个接口查询
|
||||
|
||||
List<Long> ids = new ArrayList<>();
|
||||
ids.add(identityId);
|
||||
CommonResponse<List<IdentityProfileDto>> response = profileServiceApi.getIdentitiesByIdSet(ids, identityType);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user