diff --git a/docs/databus-client使用说明.md b/docs/databus-client使用说明.md new file mode 100644 index 00000000..c6eb7b1e --- /dev/null +++ b/docs/databus-client使用说明.md @@ -0,0 +1,31 @@ +# Databus Client 使用说明 + +databus client 最主要用于调用基于http协议的第三方接口时需要记录调用日志到 databus 的情况, 通过databus client 调用第三方接口会将调用日志记录到databus的访问日志中 + +# 使用方法 +1. 添加依赖: +```xml + + com.zt.plat + zt-module-databus-client + 3.0.47-SNAPSHOT + +``` +2. 注入 DatabusClient +```java +@Resource +private DatabusClient databusClient; +``` +3. 方法说明 + * get(...) : 发送 get 请求 + * post(...): 发送 post 请求 + * put(...): 发送 put 请求 + * delete(...): 发送 delete 请求 + * doRequest(...): 发送自定义请求 +4. 方法参数说明(由于所有方法参数都是一样的,所以在此统一说明) + * String urlString: 请求的 http 接口地址(get/delete请求不需要带url参数) + * Map data: 请求的参数(post/put方法会转换为json提交, get/delete会拼接到url上) + * Map headers: 请求头信息 + * String appId: databus 的appid + * String authToken: databus 的访问令牌 + * Method method: doRequest 方法独有,如果要使用 get/post/put/delete 之外的方法,请使用doRequest方法并通过method参数指定 diff --git a/zt-module-databus/zt-module-databus-client/pom.xml b/zt-module-databus/zt-module-databus-client/pom.xml index a8abc82f..4ee8c93f 100644 --- a/zt-module-databus/zt-module-databus-client/pom.xml +++ b/zt-module-databus/zt-module-databus-client/pom.xml @@ -8,7 +8,7 @@ com.zt.plat ${revision} - zt-module-databus-server-client + zt-module-databus-client jar ${project.artifactId} diff --git a/zt-module-databus/zt-module-databus-client/src/main/java/com/zt/plat/module/databus/client/DatabusClient.java b/zt-module-databus/zt-module-databus-client/src/main/java/com/zt/plat/module/databus/client/DatabusClient.java index ad921ceb..0954ef21 100644 --- a/zt-module-databus/zt-module-databus-client/src/main/java/com/zt/plat/module/databus/client/DatabusClient.java +++ b/zt-module-databus/zt-module-databus-client/src/main/java/com/zt/plat/module/databus/client/DatabusClient.java @@ -7,7 +7,6 @@ import cn.hutool.http.Method; import cn.hutool.json.JSONObject; import cn.hutool.json.JSONUtil; import com.zt.plat.framework.common.pojo.CommonResult; -import com.zt.plat.framework.common.util.security.CryptoSignatureUtils; import com.zt.plat.module.databus.api.dto.ApiAccessLogCreateReq; import com.zt.plat.module.databus.api.provider.DatabusAccessLogProviderApi; import jakarta.annotation.Resource; diff --git a/zt-module-system/zt-module-system-server-app/src/main/resources/logback-spring.xml b/zt-module-system/zt-module-system-server-app/src/main/resources/logback-spring.xml index d68b13bb..b592120f 100644 --- a/zt-module-system/zt-module-system-server-app/src/main/resources/logback-spring.xml +++ b/zt-module-system/zt-module-system-server-app/src/main/resources/logback-spring.xml @@ -91,6 +91,10 @@ + + + + @@ -103,8 +107,4 @@ - - - - diff --git a/zt-module-system/zt-module-system-server/src/main/java/com/zt/plat/module/system/api/dept/DeptApiImpl.java b/zt-module-system/zt-module-system-server/src/main/java/com/zt/plat/module/system/api/dept/DeptApiImpl.java index 7c1e4781..8b87fd52 100644 --- a/zt-module-system/zt-module-system-server/src/main/java/com/zt/plat/module/system/api/dept/DeptApiImpl.java +++ b/zt-module-system/zt-module-system-server/src/main/java/com/zt/plat/module/system/api/dept/DeptApiImpl.java @@ -4,6 +4,8 @@ import com.zt.plat.framework.common.enums.CommonStatusEnum; import com.zt.plat.framework.common.pojo.CommonResult; import com.zt.plat.framework.common.pojo.CompanyDeptInfo; import com.zt.plat.framework.common.util.object.BeanUtils; +import com.zt.plat.framework.datapermission.core.annotation.CompanyDataPermissionIgnore; +import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIgnore; import com.zt.plat.module.system.api.dept.dto.*; import com.zt.plat.module.system.controller.admin.dept.vo.dept.DeptListReqVO; import com.zt.plat.module.system.controller.admin.dept.vo.dept.DeptSaveReqVO; @@ -78,6 +80,8 @@ public class DeptApiImpl implements DeptApi { } @Override + @CompanyDataPermissionIgnore + @DeptDataPermissionIgnore public CommonResult getDept(Long id) { DeptDO dept = deptService.getDept(id); return success(BeanUtils.toBean(dept, DeptRespDTO.class)); diff --git a/zt-module-system/zt-module-system-server/src/main/java/com/zt/plat/module/system/service/integration/iwork/impl/IWorkSyncProcessorImpl.java b/zt-module-system/zt-module-system-server/src/main/java/com/zt/plat/module/system/service/integration/iwork/impl/IWorkSyncProcessorImpl.java index 4db5f260..50c1bd92 100644 --- a/zt-module-system/zt-module-system-server/src/main/java/com/zt/plat/module/system/service/integration/iwork/impl/IWorkSyncProcessorImpl.java +++ b/zt-module-system/zt-module-system-server/src/main/java/com/zt/plat/module/system/service/integration/iwork/impl/IWorkSyncProcessorImpl.java @@ -798,7 +798,12 @@ public class IWorkSyncProcessorImpl implements IWorkSyncProcessor { if (StrUtil.isBlank(statusFlag)) { return false; } - return !"0".equals(statusFlag.trim()); + Integer status = parseInteger(statusFlag); + if (status == null) { + return false; + } + // iWork 状态:0试用、1正式、2临时、3试用延期、4解聘、5离职、6退休、7无效 + return status >= 4; } private Integer resolveSex(String sexFlag) { diff --git a/zt-module-system/zt-module-system-server/src/main/java/com/zt/plat/module/system/service/integration/iwork/impl/IWorkSyncServiceImpl.java b/zt-module-system/zt-module-system-server/src/main/java/com/zt/plat/module/system/service/integration/iwork/impl/IWorkSyncServiceImpl.java index 994471b9..dfb327a1 100644 --- a/zt-module-system/zt-module-system-server/src/main/java/com/zt/plat/module/system/service/integration/iwork/impl/IWorkSyncServiceImpl.java +++ b/zt-module-system/zt-module-system-server/src/main/java/com/zt/plat/module/system/service/integration/iwork/impl/IWorkSyncServiceImpl.java @@ -260,10 +260,10 @@ public class IWorkSyncServiceImpl implements IWorkSyncService { if (query == null || reqVO == null) { return; } + copyQueryParameters(reqVO, query); // 设置查询条件 if (StrUtil.isBlank(reqVO.getId())) { return; } - copyQueryParameters(reqVO, query); // 设置查询条件 applyQueryId(query, reqVO.getId()); } diff --git a/zt-server/src/main/resources/logback-spring.xml b/zt-server/src/main/resources/logback-spring.xml index 0e551414..65b22b7a 100644 --- a/zt-server/src/main/resources/logback-spring.xml +++ b/zt-server/src/main/resources/logback-spring.xml @@ -5,6 +5,10 @@ + + + +       @@ -31,7 +35,7 @@ ${LOGBACK_ROLLINGPOLICY_CLEAN_HISTORY_ON_START:-false} - ${LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE:-10MB} + ${LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE:-50MB} ${LOGBACK_ROLLINGPOLICY_TOTAL_SIZE_CAP:-0} @@ -56,17 +60,42 @@ + + + ${LOG_DIR}-error.log + + ERROR + ACCEPT + DENY + + + ${LOG_DIR}-error.%d{yyyy-MM-dd}.log + 30 + + + %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n + + + + - - + + + + + + + + - + +