add 填充日志的创建人和修改人 代码规范整改

pull/130/head
1351515658@qq.com 2024-08-18 18:42:50 +08:00
parent be38af728b
commit 00ba2d6da9
3 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ public class ApiAccessLogServiceImpl implements ApiAccessLogService {
ApiAccessLogDO apiAccessLog = BeanUtils.toBean(createDTO, ApiAccessLogDO.class);
apiAccessLog.setRequestParams(StrUtil.maxLength(apiAccessLog.getRequestParams(), REQUEST_PARAMS_MAX_LENGTH));
apiAccessLog.setResultMsg(StrUtil.maxLength(apiAccessLog.getResultMsg(), RESULT_MSG_MAX_LENGTH));
if(apiAccessLog.getUserId() != null){
if (apiAccessLog.getUserId() != null) {
String userIdStr = apiAccessLog.getUserId().toString();
apiAccessLog.setCreator(userIdStr);
apiAccessLog.setUpdater(userIdStr);

View File

@ -40,7 +40,7 @@ public class ApiErrorLogServiceImpl implements ApiErrorLogService {
ApiErrorLogDO apiErrorLog = BeanUtils.toBean(createDTO, ApiErrorLogDO.class)
.setProcessStatus(ApiErrorLogProcessStatusEnum.INIT.getStatus());
apiErrorLog.setRequestParams(StrUtil.maxLength(apiErrorLog.getRequestParams(), REQUEST_PARAMS_MAX_LENGTH));
if(apiErrorLog.getUserId() != null){
if (apiErrorLog.getUserId() != null) {
String userIdStr = apiErrorLog.getUserId().toString();
apiErrorLog.setCreator(userIdStr);
apiErrorLog.setUpdater(userIdStr);

View File

@ -28,7 +28,7 @@ public class OperateLogServiceImpl implements OperateLogService {
@Override
public void createOperateLog(OperateLogCreateReqDTO createReqDTO) {
OperateLogDO log = BeanUtils.toBean(createReqDTO, OperateLogDO.class);
if(log.getUserId() != null){
if (log.getUserId() != null) {
String userIdStr = log.getUserId().toString();
log.setCreator(userIdStr);
log.setUpdater(userIdStr);