|
@@ -0,0 +1,40 @@
|
|
|
|
+package com.dragoninfo.dcuc.auth.auth.service;
|
|
|
|
+
|
|
|
|
+import com.dragoninfo.dcuc.auth.DcucAuthApplication;
|
|
|
|
+import com.dragoninfo.dcuc.auth.audit.config.AuditConfig;
|
|
|
|
+import com.dragoninfo.dcuc.auth.audit.constance.AuditConstance;
|
|
|
|
+import com.dragoninfo.dcuc.auth.config.DcucAuthConfig;
|
|
|
|
+import com.dragonsoft.auditlog.collection.qmtj.LogSendComponent;
|
|
|
|
+import com.dragonsoft.auditlog.collection.qmtj.pojo.req.AuthenticationBusLog;
|
|
|
|
+import org.junit.Test;
|
|
|
|
+import org.junit.runner.RunWith;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.boot.test.context.SpringBootTest;
|
|
|
|
+import org.springframework.test.context.junit4.SpringRunner;
|
|
|
|
+
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @author mazq
|
|
|
|
+ * @date 2023/4/3
|
|
|
|
+ */
|
|
|
|
+@RunWith(SpringRunner.class)
|
|
|
|
+@SpringBootTest(classes = DcucAuthApplication.class)
|
|
|
|
+public class LogSendComponentTest {
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private LogSendComponent logSendComponent;
|
|
|
|
+
|
|
|
|
+ @Test
|
|
|
|
+ public void httpsLogSend() {
|
|
|
|
+ List<AuthenticationBusLog> busLogs = new ArrayList<>();
|
|
|
|
+ AuthenticationBusLog busLog = new AuthenticationBusLog();
|
|
|
|
+ busLog.setAppToken("appToken");
|
|
|
|
+ busLog.setAuthId("authId");
|
|
|
|
+ busLog.setAuthIdcard("0000000000000000001");
|
|
|
|
+ busLogs.add(busLog);
|
|
|
|
+ logSendComponent.sendAuthenticationBusLog("sysId", AuditConstance.AUDIT_LOG_TYPE_JQ, busLogs);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|