|
@@ -1,6 +1,12 @@
|
|
|
package com.malk.yiyao;
|
|
package com.malk.yiyao;
|
|
|
|
|
|
|
|
|
|
+import cn.hutool.core.io.IORuntimeException;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
+import com.malk.server.aliwork.YDConf;
|
|
|
|
|
+import com.malk.server.aliwork.YDParam;
|
|
|
|
|
+import com.malk.server.dingtalk.DDR_New;
|
|
|
|
|
+import com.malk.utils.UtilHttp;
|
|
|
|
|
+import com.malk.utils.UtilMap;
|
|
|
import com.malk.yiyao.service.YiyaoService;
|
|
import com.malk.yiyao.service.YiyaoService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.junit.Test;
|
|
import org.junit.Test;
|
|
@@ -9,6 +15,13 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
|
|
|
|
|
|
|
|
+import java.net.UnknownHostException;
|
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
|
|
+import java.util.Arrays;
|
|
|
|
|
+import java.util.HashMap;
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+import java.util.Map;
|
|
|
|
|
+
|
|
|
@Slf4j
|
|
@Slf4j
|
|
|
@SpringBootTest
|
|
@SpringBootTest
|
|
|
@RunWith(SpringRunner.class)
|
|
@RunWith(SpringRunner.class)
|
|
@@ -70,17 +83,28 @@ public class YiyaoTest {
|
|
|
@Test
|
|
@Test
|
|
|
public void test11() {
|
|
public void test11() {
|
|
|
JSONObject json = new JSONObject();
|
|
JSONObject json = new JSONObject();
|
|
|
- json.put("timeStamp", 1752738143151L);
|
|
|
|
|
- json.put("eventId","7a5a1a4b42724fceb799205f4363bebd");
|
|
|
|
|
|
|
+ json.put("timeStamp", 1754541812234L);
|
|
|
|
|
+ json.put("eventId","50d550f6fb9444c0b99dae58d503a280");
|
|
|
json.put("CorpId","dingf11f7d6ff834577b");
|
|
json.put("CorpId","dingf11f7d6ff834577b");
|
|
|
- json.put("StaffId","694148202226282223");
|
|
|
|
|
|
|
+ json.put("StaffId","134213470523662878");
|
|
|
json.put("EventType","check_in");
|
|
json.put("EventType","check_in");
|
|
|
- json.put("EventTime",1752738143151L);
|
|
|
|
|
- json.put("BizId","c3152e9b-793a-4a34-b7a5-86448aba1566");
|
|
|
|
|
- json.put("staffId","694148202226282223");
|
|
|
|
|
- json.put("TimeStamp", 1752738143151L);
|
|
|
|
|
|
|
+ json.put("EventTime",1754541812234L);
|
|
|
|
|
+ json.put("BizId","4566b06c-9167-4dd9-b47f-0531a2e10ce0");
|
|
|
|
|
+ json.put("staffId","134213470523662878");
|
|
|
|
|
+ json.put("TimeStamp", 1754541812234L);
|
|
|
|
|
|
|
|
yiyaoService.getCheckInData(json);
|
|
yiyaoService.getCheckInData(json);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Test
|
|
|
|
|
+ public void test12() {
|
|
|
|
|
+ try {
|
|
|
|
|
+ throw new IORuntimeException("测试异常");
|
|
|
|
|
+ } catch (IORuntimeException e) {
|
|
|
|
|
+ log.info("异常信息:{}", e.getMessage());
|
|
|
|
|
+ }catch (Exception e) {
|
|
|
|
|
+ log.error("请求失败:", e);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|