Commit 3799343b authored by 以墨为白's avatar 以墨为白 🎧

1

parent 114105a5
......@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
import com.zksy.szpt.domain.ListImageType;
import com.zksy.szpt.domain.UploadImageDTO;
import com.zksy.szpt.domain.dto.*;
import com.zksy.szpt.util.HttpUtil;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
......@@ -40,7 +41,7 @@ public class MainTest {
xxRwwcqkDTO.setShsm("任务待完成");
xxRwwcqkDTO.setMchid("333021");
TestHttpUtil.signatureAndRequest("/rest/index/addXxRwwcqk", xxRwwcqkDTO, XxRwwcqkDTO.class);
HttpUtil.signatureAndRequest("/rest/index/addXxRwwcqk", xxRwwcqkDTO, XxRwwcqkDTO.class);
// TestHttpUtil.signatureAndRequest("/rest/index/updateXxRwwcqk", xxRwwcqkDTO, XxRwwcqkDTO.class);
}
......@@ -77,7 +78,7 @@ public class MainTest {
dto.setMchid("c449340a11e14638adf274bc7a8c6c7c");
// TestHttpUtil.signatureAndRequest("/rest/xxZhxx/add", dto, XxZhxxDTO.class);
TestHttpUtil.signatureAndRequest("/rest/xxZhxx/update", dto, XxZhxxDTO.class);
HttpUtil.signatureAndRequest("/rest/xxZhxx/update", dto, XxZhxxDTO.class);
}
/**
......@@ -99,7 +100,7 @@ public class MainTest {
dto.setBz("积分兑换");
dto.setQbjlid("1");
TestHttpUtil.signatureAndRequest("/rest/xxZhjfbg/add", dto, XxZhjfbgDTO.class);
HttpUtil.signatureAndRequest("/rest/xxZhjfbg/add", dto, XxZhjfbgDTO.class);
// TestHttpUtil.signatureAndRequest("/rest/xxZhjfbg/update", dto, XxZhjfbgDTO.class);
}
......@@ -114,7 +115,7 @@ public class MainTest {
UploadImageDTO uploadImageDTO = new UploadImageDTO();
uploadImageDTO.setImagePath("http://192.168.168.211/guoqing.jpg");
uploadImageDTO.setImageType(ListImageType.FACE);
TestHttpUtil.signatureAndRequest("/rest/image/upload", uploadImageDTO, UploadImageDTO.class);
HttpUtil.signatureAndRequest("/rest/image/upload", uploadImageDTO, UploadImageDTO.class);
}
/**
......@@ -147,7 +148,7 @@ public class MainTest {
dto.setRwzt("1");
dto.setRwlx("1");
dto.setPictureUrls("https://pics5.baidu.com/feed/9825bc315c6034a8e54636072d08095b082376bf.jpeg@f_auto?token=98350f9a138414c8325ce9b265f43a9c,https://pics5.baidu.com/feed/9825bc315c6034a8e54636072d08095b082376bf.jpeg@f_auto?token=98350f9a138414c8325ce9b265f43a9c");
TestHttpUtil.signatureAndRequest("/rest/xxYjrw/add", dto, XxYjrwDTO.class);
HttpUtil.signatureAndRequest("/rest/xxYjrw/add", dto, XxYjrwDTO.class);
// TestHttpUtil.signatureAndRequest("/rest/xxYjrw/update", dto, XxYjrwDTO.class);
}
......@@ -167,7 +168,7 @@ public class MainTest {
dto.setYjdwmc("红色卫队");
dto.setYjdwjs("红色卫队是一支由青年人组成的卫队");
dto.setFid("-1");
TestHttpUtil.signatureAndRequest("/rest/xxYjdwdm/add", dto, XxYjdwdmDTO.class);
HttpUtil.signatureAndRequest("/rest/xxYjdwdm/add", dto, XxYjdwdmDTO.class);
// TestHttpUtil.signatureAndRequest("/rest/xxYjdwdm/update", dto, XxYjdwdmDTO.class);
}
......@@ -180,7 +181,7 @@ public class MainTest {
dto.setShxxyid("M15");
dto.setYjdwdm("1dbcf7b68e6911eea13b000c293a2347");
TestHttpUtil.signatureAndRequest("/rest/xxShxxyDw/add", dto, XxShxxyDwDTO.class);
HttpUtil.signatureAndRequest("/rest/xxShxxyDw/add", dto, XxShxxyDwDTO.class);
// TestHttpUtil.signatureAndRequest("/rest/xxShxxyDw/update", dto, XxShxxyDwDTO.class);
}
......@@ -226,7 +227,7 @@ public class MainTest {
dto.setHfbz("");
dto.setQbflid("70006015");
dto.setShbz("1");
TestHttpUtil.signatureAndRequest("/rest/xxShxxy/add", dto, XxShxxyDTO.class);
HttpUtil.signatureAndRequest("/rest/xxShxxy/add", dto, XxShxxyDTO.class);
// TestHttpUtil.signatureAndRequest("/rest/xxShxxy/update", dto, XxShxxyDTO.class);
}
......@@ -248,13 +249,13 @@ public class MainTest {
// String url = "xxZhxx/delete";
CommonDelDTO delDTO=new CommonDelDTO();
delDTO.setIds(ids);
TestHttpUtil.signatureAndRequest("/rest/xxShxxyDw/delete", dto, CommonDelParamDTO.class);
TestHttpUtil.signatureAndRequest("/rest/xxShxxy/delete", dto, CommonDelParamDTO.class);
TestHttpUtil.signatureAndRequest("/rest/xxYjdwdm/delete", dto, CommonDelParamDTO.class);
TestHttpUtil.signatureAndRequest("/rest/xxYjrw/delete", dto, CommonDelParamDTO.class);
TestHttpUtil.signatureAndRequest("/rest/xxZhjfbg/delete", dto, CommonDelParamDTO.class);
TestHttpUtil.signatureAndRequest("/rest/xxZhxx/delete", dto, CommonDelParamDTO.class);
TestHttpUtil.signatureAndRequest("/rest/index/deleteXxRwwcqk", delDTO, CommonDelDTO.class);
HttpUtil.signatureAndRequest("/rest/xxShxxyDw/delete", dto, CommonDelParamDTO.class);
HttpUtil.signatureAndRequest("/rest/xxShxxy/delete", dto, CommonDelParamDTO.class);
HttpUtil.signatureAndRequest("/rest/xxYjdwdm/delete", dto, CommonDelParamDTO.class);
HttpUtil.signatureAndRequest("/rest/xxYjrw/delete", dto, CommonDelParamDTO.class);
HttpUtil.signatureAndRequest("/rest/xxZhjfbg/delete", dto, CommonDelParamDTO.class);
HttpUtil.signatureAndRequest("/rest/xxZhxx/delete", dto, CommonDelParamDTO.class);
HttpUtil.signatureAndRequest("/rest/index/deleteXxRwwcqk", delDTO, CommonDelDTO.class);
}
}
......@@ -2,7 +2,7 @@ package com.zksy.szpt;
import cn.hutool.crypto.digest.DigestUtil;
import com.zksy.szpt.domain.dto.*;
import org.junit.jupiter.api.Assertions;
import com.zksy.szpt.util.HttpUtil;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
......@@ -30,7 +30,7 @@ public class TestAppStore {
appStoreDTO.setDeptCode("330103");
TestHttpUtil.signatureAndRequest("/szptsjjs/rest/appStore/insertAppStore", appStoreDTO, AppStoreDTO.class);
HttpUtil.signatureAndRequest("/szptsjjs/rest/appStore/insertAppStore", appStoreDTO, AppStoreDTO.class);
// TestHttpUtil.signatureAndRequest("/rest/appStore/insertAppStore", appStoreDTO, AppStoreDTO.class);
// TestHttpUtil.signatureAndRequest("/rest/appStore/insertAppStore", appStoreDTO);
......@@ -42,6 +42,6 @@ public class TestAppStore {
AppStoreDTO appStoreDTO = new AppStoreDTO();
appStoreDTO.setAppKey("us2");
appStoreDTO.setAppSecret(DigestUtil.md5Hex("asdfasdfadf11"));
TestHttpUtil.signatureAndRequest("/rest/appStore/updateAppIdSecret", appStoreDTO, AppStoreDTO.class);
HttpUtil.signatureAndRequest("/rest/appStore/updateAppIdSecret", appStoreDTO, AppStoreDTO.class);
}
}
package com.zksy.szpt;
package com.zksy.szpt.util;
import cn.hutool.crypto.digest.DigestUtil;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.zksy.szpt.domain.CommonRequestDTO;
import com.zksy.szpt.util.EncryptUtil;
import com.zksy.szpt.util.SignatureUtil;
import org.junit.jupiter.api.Assertions;
import org.springframework.web.reactive.function.client.WebClient;
import reactor.core.publisher.Mono;
public class TestHttpUtil {
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(TestHttpUtil.class);
public class HttpUtil {
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(HttpUtil.class);
final static String baseUrl = "https://demo.qmrzhz.cn:18030/szptsjjs";
// final static String baseUrl = "http://localhost:8086";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment