|
@@ -1,8 +1,8 @@
|
|
|
package cn.iocoder.yudao.module.infra.service.logger;
|
|
|
|
|
|
-import cn.hutool.core.util.StrUtil;
|
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
|
+import cn.iocoder.yudao.framework.common.util.string.StrUtils;
|
|
|
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
|
|
import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils;
|
|
|
import cn.iocoder.yudao.module.infra.api.logger.dto.ApiAccessLogCreateReqDTO;
|
|
@@ -35,8 +35,8 @@ public class ApiAccessLogServiceImpl implements ApiAccessLogService {
|
|
|
@Override
|
|
|
public void createApiAccessLog(ApiAccessLogCreateReqDTO createDTO) {
|
|
|
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));
|
|
|
+ apiAccessLog.setRequestParams(StrUtils.maxLength(apiAccessLog.getRequestParams(), REQUEST_PARAMS_MAX_LENGTH));
|
|
|
+ apiAccessLog.setResultMsg(StrUtils.maxLength(apiAccessLog.getResultMsg(), RESULT_MSG_MAX_LENGTH));
|
|
|
if (TenantContextHolder.getTenantId() != null) {
|
|
|
apiAccessLogMapper.insert(apiAccessLog);
|
|
|
} else {
|