package com.ruoyi.system.dto;
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
public class MiddlePlatformAreaIdRequestTest
|
{
|
private static final String AREA_ID = "d0e5a6e0dd32157dab978447c0c75c7e";
|
|
private static final String DEPT_ID = "839ad74a0f26e920d8f9acbaa55dd7b3";
|
|
public static void main(String[] args) throws Exception
|
{
|
ObjectMapper objectMapper = new ObjectMapper();
|
String json = "{\"areaId\":\"" + AREA_ID + "\"}";
|
|
require(AREA_ID.equals(objectMapper.readValue(json, SysVisitorMachinePageRequest.class).getAreaId()),
|
"访客机区域筛选未保留字符串ID");
|
require(AREA_ID.equals(objectMapper.readValue(json, SysDoorDevicePageRequest.class).getAreaId()),
|
"门禁设备区域筛选未保留字符串ID");
|
require(AREA_ID.equals(objectMapper.readValue(json, SysVisitorRecordPageRequest.class).getAreaId()),
|
"访客记录区域筛选未保留字符串ID");
|
|
String employeeJson = "{\"deptId\":\"" + DEPT_ID + "\"}";
|
require(DEPT_ID.equals(objectMapper.readValue(employeeJson, SysEmployeePageRequest.class).getDeptId()),
|
"员工部门筛选未保留字符串ID");
|
}
|
|
private static void require(boolean condition, String message)
|
{
|
if (!condition)
|
{
|
throw new AssertionError(message);
|
}
|
}
|
}
|