feat: 五级行政区划测试
parent
7e8226b2b2
commit
338f03e2e1
16
readme.md
16
readme.md
|
|
@ -88,4 +88,18 @@ goto checkJCmd
|
|||
```shell
|
||||
## C:\Ext\mvn17\bin\mvn.cmd 修改maven脚本路径
|
||||
call C:\Ext\mvn17\bin\mvn.cmd clean package verify sonar:sonar -Dsonar.projectKey=scfs-api-sdk -Dsonar.projectName=scfs-api-sdk -Dsonar.host.url=http://10.129.135.192:7100 -Dsonar.login=sqp_90e5fb014f985e2c458e46b9239926cfbbd4fffe
|
||||
```
|
||||
```
|
||||
|
||||
## 沙箱环境配置
|
||||
|
||||
```shell
|
||||
scfs.api-gateway.online=false
|
||||
scfs.api-gateway.host=http://10.131.98.80:8088/api-gateway
|
||||
scfs.api-gateway.channel.channel-no=0000
|
||||
scfs.api-gateway.channel.app-no=41
|
||||
scfs.api-gateway.cipher.store-type=resources
|
||||
# 渠道 0000
|
||||
scfs.api-gateway.cipher.channel-private-key=CZCB-SM-FB4E3DCE0297438ED390771F46576B92FD7E6B7F1E9BD12A7D87E821B59948E5-PRIVATE.pem
|
||||
scfs.api-gateway.cipher.channel-certificate-serial=FB4E3DCE0297438ED390771F46576B92FD7E6B7F1E9BD12A7D87E821B59948E5
|
||||
scfs.api-gateway.cipher.certificate=CZCB-SM-FB4E3DCE0297438ED390771F46576B92FD7E6B7F1E9BD12A7D87E821B59948E5-CERTIFICATE.pem
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
package com.czcb.scfs.api.test;
|
||||
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class ContextUtil implements ApplicationContextAware {
|
||||
private static ApplicationContext context;
|
||||
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||
ContextUtil.context = applicationContext;
|
||||
}
|
||||
|
||||
public static <T> T getBean(Class<T> requiredType) {
|
||||
return ContextUtil.context.getBean(requiredType);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package com.czcb.scfs.api.test;
|
||||
|
||||
import lombok.experimental.UtilityClass;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
@UtilityClass
|
||||
public final class FmtDate {
|
||||
private static final String ZONE = "Asia/Shanghai";
|
||||
|
||||
public static String txnDt() {
|
||||
return LocalDate.now(ZoneId.of(ZONE)).format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||
}
|
||||
|
||||
public static String txnTm() {
|
||||
return LocalTime.now(ZoneId.of(ZONE)).format(DateTimeFormatter.ofPattern("HHmmss"));
|
||||
}
|
||||
|
||||
public static String sysDate() {
|
||||
return LocalDate.now(ZoneId.of(ZONE)).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||
}
|
||||
|
||||
public static String sysTime() {
|
||||
return LocalDateTime.now(ZoneId.of(ZONE)).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||
}
|
||||
|
||||
public static String transTradeTime() {
|
||||
return sysTime();
|
||||
}
|
||||
|
||||
public static String transDate() {
|
||||
return sysDate();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.czcb.scfs.api.test;
|
||||
|
||||
import lombok.experimental.UtilityClass;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@UtilityClass
|
||||
public final class Sequence {
|
||||
|
||||
public static String serialNo() {
|
||||
return UUID.randomUUID().toString().replace("-", "");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIICGTCCAcCgAwIBAgIhAPtOPc4Cl0OO05B3H0ZXa5L9fmt/HpvRKn2H6CG1mUjlMAoGCCqBHM9V
|
||||
AYN1MIGNMQswCQYDVQQGEwJDTjESMBAGA1UECAwJ5rWZ5rGf55yBMRIwEAYDVQQHDAnmna3lt57l
|
||||
uIIxITAfBgNVBAoMGOa1meaxn+eooOW3nuWVhuS4mumTtuihjDEYMBYGA1UECwwP5pWw5a2X6YeR
|
||||
6J6N6YOoMRkwFwYDVQQDDBBzY2ZzLmN6Y2IuY29tLmNuMB4XDTI0MDMyNjA4NDU1MFoXDTI5MDMy
|
||||
NjA4NDU1MFowfzELMAkGA1UEBhMCQ04xEjAQBgNVBAgMCea1meaxn+ecgTESMBAGA1UEBwwJ5p2t
|
||||
5bee5biCMSEwHwYDVQQKDBjmtZnmsZ/nqKDlt57llYbkuJrpk7booYwxJTAjBgNVBAsMHOaVsOWt
|
||||
l+mHkeiejemDqC3mtYvor5Xor4HkuaYwWTATBgcqhkjOPQIBBggqgRzPVQGCLQNCAAT0KcBDXLn6
|
||||
Zv5vsEtuDzZclr30phN++uOVaQoFcDhhbeZlqRSIqRdg6YstCHUenN7NL2S1b1JlsWeIUxGCndZU
|
||||
MAoGCCqBHM9VAYN1A0cAMEQCIGp00kvdZqtobJ9X7YHAKBtGZXnXBKeuhdM+ZIhYelwBAiB1Dv0s
|
||||
0ahzWO+jJ/DVN8zM1b4noePZArFed8qHXsvt+Q==
|
||||
-----END CERTIFICATE-----
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIGTAgEAMBMGByqGSM49AgEGCCqBHM9VAYItBHkwdwIBAQQgR6jTgU+vLuT00j3QM7b/fPJ9iUGR
|
||||
zZeVwr90JeVhChygCgYIKoEcz1UBgi2hRANCAAT0KcBDXLn6Zv5vsEtuDzZclr30phN++uOVaQoF
|
||||
cDhhbeZlqRSIqRdg6YstCHUenN7NL2S1b1JlsWeIUxGCndZU
|
||||
-----END PRIVATE KEY-----
|
||||
|
|
@ -1,12 +1,16 @@
|
|||
scfs.api-gateway.online=false
|
||||
scfs.api-gateway.host=http://10.131.98.80:8088/api-gateway
|
||||
#scfs.api-gateway.host=http://127.0.0.1:8088/api-gateway
|
||||
scfs.api-gateway.channel.channel-no=1038
|
||||
scfs.api-gateway.channel.channel-no=0000
|
||||
scfs.api-gateway.channel.app-no=41
|
||||
scfs.api-gateway.cipher.store-type=resources
|
||||
#scfs.api-gateway.cipher.channel-private-key=invalid_rsa_private_key.pem
|
||||
#scfs.api-gateway.cipher.channel-certificate-serial=823CF3E310F2E2ED1AF85506E74A95DC4301006FDEF2FD019953FAF4DE12A8BF
|
||||
#scfs.api-gateway.cipher.certificate=invalid_rsa_certificate.pem
|
||||
scfs.api-gateway.cipher.channel-private-key=invalid_sm2_private_key.pem
|
||||
scfs.api-gateway.cipher.channel-certificate-serial=B76D9E0B7317F45478CC26502048C44F602AA83A2724C8FF40086FBA307140A7
|
||||
scfs.api-gateway.cipher.certificate=invalid_sm2_certificate.pem
|
||||
#scfs.api-gateway.cipher.channel-private-key=invalid_sm2_private_key.pem
|
||||
#scfs.api-gateway.cipher.channel-certificate-serial=B76D9E0B7317F45478CC26502048C44F602AA83A2724C8FF40086FBA307140A7
|
||||
#scfs.api-gateway.cipher.certificate=invalid_sm2_certificate.pem
|
||||
# ?? 0000
|
||||
scfs.api-gateway.cipher.channel-private-key=CZCB-SM-FB4E3DCE0297438ED390771F46576B92FD7E6B7F1E9BD12A7D87E821B59948E5-PRIVATE.pem
|
||||
scfs.api-gateway.cipher.channel-certificate-serial=FB4E3DCE0297438ED390771F46576B92FD7E6B7F1E9BD12A7D87E821B59948E5
|
||||
scfs.api-gateway.cipher.certificate=CZCB-SM-FB4E3DCE0297438ED390771F46576B92FD7E6B7F1E9BD12A7D87E821B59948E5-CERTIFICATE.pem
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
package com.czcb.scfs.api.test;
|
||||
|
||||
import com.czcb.scfs.api.service.echo.EchoService;
|
||||
import com.czcb.scfs.api.service.v1.sms.SmsService;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class BeanResourceTest {
|
||||
|
||||
@Test
|
||||
void test() {
|
||||
Assertions.assertNotNull(ContextUtil.getBean(EchoService.class));
|
||||
Assertions.assertNotNull(ContextUtil.getBean(SmsService.class));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.czcb.scfs.api.test.service;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class AccountServiceTest {
|
||||
@Test
|
||||
void personOpenAccountThreeElementTest() {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +1,22 @@
|
|||
package com.czcb.scfs.api.test;
|
||||
package com.czcb.scfs.api.test.service;
|
||||
|
||||
import com.czcb.scfs.api.service.v2.communal.CommunalDataService;
|
||||
import com.czcb.scfs.api.service.v2.communal.model.FiveCascadeQueryRequest;
|
||||
import com.czcb.scfs.api.service.v2.communal.model.FiveCascadeQueryResponse;
|
||||
import com.czcb.scfs.api.test.FmtDate;
|
||||
import com.czcb.scfs.api.test.Sequence;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author wangwei
|
||||
* @date 2024/5/22
|
||||
*/
|
||||
@SpringBootTest
|
||||
public class CommunalDataServiceTest {
|
||||
class CommunalDataServiceTest {
|
||||
|
||||
@Resource
|
||||
private CommunalDataService communalDataService;
|
||||
|
|
@ -24,12 +26,13 @@ public class CommunalDataServiceTest {
|
|||
FiveCascadeQueryRequest request = new FiveCascadeQueryRequest();
|
||||
request.setChannelNo("0000");
|
||||
request.setAppNo("10");
|
||||
request.setSerialNo(UUID.randomUUID().toString().replace("-", ""));
|
||||
request.setTransDate("2024-03-20");
|
||||
request.setTransTradeTime("2024-03-20");
|
||||
request.setSerialNo(Sequence.serialNo());
|
||||
request.setZoningCode("110101001000000");
|
||||
request.setTransTradeTime(FmtDate.transTradeTime());
|
||||
request.setTransDate(FmtDate.transDate());
|
||||
FiveCascadeQueryResponse response = communalDataService.fiveCascadeQuery(request);
|
||||
|
||||
System.out.println(response);
|
||||
Assertions.assertEquals("000000", response.getRecode());
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue