|
|
|
|
@ -37,6 +37,11 @@ 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){
|
|
|
|
|
String userIdStr = apiAccessLog.getUserId().toString();
|
|
|
|
|
apiAccessLog.setCreator(userIdStr);
|
|
|
|
|
apiAccessLog.setUpdater(userIdStr);
|
|
|
|
|
}
|
|
|
|
|
if (TenantContextHolder.getTenantId() != null) {
|
|
|
|
|
apiAccessLogMapper.insert(apiAccessLog);
|
|
|
|
|
} else {
|
|
|
|
|
|