diff --git a/src/main/java/neatlogic/module/tenant/api/apimanage/ApiManageAuditListApi.java b/src/main/java/neatlogic/module/tenant/api/apimanage/ApiManageAuditListApi.java index ce7915ecab362ea2b789ffec6c91ef123ddf352b..75733ef8f568c201ba68fbdbf809c86cdd5f4fed 100644 --- a/src/main/java/neatlogic/module/tenant/api/apimanage/ApiManageAuditListApi.java +++ b/src/main/java/neatlogic/module/tenant/api/apimanage/ApiManageAuditListApi.java @@ -17,7 +17,9 @@ package neatlogic.module.tenant.api.apimanage; import com.alibaba.fastjson.JSONObject; import neatlogic.framework.common.constvalue.ApiParamType; +import neatlogic.framework.common.constvalue.systemuser.SystemUserFactory; import neatlogic.framework.common.util.PageUtil; +import neatlogic.framework.dto.UserVo; import neatlogic.framework.exception.type.ApiNotFoundException; import neatlogic.framework.exception.util.StartTimeAndEndTimeCanNotFoundException; import neatlogic.framework.restful.annotation.*; @@ -112,6 +114,14 @@ public class ApiManageAuditListApi extends PrivateApiComponentBase { apiAuditVo.setRowNum(rowNum); apiAuditVo.setPageCount(PageUtil.getPageCount(rowNum, apiAuditVo.getPageSize())); apiAuditList = apiAuditMapper.getApiAuditList(apiAuditVo); + for (ApiAuditVo apiAudit : apiAuditList) { + if (StringUtils.isBlank(apiAudit.getUserName())) { + UserVo userVo = SystemUserFactory.getUserVoByUser(apiAudit.getUserUuid()); + if (userVo != null) { + apiAudit.setUserName(userVo.getUserName()); + } + } + } } return TableResultUtil.getResult(apiAuditList, apiAuditVo); } diff --git a/src/main/java/neatlogic/module/tenant/api/matrix/MatrixSaveApi.java b/src/main/java/neatlogic/module/tenant/api/matrix/MatrixSaveApi.java index dffa4e674f89847219335d8a428711d377292579..c69fe8f463a4aa2bda08f3843b113732c02a71b0 100644 --- a/src/main/java/neatlogic/module/tenant/api/matrix/MatrixSaveApi.java +++ b/src/main/java/neatlogic/module/tenant/api/matrix/MatrixSaveApi.java @@ -81,6 +81,7 @@ public class MatrixSaveApi extends PrivateApiComponentBase { @Param(name = "matrix", explode = MatrixVo.class, desc = "common.matrix") }) @Description(desc = "nmtam.matrixsaveapi.getname") + @ResubmitInterval(value = 2) @Override public Object myDoService(JSONObject jsonObj) throws Exception { JSONObject returnObj = new JSONObject(); diff --git a/src/main/java/neatlogic/module/tenant/service/apiaudit/ApiAuditServiceImpl.java b/src/main/java/neatlogic/module/tenant/service/apiaudit/ApiAuditServiceImpl.java index 5caeb658649e79a4cd2f4d0df2895dffea485147..fbc3b2e0773b9abf11a8fa6a9b149be85e0273a8 100644 --- a/src/main/java/neatlogic/module/tenant/service/apiaudit/ApiAuditServiceImpl.java +++ b/src/main/java/neatlogic/module/tenant/service/apiaudit/ApiAuditServiceImpl.java @@ -1,6 +1,8 @@ package neatlogic.module.tenant.service.apiaudit; +import neatlogic.framework.common.constvalue.systemuser.SystemUserFactory; import neatlogic.framework.common.util.PageUtil; +import neatlogic.framework.dto.UserVo; import neatlogic.framework.restful.annotation.ExcelField; import neatlogic.framework.restful.annotation.OperationType; import neatlogic.framework.restful.constvalue.OperationTypeEnum; @@ -309,6 +311,12 @@ public class ApiAuditServiceImpl implements ApiAuditService{ private void addFields(List apiList, List apiAuditVoList) throws ClassNotFoundException { if(CollectionUtils.isNotEmpty(apiList) && CollectionUtils.isNotEmpty(apiAuditVoList)){ for (ApiAuditVo vo : apiAuditVoList) { + if (StringUtils.isBlank(vo.getUserName())) { + UserVo userVo = SystemUserFactory.getUserVoByUser(vo.getUserUuid()); + if (userVo != null) { + vo.setUserName(userVo.getUserName()); + } + } for (ApiVo api : apiList) { if (vo.getToken().equals(api.getToken())) { vo.setApiName($.t(api.getName()));