liujie
2026-08-11 323764c813a09cd56cdab780155ef659dbe0b364
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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);
        }
    }
}