Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

查询项目下设备列表接口 含有下划线的字段解析失败 #46

Open
realheyu opened this issue Jan 24, 2024 · 0 comments
Open

Comments

@realheyu
Copy link

realheyu commented Jan 24, 2024

@Getter
@Setter
public class TuyaDeviceBO2 {

    /**
     * 设备 ID
     */
    private String id;

    /**
     * 设备的激活时间(时间戳秒数)
     */
    private Long active_time;

    /**
     * 设备的产品品类
     */
    private String category;

    /**
     * 设备的初次配网时间(时间戳秒数)
     */
    private Long create_time;

    /**
     * 设备的更新时间(时间戳秒数)
     */
    private Long update_time;

    /**
     * 设备的自定义名称
     */
    private String custom_name;

    /**
     * 设备的图标
     */
    private String icon;

    /**
     * 设备的 IP 地址
     */
    private String ip;

    /**
     * 设备的在线状态
     */
    private Boolean is_online;

    /**
     * 设备的纬度
     */
    private String lat;

    /**
     * 设备的局域网加密后的唯一密钥
     */
    private String local_key;

    /**
     * 设备的经度
     */
    private String lon;

    /**
     * 设备的名称
     */
    private String name;

    /**
     * 设备的产品 ID
     */
    private String product_id;

    /**
     * 设备的产品名称
     */
    private String product_name;

    /**
     * 是否为子设备
     */
    private Boolean sub;

    /**
     * 设备的时区
     */
    private String time_zone;

    /**
     * 设备的 UUID
     */
    private String uuid;
}

image
这个接口下划线的字段全部为空

@Service
public interface TuyaDeviceConnector {

    @GET("/v2.0/cloud/thing/{device_id}")
    TuyaDeviceBO2 getById(@Path("device_id") String deviceId);


    @GET("/v2.0/cloud/thing/device")
    List<TuyaDeviceBO2> getList(@Query("product_ids") String pid, @Query("page_size") int pageSize);

}

image

查询单个设备详情 是正常的
image

字段都是一样的 咋回事呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant