小伙伴们关心的问题:身份证类型是指什么的作用的知识,本文通过数据整理汇集相关信息,希望对各位有所帮助。

身份证类型是指什么?

身份证类型是指持有者拥有的身份证种类,通常有居民身份证、临时身份证、护照和军官证等。

查身份证信息怎么查询?

答:可以使用中国公民身份证信息查询网站()查询身份证信息,或者在 *** 网站()查询身份证信息。

认证身份证

String CERT_TYPE_PRC_IDENTITY_CARD = "PRC_IDENTITY_CARD";

// 护照

String CERT_TYPE_PASSPORT = "PASSPORT";

// 港澳台居民往来大陆通行证

String CERT_TYPE_HK_MACAO_TAIWAN_PASS = "HK_MACAO_TAIWAN_PASS";

// 户口本

String CERT_TYPE_HOUSEHOLD_REGISTER = "HOUSEHOLD_REGISTER";

}

/**

* 交易类型配置

*/

interface TradeType {

// 消费

String CONSUME = "CONSUME";

// 预授权

String PRE_AUTH = "PRE_AUTH";

// 预授权完成

String PRE_AUTH_COMPLETE = "PRE_AUTH_COMPLETE";

// 预授权撤销

String PRE_AUTH_CANCEL = "PRE_AUTH_CANCEL";

// 退货

String REFUND = "REFUND";

}

/**

* 支付渠道配置

*/

interface PayChannel {

// 支付宝

String ALIPAY = "ALIPAY";

// 微信

String WECHAT = "WECHAT";

// 银联

String UNIONPAY = "UNIONPAY";

}

/**

* 支付状态配置

*/

interface PayStatus {

// 支付成功

String SUCCESS = "SUCCESS";

// 支付失败

String FAIL = "FAIL";

// 支付中

String PROCESSING = "PROCESSING";

// 退款中

String REFUNDING = "REFUNDING";

// 退款成功

String REFUND_SUCCESS = "REFUND_SUCCESS";

// 退款失败

String REFUND_FAIL = "REFUND_FAIL";

// 已取消

String CANCELLED = "CANCELLED";

}

}

Controller:

package com.example.demo.controller;

import org.springframework.web.bind.annotation.GetMapping;

import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

@RestController

@RequestMapping("/pay")

public class PayController {

@GetMapping("/payList")

public void payList(){

}

}

Service:

package com.example.demo.service;

public interface PayService {

void payList();

}

ServiceImpl:

package com.example.demo.service.impl;

import com.example.demo.service.PayService;

import lombok.extern.slf4j.Slf4j;

import org.springframework.stereotype.Service;

import java.util.Map;

@Slf4j

@Service

public class PayServiceImpl implements PayService {

@Override

public void payList() {

// 这里放置 PayService 接口的实现

}

}

最后,我们就可以运行代码来测试我们的 Spring Boot 工程是否正常工作。该测试的代码如下:

测试代码:

package com.example.demo;

import com.example.demo.config.PayConstant;

import com.example.demo.controller.PayController;

import com.example.demo.service.PayService;

import com.example.demo.service.impl.PayServiceImpl;

import org.junit.jupiter.api.Test;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.boot.test.context.SpringBootTest;

import org.springframework.util.Assert;

@SpringBootTest

public class DemoApplicationTests {

@Autowired

private PayService payService;

@Autowired

private PayController payController;

@Test

public void testPayConstant(){

Assert.isTrue(PayConstant.CERT_TYPE_PRC_IDENTITY_CARD.equals("PRC_IDENTITY_CARD"), "CERT_TYPE_PRC_IDENTITY_CARD is wrong");

Assert.isTrue(PayConstant.TRADE_TYPE_REFUND.equals("REFUND"), "TRADE_TYPE_REFUND is wrong");

Assert.isTrue(PayConstant.PAY_CHANNEL_ALIPAY.equals("ALIPAY"), "PAY_CHANNEL_ALIPAY is wrong");

Assert.isTrue(PayConstant.PAY_STATUS_SUCCESS.equals("SUCCESS"), "PAY_STATUS_SUCCESS is wrong");

}

@Test

public void testPayService(){

Assert.notNull(payService, "payService is null");

Assert.isTrue(payService instanceof PayServiceImpl, "payService is not instance of PayServiceImpl");

}

@Test

public void testPayController(){

Assert.notNull(payController, "payController is null");

}

@Test

public void testPayList(){

payService.payList();

}

}

运行测试代码,输出结果如下:

org.junit.jupiter.api.AssertionFailedError: CERT_TYPE_PRC_IDENTITY_CARD is wrong

Expected :true

Actual :false

at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)

at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:40)

at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:35)

at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:162)

at com.example.demo.DemoApplicationTests.testPayConstant(DemoApplicationTests.java:26)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk

总结:身份证类型是指什么的介绍到此就结束了,感谢您的支持。
你可能想看: