package com.tuoheng.admin.utils;

import cn.hutool.core.util.ObjectUtil;
import com.tuoheng.admin.entity.vo.AirWeatherVO;

public class AirWeatherUtil {

    public static String getWeather(AirWeatherVO airWeather) {
        if(ObjectUtil.isEmpty(airWeather) ||ObjectUtil.isEmpty(airWeather.getWth())){
            return "";
        }
        return "气温：" + airWeather.getWth().getParmNew().getTmp() + "℃"
                + "；湿度：" + airWeather.getWth().getParmNew().getHum() + "RH"
                + "；风速：" + airWeather.getWth().getParmNew().getWspd() + "M/S"
                + "；风向：" + airWeather.getWth().getParmNew().getWdirname();
    }
}
