Commit 36174952 by 墨竹

活码操作日志

parent 14f14372
......@@ -154,11 +154,20 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
}
hmQrcodeQDTO.setWxQrcode(qywxExternalcontactResultDTO.getQr_code());
hmQrcodeQDTO.setWxConfigId(qywxExternalcontactResultDTO.getConfig_id());
//操作日志
addLog(hmQrcodeQDTO, wxEnterpriseId, hmId);
int saveResult = hmQrcodeService.insert(hmQrcodeQDTO);
if (saveResult == 1) {
// save welcome relation
this.updateWelcomeRelation(hmQrcodeQDTO);
}
return ServiceResponse.success();
}
private void addLog(HmQrcodeQDTO hmQrcodeQDTO, String wxEnterpriseId, Long hmId) {
Integer invokingType = hmQrcodeQDTO.getInvokingType();
if (invokingType == 0) {
GicLogRecordEvaluationContext.noWriteLog();
......@@ -176,8 +185,6 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
logger.info("新增活码日志:logText:{}", logContent);
}
}
return ServiceResponse.success();
}
@Override
......@@ -242,7 +249,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
}
@GicLogRecord(value = "修改员工活码-${#hmName}-${#logContent}",
@GicLogRecord(value = "修改员工活码-${#hmName}${#logContent}",
category = GicLogRecordCategoryEnum.HUOMA,
optType = GicLogRecordOptTypeEnum.HUOMA_EDIT,
optPage = "活码管理-修改员工活码",
......@@ -285,15 +292,14 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
return ServiceResponse.failure(Convert.toStr(HaoBanErrCodeCommon.ERR_0.getCode()), qywxResponseDTO.getErrmsg());
}
setLoggerContext(hmQrcodeQDTO.getEnterpriseId(), wxEnterpriseId, hmQrcodeQDTO.getModifierId(), hmQrcodeQDTO.getModifierName());
updateSystemLog(hmQrcodeQDTO, hmId);
int updateResult = hmQrcodeService.update(hmQrcodeQDTO);
if (updateResult == 1) {
// 更新欢迎语引用次数
this.updateWelcomeRelation(hmQrcodeQDTO);
}
setLoggerContext(hmQrcodeQDTO.getEnterpriseId(), wxEnterpriseId, hmQrcodeQDTO.getModifierId(), hmQrcodeQDTO.getModifierName());
updateSystemLog(hmQrcodeQDTO, hmId);
return ServiceResponse.success();
}
......@@ -375,7 +381,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
}
String logText = logContent.toString();
String hmName = "【" + hmId + "-" + hmQrcodeQDTO.getName() + "】";
String hmName = "【" + hmId + "-" + hmQrcodeQDTO.getName() + "】";
GicLogRecordEvaluationContext.putAttribute("hmName", hmName);
if (invokingType != 1) {
logText = logText + "——" + ChannelCodeEnum.getNameByCode(invokingType);
......@@ -582,13 +588,16 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
return ServiceResponse.failure(Convert.toStr(HaoBanErrCodeCommon.ERR_8.getCode()), qywxResponseDTO.getErrmsg());
}
}
hmQrcodeService.deleteById(hmId);
//操作日志
setLoggerContext(hmQrcodeBO.getEnterpriseId(), hmQrcodeBO.getWxEnterpriseId(), hmQrcodeBO.getModifierId(), hmQrcodeBO.getModifierName());
String logContent = "【" + hmId + "-" + hmQrcodeBO.getName() + "】";
if (invokingType != 1) {
logContent = logContent + "——" + ChannelCodeEnum.getNameByCode(invokingType);
}
GicLogRecordEvaluationContext.putAttribute("logContent", logContent);
hmQrcodeService.deleteById(hmId);
return ServiceResponse.success();
}
......@@ -621,7 +630,6 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
} else {
delById(hmId, invokingType);
}
}
return ServiceResponse.success();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment